FTP ERROR( Its an urgent issue)

Hi All,

 I have a problem with the FTP server. I have the application which was working fine earlier now its throwing FTP 450 ERROR.

Actually i have a service which login to the FTP server and do cd and ls command to look for the file. If FTP server has any files then it is working fine When there is no files then it is throwing no such file or directory found found error. Is there any way to suppress the error.

Its an urgent issue

Thanks,

Like most of you, we have the standard try/catch - Seq (success) /Seq (failure) / seq (done) logic to catch errors, and handle them it need be. I some of the cases we will catch and error and depending on the error, fix it right on the spot programmatically.

Now here’s the problem:
It still goes to the error log and since have set up e-mail notifications, someone gets a message for an error that has already been handled. Is there anyway in the seq (done) step to tell IS not to treat this as an error, since it has already been caught?

Thanks in the advance.

Thanks

If you are handling the error in your sequence, I’m not sure why it still goes to the error log. But maybe you could have a flag variable to indicate whether the email should be sent or not.

When you say the service is throwing a “No such file or directory error” error, do you mean that an actual exception is being thrown or is the “error” being returned in the directory listing?

I ask because I have used the WmPublic/pub.client.ftp services in a similar fashion before and I noticed that for some operating systems (ex. VMS), when a file was not a present, the directory listing (ie. dirlist) would come back null, while for some other operating systems (ex. Unix), a message would actually be returned in the first element of dirlist that read “: No such file or directory.” Because of this behavior, I had to incorporate this message into my logic when checking whether files existed or not. Example:

BRANCH (Evaluate Labels = True)
– %dirlist% != $null && %dirlist[0]% != “: No such file or directory”
---- Process File

You may want to try that.

Now, as for your try-catch question, as the other member pointed out, if you’re catching the error, then no excpetions should be thrown and hence the error should not show up in the log. I guess, however, a couple of possibilities (that I can think of) could cause this type of behavior:
(1) Many people tend to include as the last step of their catch block an EXIT and signal FAILURE step so the error gets propagated and logged to the monitor. If you have this step in your catch block, you may want to think about removing or putting some conditions around it.
(2) It could be that the service that is being invoked in the catch block and that is throwing the error has its logging turned on. In that case, you may want to turn off logging for that service.

Hope this helps.

  • Percio

Hi Castropd,

 What you said is right. Actually I did in the same way.

 What I did is first I created a service with sequence as exit on “Success”, second sequence as exit on “Failure” and Catch sequence as exit on “Done”. 

As I shown you I have create exit step under catch sequence.

If any error with 550 comes then the flow able to gets out from the service. But there are some problems which I have encountered.

  1. I am able to exit from the flow when the 550 error comes. But my server throwing the error with the 550.
  2. If I test with other FTP server (windows) then it’s working file. I mean to say it’s not throwing any error. I don’t know why?

Thanks in advance.

Hi Castropd,

 What you said is right. Actually I did in the same way.

 What I did is first I created a service with sequence as exit on “Success”, second sequence as exit on “Failure” and Catch sequence as exit on “Done”. 

As I shown you I have create exit step under catch sequence.

If any error with 550 comes then the flow able to gets out from the service. But there are some problems which I have encountered.

  1. I am able to exit from the flow when the 550 error comes. But my server throwing the error with the 550.
  2. If I test with other FTP server (windows) then it’s working file. I mean to say it’s not throwing any error. I don’t know why?

Thanks in advance.
FTP ERROR.doc (36.5 KB)

When you step through your Flow, on which step does the error occur?

Is you IS configured to automatically send emails when exceptions are written to the error log? Your catch does not prevent the exception, it just handles it. If your IS is set to send email notifications on exceptions you will always get an email when an FTP (or any other) service throws an exception even if you handle it in your catch block.

Mark

Hi,

Yes, my IS configured to automatically send emails whenever any exceptions accord.

First of all Thanks for the information. I have one more query Cant we handle this exception through event handler even I tried that but no luck to handle it. So
You mean to say there is no work around for this kind of issues? If no tell me how can we do work around and what best we can do for this kind of errors.

Thanks in Advance.

The workaround is to configure IS not to send emails on every exception. I have found that to be less than useful in production for exactly the reasons you are describing.

As you are seeing with FTP, not every exception is an error condition, so you don’t need an email on each one. You already appear to have a service that will send emails on certain types of errors, just use that consistently.

Mark

Hi MCarlos,

      Thanks for you feedback. Actually I know there is no work around for this, before telling to my client I thought I gets confirm form wmuser’s. And the information which you have provided is more than enough for me to explain my client on this.

   Thanks you, one more time Thanks.

Thanks,