Hi All,

I'm unsure what to do next.  I hope someone has beaten this before and
hears my cry for help.

I've implemented a script to transfer files to a client, and to pick files
up.  There is a firewall, though I don't know much about it.  I instantiate
the Net::FTP object with Passive => 1.

The transfers are running several times a day.  Some of them are hanging.
The client may get a zero byte file before the process drops.  We may get
the file, but the job wont recognize this and errors out.

I know that's a pretty vague description of the problem, but I don't know
much more to add.  The scripts are really very simple.  In essence:


      my $ftp = Net::FTP->new($server, Passive => 1);

      $cnt = 0;
      while( ! $ftp->login($login, $password) ){
            $cnt++;
            if ( $cnt >= 3 ){
                  # error handling stuff
                  exit -1;
            }
            sleep (2);
      }

      $ftp->binary;

      $cnt = 0;
      while ( ! $ftp->put($localfile,$remotefile)){
            $cnt ++;
            if ( $cnt >= 3 ){
                  # error handling stuff
                  exit -2;
            }
            sleep (2);
      }

      $cnt = 0;
      while (! $ftp->ls($remotefile) ){
            $cnt++;
            if ( $cnt >= 3 ){
                  # error handling stuff
                  exit -3;
            }
            sleep (2);
      }

      $ftp->quit();


In this case a put might hang (on the way back it's the get's chance).

Not surprisingly, jobs on our intranet have no such problems.

Any help welcome!

TIA
Peter





-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to