FTP problem in WebMethods

I am using webMethods V6.1 developer and TN console. The application is deployed on Solaris OS (E10K server). My desktop client is Win2k and webMethods tools are installed there.
I am facing the following problem: The requirement is that I pick up daily Purchase Order data and send them to a VSAM system. This needs to be done every week at 5pm.
I have got a webMethods scheduler which invokes a WebMethod service. The Webmethod Service fetches all the data from the database and formats the data. Then it invokes a FTP file using WM service “pub:client:ftp:login”. I specify all the parameters like FTP file server, port#, user name, password, data transferred mode etc. After that I invoke WM service “pub:client:ftp:append” to pass the formatted string in the FTP file. Now when the “pub:client:ftp:append” is called, it gets some Service Exception and the FTP job doesn’t run.
When I perform the job manually, the same issue occurs. However, when I re-run the job, it works fine.
Can you please help on this. I am sending the error as an attachment

WM error
error.doc (57.3 k)

Sumit,

Try using pub.client:ftp and specify all the parameters in this service eg:serverhost,serverport,user,password,formatted string should be mapped to Content etc…

ramesh.

Ramesh,
Thanks for your tip. I did the same and still the error persists.

I am assuming you double checked the file thats appending has “write” rights. I would try chmod 777…

If it still fails, try appending without using webMethods from a remote box…

It’s very likely its not a wM issue…

Since the service is throwing an exception, it might be helpful to place the call within a try/catch block and retrieve the last error. That may provide an indication of what’s going on.

It’s probably a good idea to use a try/catch block in any case to make sure your FTP session is closed even when an error such as this occurs.

Hi,
We are also getting the same error while we try appending to a file on remote server. We have a scheduled service that loops over the queued tasks and apppends the content of each task to single file on partner server. The append is done using pub.client.ftp:append service. But we have observed that sometimes when the pub.client.ftp:append runs it generates an error and ftp session is killed , so the tasks get stuck in a status delivering and then only way to reprocess these tasks manually.
I did add a few debug log statements in the code to pinpoint where exaclty we get the error and have seen that the error while executing pub.client.ftp:append service.

Logging Information

 2006-06-02 21:43:01 CEST [ISP.0090.0003C] After Log In
2006-06-02 21:43:01 CEST [ISP.0090.0003C] Entered the Loop
2006-06-02 21:43:01 CEST [ISP.0090.0003C] Before append
2006-06-02 21:43:01 CEST [ISP.0090.0003C] 2006-06-02 21:43:01    itseelm-ax0006    B2B0376C    IKEA.GreenPlants.ftp:pushToIDRSBatch ::: error occurred  : com.wm.app.b2b.server.ServiceException: 
[ISS.0086.9194] Not logged in!
    at pub.client.ftp.put_append(ftp.java:717)
    at pub.client.ftp.append(ftp.java:808)
    at sun.reflect.GeneratedMethodAccessor160.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java(Compiled Code))
    at java.lang.reflect.Method.invoke(Method.java(Compiled Code))
    at com.wm.app.b2b.server.JavaService.baseInvoke(JavaService.java(Compiled Code))
    at com.wm.app.b2b.server.invoke.InvokeManager.process(InvokeManager.java(Compiled Code))
    at com.wm.app.b2b.server.invoke.StatisticsProcessor.process(StatisticsProcessor.java(Compiled Code))
    at com.wm.app.b2b.server.invoke.ServiceCompletionImpl.process(ServiceCompletionImpl.java(Compiled Code))
    at com.wm.app.b2b.server.invoke.ValidateProcessor.process(ValidateProcessor.java(Compiled Code))
    at com.wm.app.b2b.server.ACLManager.process(ACLManager.java(Compiled Code))
    at com.wm.app.b2b.server.invoke.DispatchProcessor.process(DispatchProcessor.java(Compiled Code))
    at com.wm.app.b2b.server.AuditLogManager.process(AuditLogManager.java(Compiled Code))
    at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java(Compiled Code))
    at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java(Inlined Compiled Code))
    at com.wm.app.b2b.server.ServiceManager.invoke(ServiceManager.java(Inlined Compiled Code))
    at com.wm.app.b2b.server.BaseService.invoke(BaseService.java(Compiled Code))
    at com.wm.lang.flow.FlowInvoke.invoke(FlowInvoke.java(Compiled Code))
    at com.wm.lang.flow.FlowState.invokeNode(FlowState.java(Compiled Code))
    at com.wm.lang.flow.FlowState.step(FlowState.java(Compiled Code))
    at com.wm.lang.flow.FlowState.invoke(FlowState.java(Compiled Code))
    at com.wm.app.b2b.server.FlowSvcImpl.baseInvoke(FlowSvcImpl.java(Compiled Code))
    at com.wm.app.b2b.server.invoke.InvokeManager.process(InvokeManager.java(Compiled Code))
    at com.wm.app.b2b.server.invoke.StatisticsProcessor.process(StatisticsProcessor.java(Compiled Code))
    at com.wm.app.b2b.server.invoke.ServiceCompletionImpl.process(ServiceCompletionImpl.java(Compiled Code))
    at com.wm.app.b2b.server.invoke.ValidateProcessor.process(ValidateProcessor.java(Compiled Code))
    at com.wm.app.b2b.server.ACLManager.process(ACLManager.java(Compiled Code))
    at com.wm.app.b2b.server.invoke.DispatchProcessor.process(DispatchProcessor.java(Compiled Code))
    at com.wm.app.b2b.server.AuditLogManager.process(AuditLogManager.java(Compiled Code))
    at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java(Compiled Code))
    at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java(Inlined Compiled Code))
    at com.wm.app.b2b.server.ServiceManager.invoke(ServiceManager.java(Inlined Compiled Code))
    at com.wm.app.b2b.server.ServiceManager.invoke(ServiceManager.java(Compiled Code))
    at com.wm.app.b2b.server.Service.doInvoke(Service.java(Compiled Code))
    at com.wm.app.b2b.server.Service.doInvoke(Service.java(Compiled Code))
    at wm.tn.queuing.deliverBatch(queuing.java:588)
    at sun.reflect.GeneratedMethodAccessor188.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java(Compiled Code))
    at java.lang.reflect.Method.invoke(Method.java(Compiled Code))
    at com.wm.app.b2b.server.JavaService.baseInvoke(JavaService.java(Compiled Code))
    at com.wm.app.b2b.server.invoke.InvokeManager.process(InvokeManager.java(Compiled Code))
    at com.wm.app.b2b.server.invoke.StatisticsProcessor.process(StatisticsProcessor.java(Compiled Code))
    at com.wm.app.b2b.server.invoke.ServiceCompletionImpl.process(ServiceCompletionImpl.java(Compiled Code))
    at com.wm.app.b2b.server.invoke.ValidateProcessor.process(ValidateProcessor.java(Compiled Code))
    at com.wm.app.b2b.server.ACLManager.process(ACLManager.java(Compiled Code))
    at com.wm.app.b2b.server.invoke.DispatchProcessor.process(DispatchProcessor.java(Compiled Code))
    at com.wm.app.b2b.server.AuditLogManager.process(AuditLogManager.java(Compiled Code))
    at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java(Compiled Code))
    at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java(Inlined Compiled Code))
    at com.wm.app.b2b.server.ServiceManager.invoke(ServiceManager.java(Inlined Compiled Code))
    at com.wm.app.b2b.server.ServiceManager.invoke(ServiceManager.java(Inlined Compiled Code))
    at com.wm.app.b2b.server.ServiceManager.invoke(ServiceManager.java(Compiled Code))
    at com.wm.app.b2b.server.SessionInvoke.run(Session.java(Compiled Code))
    at com.wm.util.pool.PooledThread.run(PooledThread.java(Compiled Code))
    at java.lang.Thread.run(Thread.java:568)

Has anyone found out resolution to above issue.

Any help will be very much appreciated .

Regards
Yogesh

Yogesh,

What would the following error message suggest…

[ISS.0086.9194] Not logged in!

Sumit,
Once you figure out the issue that Mark has mentioned and still the error persists… you may want to try using ftp quote commands to specify the mainframe vsam dataset parameters like the management class, record length, record format, space etc…
give it a whirl and see …

Thanks
Shantanu

Hi Mark,

2006-06-02 21:43:01 CEST [ISP.0090.0003C] After Log In
2006-06-02 21:43:01 CEST [ISP.0090.0003C] Entered the Loop
2006-06-02 21:43:01 CEST [ISP.0090.0003C] Before append
2006-06-02 21:43:01 CEST [ISP.0090.0003C] 2006-06-02 21:43:01 itseelm-ax0006 B2B0376C IKEA.GreenPlants.ftp:pushToIDRSBatch ::: error occurred : com.wm.app.b2b.server.ServiceException:
[ISS.0086.9194] Not logged in!

From the above logs its clear that the log on to the server is successful but while executing the service pub.client.ftp:append ftp service some error occurs as a result of which session gets terminated and we get the error mentioned above.What we dont know is why the session is being terminated?
Increse of ftp timeout does not help.

Regards
Yogesh

It is only clear if one could read the code producing the logging statements. It is not clear from your post.

Suggest enabling debug logs on the target FTP server to help diagnose.

Mark

The assumption here is that the logs accurately reflect activity. Can you post the snippet of your service that is doing this work? I’m wondering if the service is checking for log in errors or not.

Hi Rob,

Please find screen shot of the code as attached below.After log in to ftp server the return code is checked if it’s >=300 then the service performs an exit from try block and the error is catched in catch block.

Mark thanks for your suggestion we have asked for ftp logs from the partner.

Regards
Yogesh
deliveryservice2.jpg

Yogesh: Checking for returncode >= 300 should do the trick, as you have in your service. But you might consider checking if sessionkey is $null instead. If sessionkey != null, then you have an FTP session. If it is $null, then the login in failed (regardless of what the returncode might indicate).

If you review VAN.VANConnectivity:putToVAN in the WmEDIforTN package you’ll see that wM-provided services don’t rely on FTP return codes.

A couple of other observations:

  • Your service isn’t using a try/catch block. That means on error, your FTP session may be left open. The default behavior of IS is to reuse FTP connections, which can cause problems in subsequent calls.

  • After your getQueuedTask call, if the task is $null you’re exiting. You need to close the FTP session.

HTH.

Hi Raemon,

Thanks for your suggestions will also check for session key and will explicitly logout if tasks are null.

The flow service is written in a try catch block but due to size restrictions could not attach the screen shot of the entire so had to crop it.

Regards
Yogesh

HI Mark / Raemon

Got Ftp logs from the partner.
Partner Logs are as follows
2006-06-02 21:43:01 10.57.152.125 IKEA\FSEEIN [1707]USER IKEA\FSEEIN 331 0
2006-06-02 21:43:01 10.57.152.125 IKEA\FSEEIN [1707]PASS - 230 0
2006-06-02 21:47:14 10.57.152.125 IKEA\FSEEIN [1707]closed - 421 121

IS Logs
006-06-02 21:43:01 CEST [ISP.0090.0003C] After Log In
2006-06-02 21:43:01 CEST [ISP.0090.0003C] Entered the Loop
2006-06-02 21:43:01 CEST [ISP.0090.0003C] Before append
2006-06-02 21:43:01 CEST [ISP.0090.0003C] 2006-06-02 21:43:01 itseelm-ax0006 B2B0376C IKEA.GreenPlants.ftp:pushToIDRSBatch ::: error occurred : com.wm.app.b2b.server.ServiceException: [ISS.0086.9194] Not logged in!
at pub.client.ftp.put_append(ftp.java:717)

Now it seems that even though a valid session exists on the server we get a message not logged in!!!

Regards
Yogesh

no chance that you dropped or are losing the session key in any step? If that session key is lost, your FTP command whont know where to perform the action as though it is not logged in.

Hi All,

The errors have stooped now. We have increased the FTP data connection timeout.Also have added a missing logout statement to the code.

A big thank you to all

Cheers
Yogesh