Welcome Guest! Log in
Stambia versions 2.x, 3.x, S17, S18, S19 and S20 are reaching End of Support January, 15th, 2024. Please consider upgrading to the supported Semarchy xDI versions. See Global Policy Support and the Semarchy Documentation.

The Stambia User Community is moving to Semarchy! All the applicable resources have already been moved or are currently being moved to their new location. Read more…


Symptom

When executing a process which contains an FTP action, an error is raised by the FTP action, similar to this one:

java.net.SocketException: Connection reset
                at java.net.SocketInputStream.read(SocketInputStream.java:168)
                at sun.nio.cs.StreamDecoder$CharsetSD.readBytes(StreamDecoder.java:452)
                at sun.nio.cs.StreamDecoder$CharsetSD.implRead(StreamDecoder.java:494)
                at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:222)
                at java.io.InputStreamReader.read(InputStreamReader.java:177)
                at java.io.BufferedReader.fill(BufferedReader.java:136)
                at java.io.BufferedReader.readLine(BufferedReader.java:299)
                at java.io.BufferedReader.readLine(BufferedReader.java:362)
                at org.apache.commons.net.ftp.FTPFileEntryParserImpl.readNextEntry(FTPFileEntryParserImpl.java:53)
                at org.apache.commons.net.ftp.FTPListParseEngine.readStream(FTPListParseEngine.java:157)
                at org.apache.commons.net.ftp.FTPListParseEngine.readServerList(FTPListParseEngine.java:100)
                at org.apache.commons.net.ftp.FTPClient.initiateListParsing(FTPClient.java:2303)
                at org.apache.commons.net.ftp.FTPClient.initiateListParsing(FTPClient.java:2269)
                at org.apache.commons.net.ftp.FTPClient.listFiles(FTPClient.java:2046)
                at org.apache.commons.net.ftp.FTPClient.listFiles(FTPClient.java:2093)
                at com.indy.engine.actionCodes.FtpGetActionCodeI.executeSimpleCode(SourceFile:390)
                at com.indy.engine.action.common.ActionCodeTypeI.executeCode(SourceFile:1646)
                at com.indy.engine.action.common.ActionCodeTypeI.run(SourceFile:1805)
                at java.lang.Thread.run(Thread.java:738)

The FTP server is up and running.

Solution

This can happen when the FTP server is busy and takes some time to respond, resulting in a timeout. This may occur when establishing the FTP connection (connection timeout), or when trying to get/send files (data timeout).

The solution is to increase the "Connection Timeout" and "Data Timeout" on the FTP action. They are expressed in milliseconds. For example 10000 means 10 seconds.

Knowledge Base

Suggest a new Article!