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)
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.
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)
001120713

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.