Loading

MuleSoft SFTP Connection Issue "Read timed out" in the Error logs

Udgivelsesdato: Oct 23, 2025
Beskrivelse

In a MuleSoft application, the SFTP connection details are appropriate and external tools can access the SFTP servers appropriately, but facing  "java.net.SocketTimeoutException" in Anypoint Studio and Mule runtime instances such as:

com.jcraft.jsch.JSchException: Session.connect: java.net.SocketTimeoutException: Read timed out
    at com.jcraft.jsch.Session.connect(Session.java:565)
    at com.jcraft.jsch.Session.connect(Session.java:183)
    at org.mule.extension.sftp.internal.connection.SftpClient.connect(SftpClient.java:180)
    at org.mule.extension.sftp.internal.connection.SftpClient.login(SftpClient.java:162)
    at org.mule.extension.sftp.internal.connection.SftpConnectionProvider.connect(SftpConnectionProvider.java:139)
    at org.mule.extension.sftp.internal.connection.SftpConnectionProvider.connect(SftpConnectionProvider.java:59)
    at org.mule.runtime.module.extension.internal.runtime.config.ClassLoaderConnectionProviderWrapper.connect(ClassLoaderConnectionProviderWrapper.java:60)
    at org.mule.runtime.core.internal.connection.ConnectionUtils.connect(ConnectionUtils.java:49)
    at org.mule.runtime.core.internal.connection.AbstractConnectionProviderWrapper.connect(AbstractConnectionProviderWrapper.java:64)
    at org.mule.runtime.core.internal.connection.ErrorTypeHandlerConnectionProviderWrapper.connect(ErrorTypeHandlerConnectionProviderWrapper.java:64)
    at org.mule.runtime.core.internal.connection.ConnectionUtils.connect(ConnectionUtils.java:49)
 

Løsning

CAUSE

The default read timeout value configured in the SFTP connector is seconds. A connection establishment between a mule application and an SFTP service, successful transfer of data can take more than 10 seconds in certain scenarios. If the default values are not altered, then the application would face the "MULE:CONNECTIVITY" error with the above-mentioned stack trace.

SOLUTION

Adjust the "Connection Timeout" and "Response Timeout" values as per the SFTP service requirement to resolve the above error. 
(Note: The optimum value depends on the SFTP service that the application connects to. A higher value means the application would wait for that much longer before raising the "MULE:CONNECTIVITY error)
 

Vidensartikelnummer

001120713

 
Indlæser
Salesforce Help | Article