Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
From the debug output it looks like the script is connecting using passive mode - you can see this from the line
Net::FTP=GLOB(0x9da13a0)>>> PASV
... it then times out for some reason - presumably because it is not receiving any data from ftp.cpan.org (maybe this is being firewalled out.
(more info on passive/active FTP here: http://slacksite.com/other/ftp.html)

... which is strange since when I run the same script it does not enter passive mode...
Net::FTP>>> Net::FTP(2.77) Net::FTP>>> Exporter(5.58) Net::FTP>>> Net::Cmd(2.28) Net::FTP>>> IO::Socket::INET(1.31) Net::FTP>>> IO::Socket(1.30) Net::FTP>>> IO::Handle(1.27) Net::FTP=GLOB(0x22d19c)<<< 220 Welcome to the ftp.linux.hr FTP service +. Net::FTP=GLOB(0x22d19c)>>> USER anonymous Net::FTP=GLOB(0x22d19c)<<< 331 Please specify the password. Net::FTP=GLOB(0x22d19c)>>> PASS .... Net::FTP=GLOB(0x22d19c)<<< 230- Net::FTP=GLOB(0x22d19c)<<< 230-Ovo je ftp.linux.hr, FTP posluzitelj Hr +vatske Udruge Linux Korisnika. Net::FTP=GLOB(0x22d19c)<<< 230- Net::FTP=GLOB(0x22d19c)<<< 230-Pogledajte README datoteku za opis sadr +zaja na nasem posluzitelju. Net::FTP=GLOB(0x22d19c)<<< 230- Net::FTP=GLOB(0x22d19c)<<< 230-CD ISO imagei su na iso.linux.hr! Net::FTP=GLOB(0x22d19c)<<< 230- Net::FTP=GLOB(0x22d19c)<<< 230- -- ftpadmin@linux.hr Net::FTP=GLOB(0x22d19c)<<< 230 Login successful. Net::FTP=GLOB(0x22d19c)>>> CWD /pub/CPAN Net::FTP=GLOB(0x22d19c)<<< 250-The Comprehensive Perl Archive Network +(http://www.cpan.org/) Net::FTP=GLOB(0x22d19c)<<< 250-master site has been from the very begi +nning (1995) hosted at FUNET, Net::FTP=GLOB(0x22d19c)<<< 250-the Finnish University NETwork. Net::FTP=GLOB(0x22d19c)<<< 250- Net::FTP=GLOB(0x22d19c)<<< 250- Net::FTP=GLOB(0x22d19c)<<< 250 Directory successfully changed. Net::FTP=GLOB(0x22d19c)>>> PORT 164,48,254,74,158,171 Net::FTP=GLOB(0x22d19c)<<< 200 PORT command successful. Consider using + PASV. Net::FTP=GLOB(0x22d19c)>>> RETR README.html Net::FTP=GLOB(0x22d19c)<<< 150 Opening BINARY mode data connection for + README.html (5804 bytes). Net::FTP=GLOB(0x22d19c)<<< 226 File send OK.
Maybe you can try active mode and see if that works. You can do this using the following line:
my $ftp=Net::FTP->new("ftp.cpan.org", Debug => 1, Passive => 0)
Hope that helps.

In reply to Re^3: Problem with Net::FTP by rpanman
in thread Problem with Net::FTP by cool

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (6)
As of 2024-04-16 17:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found