Joan Aguilar
2013-08-29 14:46:33 UTC
Hi all,
I'm currently using lftp connecting to a server using sftp. I have noticed
that while a transfer is taking place and the connection is lost, lftp is
orphaning a process.
This occurs when it attempts to reconnect to the server, which spawns a new
child process using of the connecting program. The transfer might resume,
or eventually fail if you have a maximum amount of retries.In both cases
lftp will return but only with the second process spawned. The first
spawned connecting program process will still be there:
When I initiate the transfer, "ps -elf | egrep '(lftp|ssh)' " says:
* *
by just pulling the cable or by bringing down the VPN tunnel to the server.
The transfer stops, for a time, the banner just shows the transfer speed
dropping, but once it says *[Continuing...], *a new process is spawned, and
there...
*4 S root 20421 1 0 80 0 - 2664 - 13:54 ? 00:00:00
set net:max-retries 1
set net:reconnect-interval-base 10
set net:timeout 10
set sftp:connect-program "ssh -a -x -oUserKnownHostsFile=/dev/null
-oIdentityFile=/config/*identity*.rsa"
And I'm simply running 'mput -c myfile.log' in the lftp command line.
Thanks for any input!
~Joan
I'm currently using lftp connecting to a server using sftp. I have noticed
that while a transfer is taking place and the connection is lost, lftp is
orphaning a process.
This occurs when it attempts to reconnect to the server, which spawns a new
child process using of the connecting program. The transfer might resume,
or eventually fail if you have a maximum amount of retries.In both cases
lftp will return but only with the second process spawned. The first
spawned connecting program process will still be there:
When I initiate the transfer, "ps -elf | egrep '(lftp|ssh)' " says:
* *
*4 S root 20420 4459 0 80 0 - 2276 - 13:54 pts/1
00:00:00 /usr/bin/lftp -u <username>: sftp://<server-ip>*
*4 S root 20421 20420 0 80 0 - 2664 - 13:54 pts/3 00:00:0000:00:00 /usr/bin/lftp -u <username>: sftp://<server-ip>*
ssh -a -x -oUserKnownHostsFile=/dev/null
-oIdentityFile=/config/identity.rsa -s -l <username> <server-ip> sftp*
I let it transfer for a time, then I terminate my network connection either-oIdentityFile=/config/identity.rsa -s -l <username> <server-ip> sftp*
by just pulling the cable or by bringing down the VPN tunnel to the server.
The transfer stops, for a time, the banner just shows the transfer speed
dropping, but once it says *[Continuing...], *a new process is spawned, and
*4 S root 20420 4459 0 80 0 - 2276 - 13:54 pts/1
00:00:00 /usr/bin/lftp -u **<username>**: sftp:/**/<server-ip>**
**4 S root 20421 20420 0 80 0 - 2664 - 13:54 ?
00:00:00 ssh -a -x -oUserKnownHostsFile=/dev/null -oIdentityFile=/config/
**identity**.rsa -s -l **<username> **<server-ip>** sftp
**4 S root 20635 20420 0 80 0 - 1980 - 13:54 pts/4
00:00:00 ssh -a -x -oUserKnownHostsFile=/dev/null -oIdentityFile=/config/
**identity**.rsa -s -l **<username>** **<server-ip>** sftp*
Once the transfer fails, or succeeds, one of the ssh process is still00:00:00 /usr/bin/lftp -u **<username>**: sftp:/**/<server-ip>**
**4 S root 20421 20420 0 80 0 - 2664 - 13:54 ?
00:00:00 ssh -a -x -oUserKnownHostsFile=/dev/null -oIdentityFile=/config/
**identity**.rsa -s -l **<username> **<server-ip>** sftp
**4 S root 20635 20420 0 80 0 - 1980 - 13:54 pts/4
00:00:00 ssh -a -x -oUserKnownHostsFile=/dev/null -oIdentityFile=/config/
**identity**.rsa -s -l **<username>** **<server-ip>** sftp*
there...
*4 S root 20421 1 0 80 0 - 2664 - 13:54 ? 00:00:00
ssh -a -x -oUserKnownHostsFile=/dev/null
-oIdentityFile=/config/identity.rsa -s -l **<username> **<server-ip>**
sftp*
I have a few variables set, aside from the default configuration:-oIdentityFile=/config/identity.rsa -s -l **<username> **<server-ip>**
sftp*
set net:max-retries 1
set net:reconnect-interval-base 10
set net:timeout 10
set sftp:connect-program "ssh -a -x -oUserKnownHostsFile=/dev/null
-oIdentityFile=/config/*identity*.rsa"
And I'm simply running 'mput -c myfile.log' in the lftp command line.
Thanks for any input!
~Joan