Peer closed connection with lftp to remote host
Posted by kumar on Dec 12, 2019; 11:40am
URL: http://erman-arslan-s-oracle-forum.124.s1.nabble.com/Peer-closed-connection-with-lftp-to-remote-host-tp7912.html
Hi erman,
We are connecting to a remote server and fetching a file through a concurrent program.It worked for several months and all of the sudden we have an issue today.
ipadress and port is masked for security reasons
#Fetch the latest file name available in target Server
lftp -u ${USER},${PASS} sftp://${HOST}:${PORT} <<EOF-->used for connecting to target host.
cd /FILES-->is the location in target server where the files are placed
method :1
=========
[applprod@erpprodapp01 bin]$ lftp -u ${USER},${PASS} sftp://${HOST}:${PORT}
lftp username@*********:~> cd /FILES
cd `/ERPFILES' [Delaying before reconnect: 20]------>we are facing this error
We have enabled debug and below is the error
[applprod@app01 bin]$ lftp -u ${USER},${PASS} sftp://${HOST}:${PORT}
lftp username@*********:~> debug
lftp username@*********:~> cd /FILES
---- Running connect program (ssh -a -x -s -l username-p port **** sftp)============>Error message
---> sending a packet, length=5, type=1(INIT), id=0
<--- ssh_exchange_identification: read: Connection reset by peer
**** Peer closed connection
---- Disconnecting
method 2:
==========
[applprod@erpprodapp01 bin]$ lftp -u ${USER},${PASS} sftp://${HOST}:${PORT}
lftp ttderp@***.***.***.***:~> debug
lftp ttderp@***.***.***.***:~> set sftp:connect-program "ssh -a -x -o PubkeyAuthentication=false"
lftp ttderp@***.***.***.***:~> cd /ERPFILES
---- Connecting to ***.***.***.***(***.***.***.***) port ****
**** Peer closed connection
---- Closing control socket
telnet output
[applprod@app01 bin]$ telnet ipadress port
Trying ***.***.***.***...
Connected to ***.***.***.***.
Escape character is '^]'.
Connection closed by foreign host.
[applprod@app01 bin]$
Kindly suggest
Thank you