[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Stop lftp from reconnecting

Posted on 2009-07-10
6
Medium Priority
?
2,774 Views
Last Modified: 2012-05-07
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



0
Comment
Question by:ostraaten
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 

Author Comment

by:ostraaten
ID: 24822984
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....?????

 
0
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 24823227
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
 
0
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 24823254

cmd:fail-exit  true
of course
0
Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

 
LVL 23

Expert Comment

by:Maciej S
ID: 24824073
Can you psot your ~/.lftprc file?
0
 
LVL 17

Accepted Solution

by:
owensleftfoot earned 1500 total points
ID: 24824583
Try the --max-errors option. Its not in the docs
0
 

Author Closing Comment

by:ostraaten
ID: 31602053
.
0

Featured Post

Fill in the form and get your FREE NFR key NOW!

Veeam® is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question