K
Ken Levy
I am having problems with FTP scripts "hanging".
Our script consists of a couple of "echo" commands and an command executing
the Microsoft FTP client in a .bat file.
This batch file is scheduled to execute every 15 minutes in Win 2000
Server's scheduled task list.
The output of the batch file commands and ftp script are written out to a
log file, so we can see what commands have been issued. See below for a
"sanitized" version of the log.
<<<BEGIN CAPTURED LOG>>>
--------------------------------------------------------------------------------------------------
--- Destination Inbound FTP - Destination_inbound_ftp15.bat
--- Started -KCFILE1- Wed 09/07/2005 8:00:01.06
ftp> Connected to tws.Destination.com.
open tws.Destination.com
220 guardian Microsoft FTP Service (Version 5.0).
User (tws.Destination.comnone)):
331 Password required for userid.
230 User userid logged in.
ftp> ftp>
Local directory now VNDRGRAF\XXXX.
ftp> LCD VNDRGRAF\XXXX
CD "Pub/"
250 CWD command successful.
ftp> BINARY
200 Type set to I.
ftp> GET SIMAGE_0.JPG SW_Regional_15.jpg
200 PORT command successful.
150 Opening BINARY mode data connection for SIMAGE_0.JPG(109999 bytes).
<<<END LOG>>>
The FTP task just hangs at this point, leaving the DOS box displayed. We
believe that an error in communications has occurred. Th session appears to
have timed out as a netstat command showed no sessions active when we found
the problem (about 15 minutes after the session had started).
We have tried to flush these "failures" by setting a time limit on the
execution of the scheduled task. For some reason, though, the time limit
doesn't seem to be honored and the DOS box hangs in limbo until we manually
close it. While it is hung, no new iterations of that scheduled task will
start.
We have seen this problem with connections to both Win 2000 Server and Win
2003 Server IIS FTP servers.
The see this problem perhaps 4-5 times a week with scripts that are run 24x7
at 10 minute intervals.
My questions are as follows:
1) Is there anything I can set to force the FTP client to shutdown if the
session hangs?
2) Why isn't the "Stop the task if it runs for . . ." on the scheduled task
settings panel not honored?
3) Can anyone suggest how to make these scripted FTP transfers more
reliable.
Thanks in advance for any help. Please post responses to the newsgroup.
Our script consists of a couple of "echo" commands and an command executing
the Microsoft FTP client in a .bat file.
This batch file is scheduled to execute every 15 minutes in Win 2000
Server's scheduled task list.
The output of the batch file commands and ftp script are written out to a
log file, so we can see what commands have been issued. See below for a
"sanitized" version of the log.
<<<BEGIN CAPTURED LOG>>>
--------------------------------------------------------------------------------------------------
--- Destination Inbound FTP - Destination_inbound_ftp15.bat
--- Started -KCFILE1- Wed 09/07/2005 8:00:01.06
ftp> Connected to tws.Destination.com.
open tws.Destination.com
220 guardian Microsoft FTP Service (Version 5.0).
User (tws.Destination.comnone)):
331 Password required for userid.
230 User userid logged in.
ftp> ftp>
Local directory now VNDRGRAF\XXXX.
ftp> LCD VNDRGRAF\XXXX
CD "Pub/"
250 CWD command successful.
ftp> BINARY
200 Type set to I.
ftp> GET SIMAGE_0.JPG SW_Regional_15.jpg
200 PORT command successful.
150 Opening BINARY mode data connection for SIMAGE_0.JPG(109999 bytes).
<<<END LOG>>>
The FTP task just hangs at this point, leaving the DOS box displayed. We
believe that an error in communications has occurred. Th session appears to
have timed out as a netstat command showed no sessions active when we found
the problem (about 15 minutes after the session had started).
We have tried to flush these "failures" by setting a time limit on the
execution of the scheduled task. For some reason, though, the time limit
doesn't seem to be honored and the DOS box hangs in limbo until we manually
close it. While it is hung, no new iterations of that scheduled task will
start.
We have seen this problem with connections to both Win 2000 Server and Win
2003 Server IIS FTP servers.
The see this problem perhaps 4-5 times a week with scripts that are run 24x7
at 10 minute intervals.
My questions are as follows:
1) Is there anything I can set to force the FTP client to shutdown if the
session hangs?
2) Why isn't the "Stop the task if it runs for . . ." on the scheduled task
settings panel not honored?
3) Can anyone suggest how to make these scripted FTP transfers more
reliable.
Thanks in advance for any help. Please post responses to the newsgroup.