Operating System - HP-UX
1752801 Members
5822 Online
108789 Solutions
New Discussion юеВ

Re: ls command is hang when ftp

 
SOLVED
Go to solution
Hakki Aydin Ucar
Honored Contributor

Re: ls command is hang when ftp

may be some kind of performance issue;
did you check the the directory you tried to ls by issuing bdf command to see usage percentage ?
Steven Schweda
Honored Contributor

Re: ls command is hang when ftp

> Sorry because not elaborate. [...]

Ok. I read this a few more times. Tell me
if I understand what you're doing.

1. You are running the FTP client program
("ftp") on an HP-UX system ("A"), and
connecting to the FTP server on a Solaris
system ("B").

2. You can get connected (logged in).

3. Simple commands like "cd" work.

4. An "ls" command hangs.

5. If you run the FTP client program on a
some system other than "A", and connect to
the same FTP server, as the same user,
everything works.

General advice:

Actual "uname -a" output from each system
would say more than "HP-UX" or "Solaris".

Showing actual commands with their actual
output would be more helpful than your
description of what you did.

Now, assuming that I understand what's
happening, ...

> [...] Is it because the chroot also?

I'd ignore all that advice about "chroot".
As you can see, the problem is _not_ with
your (Solaris) FTP server.

Questions:

Ok, "ls" hangs. Does "get some_file" also
hang?

Does FTP work from the HP-UX system to
itself?

Is the HP-UX system on the same physical
network as the other system(s), or is there
more network stuff (routers, firewalls, ..)
between the HP-UX system and the other
system(s)?


> Did you try using "passive".

> What is passive?

"man ftp", look for "passive". Normal FTP
uses separate ports for "control" and "data".
Passive FTP uses only the "control" port, so
it often works better when a firewall blocks
communication on the "data" port. Knowing
nothing about your network, I'd say that this
may be the best suggestion you've gotten.


> Attached is my ftpaccess.

No, it's not. But we probably don't need it.

> I don't think ftpaccess is a reason

I agree.

> because I can ftp to other HP-UX machine
> without any problem.

Again, this is not clear. Now you're talking
about using some other HP-UX system as an FTP
_server_? One reason that you're not getting
much good advice here may be that no one
really understands what you're doing.
Clearer explanations might help.
mohdamir
Frequent Advisor

Re: ls command is hang when ftp

Steven,

5. If you run the FTP client program on a
some system other than "A", and connect to
the same FTP server, as the same user,
everything works.

General advice:

Actual "uname -a" output from each system
would say more than "HP-UX" or "Solaris".

Showing actual commands with their actual
output would be more helpful than your
description of what you did.

Ans: Server A:
#uname -a
HP-UX S02CJ091 B.11.31 U ia64 1571896790 unlimited-user license.

Server B:
#uname -a
SunOS 5.10 Generic_127127-11

Server C:
# uname -a
SunOS S34TD109 5.8 Generic_117350-55 sun4u sparc SUNW,Sun-Fire-V440

Now, assuming that I understand what's
happening, ...

> [...] Is it because the chroot also?

I'd ignore all that advice about "chroot".
As you can see, the problem is _not_ with
your (Solaris) FTP server.

Questions:

Ok, "ls" hangs. Does "get some_file" also
hang?

Ans: Yes, it also hang.

Does FTP work from the HP-UX system to
itself?

Ans: Yes

Is the HP-UX system on the same physical
network as the other system(s), or is there
more network stuff (routers, firewalls, ..)
between the HP-UX system and the other
system(s)?

Ans: HP-UX (System A) and Sun Solaris (System C) are in same physical network. But Sun Solaris (System B) is not. It reside in other country.

> Did you try using "passive".

> What is passive?

"man ftp", look for "passive". Normal FTP
uses separate ports for "control" and "data".
Passive FTP uses only the "control" port, so
it often works better when a firewall blocks
communication on the "data" port. Knowing
nothing about your network, I'd say that this
may be the best suggestion you've gotten.

Ans: So i've to ask the Sun Solaris admin to open some ports?

Again, this is not clear. Now you're talking
about using some other HP-UX system as an FTP
_server_? One reason that you're not getting
much good advice here may be that no one
really understands what you're doing.
Clearer explanations might help.

Ans: I'm using the other HP-UX machine (System D if you want to name it) to proof that this error is not because of the chroot or ftpaccess.
Steven Schweda
Honored Contributor

Re: ls command is hang when ftp

> Ok, "ls" hangs. Does "get some_file" also
hang?
>
> Ans: Yes, it also hang.
>
> Does FTP work from the HP-UX system to
itself?
>
> Ans: Yes

To me, that makes it look as if the FTP
server is working correctly, but there's
some firewall somewhere which is blocking the
FTP data channel. "ls" and "get" both do a
data transfer. With active FTP, they both
use the data channel. If that port is
blocked, then that would explain the hanging.

> Ans: So i've to ask the Sun Solaris admin
> to open some ports?

Something like that, or else use passive FTP.
Passive FTP is easy, and you can do it
yourself. I don't know who is blocking the
FTP data channel, so I don't know what to
change to fix it that way.

> [...] proof that this error is not because
> of the chroot or ftpaccess.

Ok. (I never thought that it was.)


> > Did you try using "passive".
>
> > What is passive?
>
> "man ftp", look for "passive". [...]
> Knowing
> nothing about your network, I'd say that this
> may be the best suggestion you've gotten.

As I/we said, try passive FTP, and see if
that helps. It still sounds to me like the
best idea.
mohdamir
Frequent Advisor

Re: ls command is hang when ftp

Thanks Steve and others,

You are the great! I just use:

# ftp -p

That's it.. (^_^)
mohdamir
Frequent Advisor

Re: ls command is hang when ftp

See above comment.
TQ