duplicity-talk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Duplicity-talk] [cvs] regression: socket.timeout because of disabling p


From: dAniel hAhler
Subject: [Duplicity-talk] [cvs] regression: socket.timeout because of disabling passive FTP
Date: Fri, 25 May 2007 19:25:25 +0200

Hello,

in CVS there's self.ftp.set_pasv(False), which can cause socket
timeouts, if ftp-data is firewalled/rejected.

Additionally, there seems to be code in ftpBackend.list to turn
passive mode off in some case (ftp error 425), but it does not get
reached - at least not in a reasonable amout of time and passive mode
would be off already anyway!

I think this must get handled better - e.g. by turning passive mode
on, when there's a socket.timeout exception.

Apart from that: why should passive FTP get disabled at all?


Log:
# ftplicity full
FTP: connect ('server',)
...
Main action: full
Listing files on FTP server
FTP: nlst ()
*cmd* 'TYPE A'
*put* 'TYPE A\r\n'
*get* '200 Type set to A\r\n'
*resp* '200 Type set to A'
*cmd* 'PORT xx,xxx,xxx,xxx,178,225'
*put* 'PORT xx,xxx,xxx,xxx,178,225\r\n'
*get* '200 PORT command successful\r\n'
*resp* '200 PORT command successful'
*cmd* 'NLST'
*put* 'NLST\r\n'
Catched exception <class 'socket.timeout'>: timed out (#1), sleeping
10s before retry..
*cmd* 'TYPE A'
*put* 'TYPE A\r\n'
*cmd* 'TYPE A'
*put* 'TYPE A\r\n'
Catched exception <class 'socket.timeout'>: timed out (#2), sleeping
20s before retry..
*cmd* 'TYPE A'
*put* 'TYPE A\r\n'
Traceback (most recent call last):
 File "/usr/local/duplicity-cvs/duplicity-bin", line 373, in <module>
   if __name__ == "__main__": main()
 File "/usr/local/duplicity-cvs/duplicity-bin", line 349, in main
   globals.archive_dir).set_values()
 File "/usr/local/duplicity-cvs/duplicity/collections.py", line 406,
in set_values
   backend_filename_list = self.backend.list()
 File "/usr/local/duplicity-cvs/duplicity/backends.py", line 442, in list
   try: return self.error_wrap('nlst')
 File "/usr/local/duplicity-cvs/duplicity/backends.py", line 410, in error_wrap
   return ftplib.FTP.__dict__[command](self.ftp, *args)
 File "../duplicity/ftplib.py", line 454, in nlst
   self.retrlines(cmd, files.append)
 File "../duplicity/ftplib.py", line 401, in retrlines
   resp = self.sendcmd('TYPE A')
 File "../duplicity/ftplib.py", line 241, in sendcmd
   return self.getresp()
 File "../duplicity/ftplib.py", line 207, in getresp
   resp = self.getmultiline()
 File "../duplicity/ftplib.py", line 193, in getmultiline
   line = self.getline()
 File "../duplicity/ftplib.py", line 180, in getline
   line = self.file.readline()
 File "/usr/lib/python2.5/socket.py", line 346, in readline
   data = self._sock.recv(self._rbufsize)
KeyboardInterrupt




reply via email to

[Prev in Thread] Current Thread [Next in Thread]