Operating System - HP-UX
1836593 Members
1507 Online
110102 Solutions
New Discussion

Re: ftp hangs and loss of prompt

 
Aziz Zouagui
Frequent Advisor

ftp hangs and loss of prompt

Hi,

Whenever I ftp from an HP-UX 11 system to an NT box outside the network, whatever command I use I never get the prompt back unless I hit a CTRL-C then I get the prompt back.

The problem with this is that I want to automate this into a script that has to run unattended to ftp multiple files.

Has anyone found a solution to this problem, some have mentioned firewall issues, it is not a firewall problem because I can use my desktop (Windows98) to ftp to the same box without any problems. This is only happening when I ftp from HP-UX 11 to an NT system. The ironic thing is that this problem is intermittent. Sometimes it works and sometimes it doesn't, meaning that the ftp works without hanging.

If anyone knows a solution to this problem, please either respond here or email me at aziz@btg.com

Thank you.
9 REPLIES 9
Ceesjan van Hattum
Esteemed Contributor

Re: ftp hangs and loss of prompt

Do you have the same problem i you ftp in the upposite direction ?
A->put->B
B->get->A
If you pull files to your own host, try to push these files to your host.
Regards,
Ceesjan
Jeff Schussele
Honored Contributor

Re: ftp hangs and loss of prompt

Aziz,

When you seem to hang, do a netstat -an & see if you have a socket in FIN_WAIT or FIN_WAIT_2 to that NT system.
If so this is a known NT problem addresed in the MSDN Knowledge Base - #Q254930.
See this earlier thread:

http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xd2781cc6003bd6118fff0090279cd0f9,00.html

HTH,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Aziz Zouagui
Frequent Advisor

Re: ftp hangs and loss of prompt

$ netstat -an|grep 64.14
tcp 0 0 199.29.53.89.64173 64.14.200.10.20 ESTABLISHED
tcp 0 0 199.29.53.89.64172 64.14.200.10.21 ESTABLISHED

I don't see a FIN_WAIT on the screen dump of netstat -an. This is what I get when I use the ftp to this NT system after I issue an ls -lt commnad.
-------------------------------------------
220 scesweb1 Microsoft FTP Service (Version 4.0).
331 Password required for BTG.
230 User BTG logged in.
Remote system type is Windows_NT.
ftp> ls -ltr
200 PORT command successful.
150 Opening ASCII mode data connection for /bin/ls.
04-07-02 03:10PM 4 test.txt.txt
04-07-02 02:03PM olddmp_01apr02
04-07-02 01:28PM 226901968 full_TTNFNP1.dmp_3.Z
04-07-02 01:28PM 297475023 full_TTNFNP1.dmp_1.Z
04-07-02 01:27PM 455770502 full_TTNFNP1.dmp_2.Z
04-07-02 01:23PM 434515039 full_TTNFNP1.dmp_0.Z

-----------------------------------------
As you can see, I never get the ftp prompt back, Returns alone, don't do anything, CTRL-C is the only key that brings back the prompt.

Sandip Ghosh
Honored Contributor

Re: ftp hangs and loss of prompt

You can use this script

ftp -i -n <<-EOF
open www.xxx.xx
user user_name password
bin
put file_log
quit
EOF

Sandip
Good Luck!!!
Jeff Schussele
Honored Contributor

Re: ftp hangs and loss of prompt

Does this occur in any & all dirs?
Possible hidden file in that dir?

Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Aziz Zouagui
Frequent Advisor

Re: ftp hangs and loss of prompt

I take that back, after I issued just the netstat command without any parameters, I was able to see the FIN_WAIT_2 state on the server I am running the FTP to.

---------------------------------------------
$netstat

tcp 0 0 ttnfs1.btg.com.registrar
ttnfs1.btg.com.49293 ESTABLISHED
tcp 0 0 ttnfs1.btg.com.64216 64.14.200.10.ftp-data ESTABLISHED
tcp 0 0 ttnfs1.btg.com.64209 64.14.200.10.ftp-data FIN_WAIT_2
tcp 0 0 ttnfs1.btg.com.64173 64.14.200.10.ftp-data FIN_WAIT_2
tcp 0 0 ttnfs1.btg.com.64172 64.14.200.10.ftp ESTABLISHED
-----------------------------------------------

Any other suggestions ?
Jeff Schussele
Honored Contributor

Re: ftp hangs and loss of prompt

I would get that patch from M$ - may need to go up to NT SP6A beforehand - & test again after application.
NT - gotta love it -- NOT!

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Ron Kinner
Honored Contributor

Re: ftp hangs and loss of prompt

I had so many requests for the patch that I stuck it on one of my websites.

Go to my genealogy website at:

http://www.geocities.com/heartland/9670/

Hidden down on the bottom of the page is a link labeled TCP/IP Fix. Click on it and it will let you download the fix for LAST ACK/FIN_WAIT_2.

It's a zip file with password mssux which was made with CAM UNZIP if you have problems with it. Extract it to a folder and double click on hotfix.exe and it will install it automatically. Will need to reboot afterwards. Works fine with NT SP6a.

Ron
Aziz Zouagui
Frequent Advisor

Re: ftp hangs and loss of prompt

Thank you for everyone who responded, the remote site is downloading the patch and they will apply it eventually. In the mean time I, am going to look for other alternatives to get these files downloaded.

Again, many thanks to all of you.

Aziz.