Re: Stuck in the put function when using Net::FTP
[email protected] (Jing Cai) Mon, 18 Jun 2001 11:25:15 -0400
| Newsgroups | perl.libnet |
|---|---|
| Organization | HNS |
| Message-ID | <[email protected]> |
The output when I used Debug option is: # ./perf_mon.sh Net::FTP: Net::FTP(2.56) Net::FTP: Exporter Net::FTP: Net::Cmd(2.18) Net::FTP: IO::Socket::INET Net::FTP: IO::Socket(1.1603) Net::FTP: IO::Handle(1.1505) Net::FTP=GLOB(0x3d94d0)<<< 220 dpc_lab_ftp Microsoft FTP Service (Version 4.0). Net::FTP=GLOB(0x3d94d0)>>> user dpcuser Net::FTP=GLOB(0x3d94d0)<<< 331 Password required for dpcuser. Net::FTP=GLOB(0x3d94d0)>>> PASS .... Net::FTP=GLOB(0x3d94d0)<<< 230-DIRECPC ENGINEERING LAB FTP Net::FTP=GLOB(0x3d94d0)<<< 230 User dpcuser logged in. Net::FTP=GLOB(0x3d94d0)>>> TYPE I Net::FTP=GLOB(0x3d94d0)<<< 200 Type set to I. Net::FTP=GLOB(0x3d94d0)>>> PWD Net::FTP=GLOB(0x3d94d0)<<< 257 "/" is current directory. Net::FTP=GLOB(0x3d94d0)>>> CWD /jicai Net::FTP=GLOB(0x3d94d0)<<< 250 CWD command successful. Net::FTP=GLOB(0x3d94d0)>>> PORT 139,85,126,58,191,8 Net::FTP=GLOB(0x3d94d0)<<< 200 PORT command successful. Net::FTP=GLOB(0x3d94d0)>>> STOR 06131802.pmt.Z.ace Net::FTP=GLOB(0x3d94d0)<<< 150 Opening BINARY mode data connection for 06131802. pmt.Z.ace. Net::FTP=GLOB(0x3d94d0)<<< 226 Transfer complete. Net::FTP=GLOB(0x3d94d0)>>> PORT 139,85,126,58,191,9 Net::FTP=GLOB(0x3d94d0)<<< 200 PORT command successful. Net::FTP=GLOB(0x3d94d0)>>> STOR 06131803.pmt.Z.ace Net::FTP=GLOB(0x3d94d0): Timeout at txer.pl line 1273 Net::FTP=GLOB(0x3f6df8)<<< 220 dpc_lab_ftp Microsoft FTP Service (Version 4.0). Net::FTP=GLOB(0x3f6df8)>>> user dpcuser Net::FTP=GLOB(0x3f6df8)<<< 331 Password required for dpcuser. Net::FTP=GLOB(0x3f6df8)>>> PASS .... Net::FTP=GLOB(0x3f6df8)<<< 230-DIRECPC ENGINEERING LAB FTP Net::FTP=GLOB(0x3f6df8)<<< 230 User dpcuser logged in. Net::FTP=GLOB(0x3f6df8)>>> TYPE I Net::FTP=GLOB(0x3f6df8)<<< 200 Type set to I. Net::FTP=GLOB(0x3f6df8)>>> PWD Net::FTP=GLOB(0x3f6df8)<<< 257 "/" is current directory. Net::FTP=GLOB(0x3f6df8)>>> CWD /jicai Net::FTP=GLOB(0x3f6df8)<<< 250 CWD command successful. Net::FTP=GLOB(0x3f6df8)>>> PORT 139,85,126,58,191,11 Net::FTP=GLOB(0x3f6df8)<<< 200 PORT command successful. Net::FTP=GLOB(0x3f6df8)>>> STOR 06131833.pmt.Z.ace Net::FTP=GLOB(0x3f6df8)<<< 150 Opening BINARY mode data connection for 06131833. pmt.Z.ace. Net::FTP=GLOB(0x3f6df8)<<< 226 Transfer complete. Net::FTP=GLOB(0x3f6df8)>>> PORT 139,85,126,58,191,12 Net::FTP=GLOB(0x3f6df8)<<< 200 PORT command successful. Net::FTP=GLOB(0x3f6df8)>>> STOR 06131803.pmt.Z.ace Net::FTP=GLOB(0x3f6df8)<<< 150 Opening BINARY mode data connection for 06131803. pmt.Z.ace. Net::FTP=GLOB(0x3f6df8)<<< 226 Transfer complete. Net::FTP=GLOB(0x3f6df8)>>> PORT 139,85,126,58,191,13 Net::FTP=GLOB(0x3f6df8)<<< 200 PORT command successful. Net::FTP=GLOB(0x3f6df8)>>> STOR 06131804.pmt.Z.ace Net::FTP=GLOB(0x3f6df8)<<< 150 Opening BINARY mode data connection for 06131804. pmt.Z.ace. Do you have any idea to fix it? I tried to use a timer function to detect the stuck, then re-initialize the connection, but it stuck again in cwd function. Thanks, Jing Terrence Monroe Brannon wrote: > I think the first step is to show us the output of your usage of > Net::FTP when you call the constructor with its Debug option enabled per > its documentation. > > Jing Cai wrote: > > > > Hi, > > > > Some time the perl script stuck in the put function when I use Net::FTP > > module. It will never come out of this function. Most time it works > > fine. > > > > Is there any easy way to solve this problem? > > > > I am thinking about to use $SIG(ALRM) to check the status of ftp > > connection and reconnect it if it is stuck. Does this will help to get > > out of put function? > > > > I am using libnet v 1.0703 under Solaris v2.6 with Perl v5.005 > > > > Thanks, > > > > Jing