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

Greetings!

First off, I'm running Perl v5.10.1 on AIX 7.1. The script I'm having trouble with has worked for years. What has changed is our proxy server.

We are having timeout issue, though probably not the type you are thinking about. It isn't a case of connectivity loss that the timeout value could help.

What appears to be happening is that the command channel isn't sending any packets while we are transferring a large file on the data channel so the proxy server, an IBM DataPower, is dropping that command channel after 2.5 minutes. The upload continues to work and the file completes being sent, but since the port 21 connection was torn down it is seen as a failure.

No one on our staff nor IBM can come up with a setting that helps this. This does not happen when using the command line ftp on AIX or Linux, only with Net::FTP.

Is there some way to tell Net::FTP to send some kind of keep-alive packet every x seconds down that command channel?

Any thoughts would be greatly appreciated.

--Zeke

  • Comment on Net::FTP timeout - Command channel issue

Replies are listed 'Best First'.
Re: Net::FTP timeout - Command channel issue
by Lotus1 (Vicar) on Sep 06, 2018 at 02:06 UTC

    From Net::FTP:

    When reporting bugs/problems please include as much information as possible. It may be difficult for me to reproduce the problem as almost every setup is different.

    A small script which yields the problem will probably be of help. It would also be useful if this script was run with the extra options Debug => 1 passed to the constructor, and the output sent with the bug report. If you cannot include a small script then please include a Debug trace from a run of your program which does yield the problem.

    Please create and post a small test program with Debug enabled so that we know the configuration you're using such as Active/Passive and provide the output. Unfortunately the link to the autoftp.pl example program seems to be broken at Perldoc but you can find the source at https://github.com/cabletie/nrpod/blob/master/autoftp-2.4.1/autoftp. Are you setting a timeout value in your program?

    Edit: I tried again and the Example link at Net::FTP worked.

Re: Net::FTP timeout - Command channel issue
by Anonymous Monk on Sep 10, 2018 at 17:20 UTC
    What has changed is our proxy server.
    This is where I would look. If you're sending FTP, you need to open arbitrary local ports to send to the client and I suspect your proxy isn't forwarding the connection. If not, maybe it's a some kind of keep-alive bug with Net::FTP, but I doubt it.