1752783 Members
6259 Online
108789 Solutions
New Discussion юеВ

Re: FTP Hanging

 
SOLVED
Go to solution
Joe Milici
Advisor

FTP Hanging

We use the mget command on a windows server to retrieve files from a HP-UX 11.31 server. Some days it works fine and other times the ftp process will hang and we have to abort the process. If I use Relection FTP to download the files it works fine. Any thoughts on why the command line process hangs sporadically?
10 REPLIES 10
Steven Schweda
Honored Contributor

Re: FTP Hanging

> [...] why the command line process hangs
> sporadically?

That's the command-line FTP program on the
Windows system, when you do an "mget"? Is
the failure repeatable? (When it fails, can
you make it fail repeatedly?) Always the
same "mget" command? (Is it a secret, or can
you divulge the actual command(s)?)

How does the command-line FTP program on an
HP-UX system do in the same situation?

> Some days it works fine [...]

Is the problem day-related, or
directory-content-related, or entirely
unpredictable? Knowing nothing, I can
imagine potential problems if there are large
numbers of files involved.

> Any thoughts [...]

You need to play around more before you can
assign blame (always the most important step
in problem solving).

There may be debug options at each end which,
if enabled, could tell you who's doing what
when.

> If I use Relection FTP [...]

Not a useful description of what you're doing
in that situation.

> [...] a windows server [...]

Not a useful description of the software at
that end.
Bill Hassell
Honored Contributor

Re: FTP Hanging

If your windows box is behind a NAT router, you must use passive mode. Be sure to set this as the default before running mget.


Bill Hassell, sysadmin
Suraj K Sankari
Honored Contributor
Solution

Re: FTP Hanging

Hi,
Check this
1.nic speed at server
2.port speed at switch where server is connected.
same as other end

keep the speed same at both side for best performance

Suraj
Steven Schweda
Honored Contributor

Re: FTP Hanging

> If your windows box is behind a NAT router,
> you must use passive mode. [...]

Really? Although none of them runs Windows,
all my systems are behind a NAT router (Cisco
678 DSL modem/router) and I have no trouble
at all using active FTP.

Perhaps you need a better/smarter router.
What do you have that doesn't let you use
active FTP? (Or is this some old folk
(pseudo-) wisdom which you heard somewhere
and believed without evidence?)
Basheer_2
Trusted Contributor

Re: FTP Hanging

Your win script should include existence of file checking.

few reasons for ftp hanging or waiting:
1) there are no files in that dir that you are trying to retrieve.
2) check the unix folder name

try manually the steps you are doing from the win dos prompt. just repeat the steps from your win script
Joe Milici
Advisor

Re: FTP Hanging

Both servers are on an internal network connected to a gigabit switch. The command from the windows server is ftp -i -v -n -s...

There are about 250 files in the unix folder and we retrieve 25 of them. The largest is 15MB.

Reflections has a file transfer program so if I am connected to the unix server and select all of the files through the file transfer window they come down fine.
Steven Schweda
Honored Contributor

Re: FTP Hanging

> The command from the windows server is
> ftp -i -v -n -s...

Doesn't tell us what you did with it. For
example, the actual "mget" command.

> There are about [...]

Sounds harmless enough. My psychic powers
are too weak to tell me what the file names
are, or what your "mget" command requested,
so I don't know much more now than I did
before.

> Reflections has a file transfer program
> [...]

And if it doesn't use FTP, then it doesn't
tell us much about any FTP problem.

Did I miss something(s), or did I ask many
questions, and get very few answers?
Joe Milici
Advisor

Re: FTP Hanging

It appears that there was some type of network issue causing the FTP service to hang. We resolved and everything is running normally.

Thanks
Bill Hassell
Honored Contributor

Re: FTP Hanging

> Steven: Perhaps you need a better/smarter router.

Possibly, but not usually an option in most companies.


> What do you have that doesn't let you use
active FTP? (Or is this some old folk
(pseudo-) wisdom which you heard somewhere
and believed without evidence?)

Actually several years of working with commercial firewalls and endless disconnect issues. I first saw the problem with HP's Response Center site about 15 years ago and still today, customers submitting dumps or other information files are given the passive mode recommendation for uploading. As you will see from the references below, active and passive modes both have firewall and router issues depending on the rulesets chosen by the netadmins.

http://en.wikipedia.org/wiki/File_Transfer_Protocol

http://slacksite.com/other/ftp.html

http://www.openbsd.org/faq/pf/ftp.html


Bill Hassell, sysadmin