ftplib, unexpected error

Steve J. Morris (sjm2@shore.shore.net)
12 Mar 1995 22:15:30 GMT

I have been trying to use ftplib without much luck. I am pretty much
using the example at the top of ftplib.el editing for my host, id and
password. Has anyone use this library much, i.e. with a variety of ftp
servers?

My site is brodie.shore.net. If I use 'brodie' (i.e. localhost) as the
host name everything works. If I use the full name I get

ftplib.error_temp: 425 can't build data connection: connection timed out.

as a response to ftp.retrlines('LIST')

specifically debugging shows:

*put* 'LIST\015\012'
*get* "425 can't build data connection: Connection timed out."

As far as I can tell by wandering through my ftpd sources this message
actually comes from the ftp server. (At least everything up to the
":") However notice that I am using the same server in both cases. My
system (linux) ftp client works for both forms of hostname.

Other sites also fail. In fact the only one that I have been able to access
with this code is localhost.

NOTE: I am a single IP address at the end of a 28.8k PPP connection.
This may be too slow or buggy except then why does my ftp client work?

I can't see any timeout parameter that I can tweak. Also it takes a
while to time out (90 seconds?) so the timeout probably means nothing
is happening ever.

If I have to I guess I could get RFC 959 and start debugging the hard
way but I was hoping someone had been down this path already and could
save me a little time. I've never done socket stuff.

Regards,

Steve Morris