When trying to establish connection to a remote SFTP server from within Oracle Database using our product OraSFTP you may encounter connection refused error with stack trace similar to the one presented below:
ORA-29532: Java call terminated by uncaught Java exception: java.sql.SQLException: SFTPException : There was a problem while connecting to <host>:<port>[recv() failed, errno = 131
Connection reset by peer]java.io.IOException: There was a problem while connecting to <host>:<port>
at com.didisoft.ssh2.Connection.connect(Connection.java)
at com.didisoft.ssh2.Connection.connect(Connection.java)
at com.didisoft.ssh2.Connection.connect(Connection.java)
at didisoft.SftpLobby2.connect(SftpLobby2.java)
at didisoft.Connection.connect(Connection.java)
at didisoft.OraSFTP.connect(OraSFTP.java)
Caused by: java.net.SocketException: recv() failed, errno = 131
Connection reset by peer
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.socketRead(SocketInputStream.java:116)
at java.net.SocketInputStream.read(SocketInputStream.java:171)
at java.net.SocketInputStream.read(SocketInputStream.java:141)
at java.net.SocketInputStream.read(SocketInputStream.jav29532. 00000 – “Java call terminated by uncaught Java exception: %s”
In such cases it is a good idea to check the remote SFTP server configuration and especially is the host where your Oracle Database resides presented in the allowed remote hosts for the SFTP server.