Link to home
Start Free TrialLog in
Avatar of ostraaten
ostraaten

asked on

Stop lftp from reconnecting

I'm trying to instruct lftp to not keep on reconnecting.

So I have created a file ~ltfprc which runs for each lftp command. Settings are picked up there. Now I'm trying to tell lftp using that file to keep reconnecting when it fails.

I noticed that it keeps reconnecting regardless of max-tries setings, so it basically reports an error: "max-retries exceeded" and then goeson  with reconnecting, so I'm quite sure I don't understand the max-retries purpose. Below is some output which shows that it keeps on reconnecting although max-retries is exceeded.


---- Connecting to 192.168.1.11 (192.168.1.11) port 21
copy: put rolled back to 0, seeking get accordingly
**** Timeout - reconnecting
---- Closing control socket
copy: put rolled back to 0, seeking get accordingly
mirror: Fatal error: max-retries exceeded
---- Connecting to 192.168.1.11 (192.168.1.11) port 21
**** Timeout - reconnecting
---- Closing control socket
mirror: Fatal error: max-retries exceeded
---- Connecting to 192.168.1.11 (192.168.1.11) port 21



Avatar of ostraaten
ostraaten

ASKER

Command I'm running is

lftp -u ftpuser,password -d -e "mirror -vnR '/media/My Mobile Drive/Our Pictures' /Photo/Our Photos" 192.168.1.11

I really I'm having a hard time understanding why lftp is so determined to continue running when it cannot connect.

I'm really having a hard time understanding behaviour. What lftp is basically is doing is.
try to connect to the machine
raise a fatal error because we have exceeded max-retry
try to connect another time
raise another fatal error because we have exceed max-retry
and so on....?????

 
Avatar of woolmilkporc
Hi,
strange, indeed. I never noticed that (and I can't test at the moment, because we don't use lftp anymore).
The only thing I could suggest is to set
cmd:fail-exit
and see if it helps.
Cheers
wmp
 

cmd:fail-exit  true
of course
Can you psot your ~/.lftprc file?
ASKER CERTIFIED SOLUTION
Avatar of owensleftfoot
owensleftfoot

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
.