Operating System - HP-UX
1752421 Members
5977 Online
108788 Solutions
New Discussion юеВ

Re: ftp: connect: Connection refused

 
Khashru
Valued Contributor

ftp: connect: Connection refused

hi i got a new hpux box with 11.31. when i am trying to ftp it is saying ftp: connect: Connection refused.

What is the workaround
21 REPLIES 21
James R. Ferguson
Acclaimed Contributor

Re: ftp: connect: Connection refused

Hi:

Make sure to uncomment the 'ftp' entry in '/etc/inetd.conf'. Then do:

# inetd -c

Regards!

...JRF...
Khashru
Valued Contributor

Re: ftp: connect: Connection refused

it is there.
ftp stream tcp6 nowait root /usr/lbin/ftpd ftpd -l

Sone was telliong by defauly hpux 11.31 does not have ftp istalled.
Steven Schweda
Honored Contributor

Re: ftp: connect: Connection refused

"Connection refused" normally means that you
can talk to the target system, but that
there's no FTP server running (or configured)
there.

Please show actual commands with actual
output.

grep '^ftp' /etc/inetd.conf

netstat -an | grep '*.21 '

ls -l /usr/lbin/ftpd

Around here:

dyi # grep '^ftp' /etc/inetd.conf
ftp stream tcp6 nowait root /usr/lbin/ftpd ftpd -l

The FTP server is configured.

dyi # netstat -an | grep '*.21 '
tcp 0 0 *.21 *.* LISTEN

It's listening for connections.

dyi # ls -l /usr/lbin/ftpd
-r-xr--r-- 1 bin bin 649448 Jan 12 2007 /usr/lbin/ftpd

The FTP server program exists.

> [...] when i am trying to ftp [...]

How? From where?

ftp localhost

Is there anything interesting in
"/var/adm/syslog/syslog.log"?

> # inetd -c

You did that?
Khashru
Valued Contributor

Re: ftp: connect: Connection refused

twra5000:/home/mayub :netstat -an | grep '*.21 '
tcp 0 0 *.21 *.* LISTEN
twra5000:/home/mayub :ls -l /usr/lbin/ftpd
/usr/lbin/ftpd not found
twra5000:/home/mayub :

It is saying ftpd not found.
Steven Schweda
Honored Contributor

Re: ftp: connect: Connection refused

> /usr/lbin/ftpd not found

That would explain the problem.

I don't know if it was never installed, or if
it has been removed, but it's not there, and
that is what inetd expects to run for an
incoming FTP connection.

It's been a while since I installed the OS on
my system, so I remember nothing, but I
clearly have this program where it's
expected.

dyi # uname -a
HP-UX dyi B.11.31 U ia64 4235313755 unlimited-user license
Jeeshan
Honored Contributor

Re: ftp: connect: Connection refused

Hi Khashru vai

please use tcp instead of tcp6 in /etc/inetd.conf file. then restart the daemon.
a warrior never quits
Khashru
Valued Contributor

Re: ftp: connect: Connection refused

i tried with tcp instead of tcp6. same result. Some one told me that ftp is not istalled automatically in 11.31. Do have to manually install it?

Ahsan please send me you mail address.
Steven Schweda
Honored Contributor

Re: ftp: connect: Connection refused

> please use tcp instead of tcp6 in
> /etc/inetd.conf file. then restart the
> daemon.

Do you think that this will (magically)
replace the missing file, "/usr/lbin/ftpd"?

Or do you think that that file is not needed?
Suraj K Sankari
Honored Contributor

Re: ftp: connect: Connection refused

Hi,
What is the error message you are getting if you do $ftp localhost

did you check your /etc/inetd.conf

$grep '^ftp' /etc/inetd.conf
ftp stream tcp6 nowait root /usr/lbin/ftpd ftpd -a -l

Do you have /var/adm/inetd.sec
if yes then what is the entry regarding ftp

are you getting ftp prompt ?

Suraj