Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

NET::FTP trouble with SEQ?

by choeppner (Pilgrim)
on Oct 29, 2003 at 16:54 UTC ( [id://303047]=perlquestion: print w/replies, xml ) Need Help??

choeppner has asked for the wisdom of the Perl Monks concerning the following question:

Oh Wise Monks,

I have a functioning application and am having intermittent trouble with NET::FTP. The application logs into the FTP server, changes to a directory, gets the directory listing, and then downloads the files in that directory.

‘Sometimes’ along the way the FTP session will fail. The application can deal with the session getting terminated, the user runs the application again and gets what they want. The sometimes has become ‘fairly frequent’ now, and the end user has complained enough for me to get network capture logs to troubleshoot the issue.

What I see is the sequence numbers are getting off by one. In one case the SEQ number from the client side jumped back by one. In another case the SEQ number from the client side skipped ahead by one.

I am using the following lib versions as reported by the debug mode of the NET::FTP. This is running under “perl v5.6.1 built for MSWin32-x86-multi-thread.” All of this is running on Windows NT4 with SP6.

Net::FTP: Net::FTP(2.33) Net::FTP: Exporter(5.562) Net::FTP: Net::Cmd(2.11) Net::FTP: IO::Socket::INET(1.25) Net::FTP: IO::Socket(1.26) Net::FTP: IO::Handle(1.21)

Has anyone run into this type of trouble before? Am I at the beginning of a bug hunt in the IO::Socket or IO::Socket::INET modules? The FTP server is across the users WAN and makes multiple router hops and uses NAT routing at the end closest to the client. I have read about possible NAT servers causing trouble but can’t find anything more that just rumor/speculation.

Thanks in advance for your advice.


Charles
(The quiet Monk)

Replies are listed 'Best First'.
Re: NET::FTP trouble with SEQ?
by delirium (Chaplain) on Oct 29, 2003 at 20:45 UTC
    If you are talking about the packet sequence numbers being off, this is most likely a hardware or tcp/ip stack problem, unrelated to any application.

    I have seen this quite a bit while supporting routers at my last gig at an e-commerce company. A handful of customers would have packet sequence numbers jump, and we would miss a block of data that was the window size of the last good packet.

    If you believe Net::Ftp may have something to do with it, try using the Windows FTP client do do the comm. You could even call it from Perl with something like:

    `ftp -s scriptfile.txt`;

    scriptfile.txt would contain the open command, the username, password, and everything you would type to the ftp client if you were running it interactively. One command per line, just like a batch file.

    But, were I a gambling man, I'd bet money it ends up being hardware.

      Well, I am leaning toward this being a hardware/router problem, but I just wanted to ask.

      We will put network sniffers at both ends and wait for it to happen again. Then its down into the details of TCP traffic for lots of fun.

      Thanks for the response.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://303047]
Approved by BazB
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (6)
As of 2024-12-02 16:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found