Currently we are having a problem with Net::FTP v 2.75 that we do not have with version 2.65. Basically passive mode seems to get hung up -- it seems to be using the internal IP for a server that is behind a firewall, rather than the external IPs. Here is the succesful output under v 2.65. The $ftp object is already succesfully logged in.
main::(invite.pl:34): $ftp->pasv;
DB<1>
Net::FTP=GLOB(0x8a08938)>>> PASV
Net::FTP=GLOB(0x8a08938)<<< 227 Entering passive mode; use PORT (204,107,47,169,7,209)
DB<1> x $ftp->ls
Net::FTP=GLOB(0x8a08938)>>> PASV
Net::FTP=GLOB(0x8a08938)<<< 227 Entering passive mode; use PORT (204,107,47,169,7,209)
Net::FTP=GLOB(0x8a08938)>>> NLST
Net::FTP=GLOB(0x8a08938)<<< 150 List started.
Net::FTP=GLOB(0x8a08938)<<< 226 Transfer completed.
0 'HRMS83.DAT.FHHR167A.X070118.pgp'
1 'HRMS83.DAT.FHHR167A.X070126.pgp'
2 'HRMS83.DAT.FHHR167A.X070201.pgp'
3 'HRMS83.DAT.FHHR167A.X070202.pgp'
4 'HRMS83.DAT.FHHR167A.X070203.pgp'
5 'ftp_server.log'
DB<2> x $Net::FTP::VERSION
0 2.65
Now here is the same program when run under Net::FTP 2.75:
main::(invite.pl:34): $ftp->pasv;
DB<2>
Net::FTP=GLOB(0x9b244a4)>>> PASV
Net::FTP=GLOB(0x9b244a4)<<< 227 Entering passive mode; use PORT (204,107,47,169,7,209)
main::(invite.pl:35): $ftp->get($file_name)
main::(invite.pl:36): or log_msg('FATAL', "Cannot get file $file_name");
DB<2> x $ftp->ls
Net::FTP=GLOB(0x9b244a4)>>> PORT 192,168,1,197,170,155
Net::FTP=GLOB(0x9b244a4): Timeout at (eval 19)
Note that the response to the PASV command shows the correct IP (of the server to which I am connecting via ftp -- 204.107.47.169. But when I call $ftp->ls, it says PORT 192.168.1.197 -- which is the internal IP of the server from which I am making the connection.
So something has changed between 2.65 and 2.75 that messes up the connection. I just noticed that there is now a 2.77 of Net::FTP so I will try that tomorrow, but from the changelogs I don't suspect this issue is addressed.
Any comments or suggested work-arounds? I'd rather not downgrade my server to 2.75, I only stumbled upon the fact that 2.65 worked with testing on an older server. Thanks,
Rob
(7)
]
