The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #2 (permalink)  
Old 02-10-2009
Styles Styles is offline
Registered User
  
 

Join Date: Jan 2009
Posts: 5
Update: Running through debug now and now I'm really confused as to why it failing.
Quote:
DB<1>
main:health.pl:69): my $ftps = Net::FTPSSL->new($hostname, Debug => $verbose, Port => $port, Encryption => $encryption) or die "ERROR: Cannot conect to $hostname\n";
DB<1>
SKT <<< 220 .
SKT >>> AUTH TLS
SKT <<< 234 Proceed with negotiation.
main:health.pl:71): if (!$ftps->login("$username","$password")) {
DB<1>
>>> USER test
<<< 331 Please specify the password.
>>> PASS ****
<<< 230 Login successful.
main:health.pl:76): $ftps->binary;
DB<1>
>>> TYPE I
<<< 200 Switching to Binary mode.
main:health.pl:78): if (!$ftps->cwd("/$input_dir")) {
DB<1>
>>> CWD /input
<<< 250 Directory successfully changed.
main:health.pl:83): if (!$ftps->put("$input_csv_file","/$input_dir/$input_csv_file")) {
DB<1>
>>> PBSZ 0
<<< 200 PBSZ set to 0.
>>> PROT P
<<< 200 PROT now Private.
>>> PASV
<<< 227 Entering Passive Mode (PUBLIC IP)
connect: Connection refused at /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/Net/SSLeay/Handle.pm line 229.
at /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/Net/SSLeay/Handle.pm line 229
Net::SSLeay::Handle::make_socket('Net::SSLeay::Handle', PUBLIC IP, 9006) called at /usr/lib/perl5/site_perl/5.8.5/Net/FTPSSL.pm line 173
Net::FTPSSL:asv('Net::FTPSSL=GLOB(0x9f69890)') called at /usr/lib/perl5/site_perl/5.8.5/Net/FTPSSL.pm line 385
Net::FTPSSL:ut('Net::FTPSSL=GLOB(0x9f69890)', 'Test.csv', '/input/Test.csv') called at health.pl line 83
Anybody have any ideas? I'm fresh out.


Ok I think I see the problem in the debug. If I use the internal or localhost the script dies when trying to send a file via passive. We can see in the debug that the Public IP is being passed and not the internal network IP. As soon as I change the connection string to the public IP address instead of using the local internal IP everything works. So this might be a VSFTPD issue with passive transfers, or is my thinking wrong on this?

Thanks,
Eric

Last edited by Styles; 02-10-2009 at 05:45 PM..