Operating System - HP-UX
1825704 Members
3284 Online
109686 Solutions
New Discussion

telnet: tcp/telnet: unknown service

 

telnet: tcp/telnet: unknown service

Dear all,

I am facing some problems on HPux 11.23 (PA risc) system.

I am unable to use any of the inted services (server/client). it fails with unknow service/.conntction refused error.

/var/adm/rc.log identifying all services are unknown.

Feb 9 12:11:42 banpchp7 inetd[855]: Configuration complete
Feb 9 12:40:48 banpchp7 inetd[855]: Going down on signal 15
Feb 9 12:40:51 banpchp7 inetd[11057]: Reading configuration
Feb 9 12:40:51 banpchp7 inetd[11057]: ftp/tcp: Unknown service
Feb 9 12:40:51 banpchp7 inetd[11057]: telnet/tcp: Unknown service

/etc/inetd.conf, /etc/services, /etc/protocols, /var/adm/inetd.sec looks fine for me. (telnet & ftp was shows as tcp6, but changing to tcp was no help to me.
/etc/inetd.conf: the line
telnet stream tcp6 nowait root /usr/lbin/telnetd telnetd

is uncommented.

Thanks & regards,

James

12 REPLIES 12
Keith Bryson
Honored Contributor

Re: telnet: tcp/telnet: unknown service

Hi James

If you 'egrep "ftp|telnet" /etc/services' do you get a positive response?

Regards - Keith
Arse-cover at all costs

Re: telnet: tcp/telnet: unknown service

Keith,

Yes.Here is the output. (I compared with another working system 11.23 IPF, I could not find any difference in services, protocols, inetd.conf files.

#egrep "ftp|telnet" /etc/services
ftp-data 20/tcp # File Transfer Protocol (Data)
ftp 21/tcp # File Transfer Protocol (Control)
telnet 23/tcp # Virtual Terminal Protocol
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

Thanks,

James
Fred Ruffet
Honored Contributor

Re: telnet: tcp/telnet: unknown service

You said you changed in /etc/services from tcp6 to tcp, but your inetd.conf always shows tcp6.
change this line :
telnet stream tcp6 nowait root /usr/lbin/telnetd telnetd
to this one :
telnet stream tcp nowait root /usr/lbin/telnetd telnetd
then refresh inetd conf with "inetd -c" and retry a connection.

Regards,

Fred
--

"Reality is just a point of view." (P. K. D.)

Re: telnet: tcp/telnet: unknown service

Hi Fred,

That is because I changed it back later.

Now again tested & found this change does not help.

In fact, all inetd services (both udp & tcp)shows unknown service error in /var/adm/syslog/syslog.log

from /etc/inetd.conf
----
ftp stream tcp nowait root /usr/lbin/ftpd ftpd -l
telnet stream tcp nowait root /usr/lbin/telnetd telnetd

from /var/adm/syslog/syslog.log
--------------------------------
Feb 9 12:40:51 banpchp7 inetd[11057]: Configuration complete
Feb 9 14:24:00 banpchp7 inetd[11057]: Rereading configuration
Feb 9 14:24:00 banpchp7 inetd[11057]: ftp/tcp: Unknown service
Feb 9 14:24:00 banpchp7 inetd[11057]: telnet/tcp: Unknown service
Feb 9 14:24:00 banpchp7 inetd[11057]: login/tcp: Unknown service
Feb 9 14:24:00 banpchp7 inetd[11057]: shell/tcp: Unknown service
Feb 9 14:24:00 banpchp7 inetd[11057]: exec/tcp: Unknown service
Feb 9 14:24:00 banpchp7 inetd[11057]: ntalk/udp: Unknown service
Feb 9 14:24:00 banpchp7 inetd[11057]: auth/tcp: Unknown service
Feb 9 14:24:00 banpchp7 inetd[11057]: printer/tcp: Unknown service
Feb 9 14:24:00 banpchp7 inetd[11057]: daytime/tcp: Unknown service
Feb 9 14:24:00 banpchp7 inetd[11057]: daytime/udp: Unknown service
Feb 9 14:24:00 banpchp7 inetd[11057]: time/tcp: Unknown service
Feb 9 14:24:00 banpchp7 inetd[11057]: echo/tcp: Unknown service
Feb 9 14:24:00 banpchp7 inetd[11057]: echo/udp: Unknown service
Feb 9 14:24:00 banpchp7 inetd[11057]: discard/tcp: Unknown service
Feb 9 14:24:00 banpchp7 inetd[11057]: discard/udp: Unknown service
Feb 9 14:24:00 banpchp7 inetd[11057]: chargen/tcp: Unknown service
Feb 9 14:24:00 banpchp7 inetd[11057]: chargen/udp: Unknown service
Feb 9 14:24:00 banpchp7 inetd[11057]: kshell/tcp: Unknown service
Feb 9 14:24:00 banpchp7 inetd[11057]: klogin/tcp: Unknown service
Feb 9 14:24:00 banpchp7 inetd[11057]: dtspc/tcp: Unknown service
Feb 9 14:24:00 banpchp7 inetd[11057]: swat/tcp: Unknown service
Feb 9 14:24:00 banpchp7 inetd[11057]: hacl-probe/tcp: Unknown service
Feb 9 14:24:00 banpchp7 inetd[11057]: registrar/tcp: Unknown service
Feb 9 14:24:00 banpchp7 inetd[11057]: hacl-cfg/udp: Unknown service
Feb 9 14:24:00 banpchp7 inetd[11057]: hacl-cfg/tcp: Unknown service
Feb 9 14:24:00 banpchp7 inetd[11057]: recserv/tcp: Unknown service
Feb 9 14:24:00 banpchp7 inetd[11057]: Configuration complete

Regards,

James

Keith Bryson
Honored Contributor

Re: telnet: tcp/telnet: unknown service

James

Just to check the obvious, what is the result of a 'll /usr/lbin/telnetd'?

Keith
Arse-cover at all costs

Re: telnet: tcp/telnet: unknown service

Keith,

Here is the output,

bash-3.00# ll /usr/lbin/telnetd
-r-xr--r-- 1 bin bin 143360 Aug 27 06:55 /usr/lbin/telnetd

bash-3.00# telnet
telnet> open 172.22.43.15
telnet: tcp/telnet: unknown service
telnet> exit
?Invalid command
telnet> quit

Regards,

James
Robert-Jan Goossens_1
Honored Contributor

Re: telnet: tcp/telnet: unknown service

Hi James,

Could you post

# ll /etc/services
-r--r--r-- 1 bin bin 9560 Feb 7 12:03 /etc/services
# ll /etc/inetd.conf
-r--r--r-- 1 root sys 4489 Mar 10 2003 /etc/inetd.conf

Regards,
Robert-Jan

Re: telnet: tcp/telnet: unknown service

Robert-Jan

Here are they

bash-3.00# ls -l /etc/inetd.conf
-rw-r--r-- 1 root sys 4764 Feb 9 14:23 /etc/inetd.conf
bash-3.00# ls -l /etc/services
-r--r--r-- 1 bin bin 11655 Oct 25 23:40 /etc/services
Fred Ruffet
Honored Contributor

Re: telnet: tcp/telnet: unknown service

Also, let us know what is your /etc/nsswitch.conf content. Maybe you're looking for a non-existent nis server to resolve services...

Regards,

Fred
--

"Reality is just a point of view." (P. K. D.)

Re: telnet: tcp/telnet: unknown service

Hi Robert,
I could not attach /etc/inetd.conf. Here is it

James

Re: telnet: tcp/telnet: unknown service

Fred,

Yeah.That is correct. It is name service switch.

I did not create one /etc/nsswitch.conf , but wasusing NIS. NIS server cannot provide info on services as I did not create maps for services.

bash-3.00# ls -l /etc/nss*
-r--r--r-- 1 bin bin 566 Sep 3 2003 /etc/nsswitch.compat
-r--r--r-- 1 bin bin 391 Sep 3 2003 /etc/nsswitch.files
-r--r--r-- 1 bin bin 615 Sep 3 2003 /etc/nsswitch.hp_defaults
-r--r--r-- 1 bin bin 551 Sep 3 2003 /etc/nsswitch.nis
-r--r--r-- 1 bin bin 604 Sep 3 2003 /etc/nsswitch.nisplus


I created /etc/nsswitch.conf and it is working now.

Feb 9 15:56:07 banpchp7 inetd[852]: Reading configuration
Feb 9 15:56:07 banpchp7 inetd[852]: ftp/tcp: Added service, server /usr/lbin/ft
pd
Feb 9 15:56:07 banpchp7 inetd[852]: telnet/tcp: Added service, server /usr/lbin
/telnetd


Thanks for your great help

James

Re: telnet: tcp/telnet: unknown service

/etc/nsswitch.conf creation and customisation solved the problem

James