IBM Support

SFTP hangs in SFTP Begin Session service and all threads are busy

Troubleshooting


Problem

SFTP hangs in SFTP Begin Session service and all threads are busy

Symptom

Using Gentran Integration Suite version 4.3 and build 4322 or build 4319.   The problem can also occur when using Sterling Integrator 5.0.  Business Processes using SFTP Begin Session Service are hanging with status ACTIVE or Delay-Waiting-On-IO.   All threads for the queue are busy with Business Processes using SFTP Begin Session service.

Business Processes using the SFTP Begin Session can be submitted and will free up thread after changing status to Delay-Waiting-On-IO.  When the number of Business Processes in Delay-Waiting-On-IO is equal to the number of threads for SFTP Client Adapter SFTP Business Processes will stay ACTIVE and hold a thread.  

The Business Process can be terminated but the thread will remain in use.  Interrupting the thread should be effective.   Stopping the thread may not effective in freeing up the thread.  Once the thread is free other Business Processes should execute including Business Processes using SFTP.  But Business Processes using the SFTP Begin Session connecting to the remote SFTP server that is not responding may remain active when re submitted.  

This problem has been know to occur when the remote SFTP server has put the SFTP client IP Address on a banned list.   A packet trace shows the SFTP client and sever completing the TCP three way handshake (SYN, SYN-ACK, ACK) but not other packets are transferred.  Some traces FIN packets are observed with no effect on the problem. 

Error Message

The SFTP client log reports a time out exception. 

[2010-08-03 09:32:12.56] ERROR
EDU.oswego.cs.dl.util.concurrent.TimeoutException
 at EDU.oswego.cs.dl.util.concurrent.FutureResult.timedGet(FutureResult.java:128)
 at com.sterlingcommerce.woodstock.services.sftpclient.services.Response.waitForResults(Response.java:107)
 at com.sterlingcommerce.woodstock.services.sftpclient.client.Client.beginSession(Client.java:287)
 at com.sterlingcommerce.woodstock.services.sftpclient.AdapterImpl.beginSession(AdapterImpl.java:191)
 at sun.reflect.GeneratedMethodAccessor259.invoke(Unknown Source)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:585)
 at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
 at sun.rmi.transport.Transport$1.run(Transport.java:153)
 at java.security.AccessController.doPrivileged(Native Method)
 at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
 at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:466)
 at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:707)
 at java.lang.Thread.run(Thread.java:595)

Resolving The Problem

Please apply Gentran Integration Suite, Release 4.3 Build 4324 or later..

Please apply Sterling Integrator, Release 5.0 Build 5008 or later.

When the fix is applied a new property is added to sftp.properties to control the amount of time SFTP Begin Session Service will wait for a connection.  The property is sshTransportTimeout=.  The default value is 30 seconds specified in milliseconds.  For example sshTransportTimeout=30000.  With this fix applied and the default sshTransportTimeout=30000 the SFTP Begin Session Service will end after waiting 30 seconds for a connection.  Other SFTP services are not affected by this property.  

 

If the fix is not applied try interrupting the thread for the Business Process that is stuck on the thread.  This should free up the thread and allow Business Processes on the wait queue to process.  However Business Processes connecting to the remote SFTP server having a problem could become stuck on the thread again trying to connect to the same remote SFTP server.  Terminating problem SFTP Business Processes may not free up the thread.  Stopping the thread may not be effective.   Before interrupting the thread(s), eliminate Business Processes trying to connect to the problem SFTP server until connectivity can be re established. 

[{"Product":{"code":"SS3JSW","label":"IBM Sterling B2B Integrator"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"Not Applicable","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

Historical Number

NFX9654

Product Synonym

[<p><b>]Function Area[</b><p>];Service and Adapter;[<p><b>]Escalation ID[</b><p>];00206964;[<p><b>]Fix ID[</b><p>];236107;235968;[<p><b>]Severity[</b><p>];Critical;[<p><b>]Type[</b><p>];NormalFix;[<p><b>]Build[</b><p>];4324;5008

Document Information

Modified date:
10 January 2020

UID

swg21558882