1753529 Members
5083 Online
108795 Solutions
New Discussion юеВ

Re: ftp issue

 
SOLVED
Go to solution
infarakesh
Advisor

ftp issue

Unabel to enable ftp.

errors observed:

1) inetd[1501]: ftp/tcp: Unknown service
2) # ftp 0
ftp: connect: Connection refused
ftp>


inputs:

1) # grep -i ftp services
ftp-data 20/tcp # File Transfer Protocol (Data)
ftp 21/tcp # File Transfer Protocol (Control)
tftp 69/udp # Trivial File Transfer Protocol
sftp 115/tcp # Simple File Transfer Protocol
bftp 152/tcp # Background File Transfer Protocol
ftp-ftam 8868/tcp # FTP->FTAM Gateway

2) # grep -i ftp inetd.conf
#ftp stream tcp nowait root /usr/lbin/ftpd ftpd -l -u 22
ftp stream tcp nowait root /usr/lbin/ftpd ftpd -l
ftp stream tcp6 nowait root /usr/lbin/ftpd ftpd -l
# Before uncommenting the "tftp" entry below, please make sure
# that you have a "tftp" user in /etc/passwd. If you don't
# have one, please consult the tftpd(1M) manual entry for
#tftp dgram udp wait root /usr/lbin/tftpd tftpd
#


3) # ls -l /usr/lbin/ftpd
-r-xr--r-- 1 bin bin 610120 Nov 10 2006 /usr/lbin/ftpd
#


4) # ls -l services
-rw-r--r-- 1 bin bin 11545 May 31 14:53 services
30 REPLIES 30
infarakesh
Advisor

Re: ftp issue

HP-UX B.11.23 U ia64 0242525198 unlimited-user license
#
infarakesh
Advisor

Re: ftp issue

# netstat -an|grep '*.21'
tcp 0 0 *.2121 *.* LISTEN
tcp 0 0 *.2148 *.* LISTEN
udp 0 0 *.2121 *.*
udp 0 0 *.2148 *.*
#
Patrick Wallek
Honored Contributor

Re: ftp issue

There appears to be an error either in /etc/services or /etc/inetd.conf as there does not appear to be anything listening on port 21.

Are there any error messages in /var/adm/syslog/syslog.log?

Can you try running an 'inetd -c' and see what errors are reported and whether or not anything is generated in syslog.log?

Steven Schweda
Honored Contributor

Re: ftp issue

> # netstat -an|grep '*.21'
> [...]

Well, yeah. "Connection refused" made it
pretty clear that you aren't running the FTP
server.

> 1) # grep -i ftp services
> ftp-data 20/tcp # File Transfer Protocol (Data)
> ftp 21/tcp # File Transfer Protocol (Control)
> [...]

Assuming that "services" was "/etc/services",
then that looks ok to me.

> 1) inetd[1501]: ftp/tcp: Unknown service

If "/etc/services" is ok, but you get a
complaint like "Unknown service", then my
guess would be that you're not looking at the
same "services" data as inetd is. Are you
running NIS? LDAP? (Something else about
which I know nothing?)

cat /etc/nsswitch.conf

What's the history of this problem? Did FTP
ever work before on this system? What's
changed recently?
infarakesh
Advisor

Re: ftp issue

getting the below errors whle doing "inetd -c"

May 31 15:51:42 inescape inetd[1501]: Rereading configuration
May 31 15:51:42 inescape inetd[1501]: ftp/tcp: Unknown service
May 31 15:51:42 inescape inetd[1501]: telnet/tcp: Unknown service
May 31 15:51:24 inescape syslog: gethostbyaddr: inx174303.informatica.com. != 10.65.2.76
May 31 15:51:42 inescape above message repeats 3 times
May 31 15:51:42 inescape inetd[1501]: login/tcp: Unknown service
May 31 15:51:42 inescape inetd[1501]: shell/tcp: Unknown service
May 31 15:51:42 inescape inetd[1501]: ftp/tcp: Unknown service
May 31 15:51:42 inescape inetd[1501]: exec/tcp: Unknown service
May 31 15:51:42 inescape inetd[1501]: ntalk/udp: Unknown service
May 31 15:51:42 inescape inetd[1501]: auth/tcp: Unknown service
May 31 15:51:42 inescape inetd[1501]: printer/tcp: Unknown service
May 31 15:51:42 inescape inetd[1501]: daytime/tcp: Unknown service
May 31 15:51:42 inescape inetd[1501]: daytime/udp: Unknown service
May 31 15:51:42 inescape inetd[1501]: time/tcp: Unknown service
May 31 15:51:42 inescape inetd[1501]: echo/tcp: Unknown service
May 31 15:51:42 inescape inetd[1501]: echo/udp: Unknown service
May 31 15:51:42 inescape inetd[1501]: discard/tcp: Unknown service
May 31 15:51:42 inescape inetd[1501]: discard/udp: Unknown service
May 31 15:51:42 inescape inetd[1501]: chargen/tcp: Unknown service
May 31 15:51:42 inescape inetd[1501]: chargen/udp: Unknown service
May 31 15:51:42 inescape inetd[1501]: kshell/tcp: Unknown service
May 31 15:51:42 inescape inetd[1501]: klogin/tcp: Unknown service
May 31 15:51:42 inescape inetd[1501]: recserv/tcp: Unknown service
May 31 15:51:42 inescape inetd[1501]: dtspc/tcp: Unknown service
May 31 15:51:42 inescape inetd[1501]: swat/tcp: Unknown service
May 31 15:51:42 inescape inetd[1501]: hacl-probe/tcp: Unknown service
May 31 15:51:42 inescape inetd[1501]: registrar/tcp: Unknown service
May 31 15:51:42 inescape inetd[1501]: hacl-cfg/udp: Unknown service
May 31 15:51:42 inescape inetd[1501]: hacl-cfg/tcp: Unknown service
May 31 15:51:42 inescape inetd[1501]: Configuration complete

Steven Schweda
Honored Contributor

Re: ftp issue

> May 31 15:51:42 inescape inetd[1501]: : Unknown service

Sounds like a "services" data base problem,
doesn't it?
infarakesh
Advisor

Re: ftp issue

ftp never worked I guess.

This machine is of NIS client.

# ypwhich
spyder.xxxxx

nsswitch.conf file never existed. I added an hr back.. no luck though

# cat /etc/nsswitch.conf
#
# /etc/nsswitch.nis:
#
# @(#)B11.23_LR
#
# An example file that could be copied over to /etc/nsswitch.conf; it
# uses NIS (YP) in conjunction with files.
#

passwd: files nis
group: files nis
hosts: nis [NOTFOUND=return] files
ipnodes: files
networks: nis [NOTFOUND=return] files
protocols: nis [NOTFOUND=return] files
rpc: nis [NOTFOUND=return] files
publickey: nis [NOTFOUND=return] files
netgroup: nis [NOTFOUND=return] files
automount: files nis
aliases: files nis
services: files nis
#
infarakesh
Advisor

Re: ftp issue

I understood that it's services problem.. how to correct it?

In fact, I restored the original file w/o any luck
infarakesh
Advisor

Re: ftp issue

# cat /etc/nsswitch.conf|grep -i services
services: files nis
#