Operating System - HP-UX
1819901 Members
2546 Online
109607 Solutions
New Discussion юеВ

Re: inetd / Unknown service

 
mazhead
New Member

inetd / Unknown service

Hello everyone,
I encountered a strange problem with Unknown service inside syslog.
Example:
Jan 29 17:17:28 inetd[2177]: recserv/tcp: Unknown service
Jan 29 17:17:28 inetd[2177]: swat/tcp: Unknown service
Jan 29 17:17:28 inetd[2177]: sysmsg/tcp: Unknown service
Jan 29 17:17:28 inetd[2177]: instl_boots/udp: Unknown service
Jan 29 17:17:28 inetd[2177]: registrar/tcp: Unknown service

Lets take registrar:
/etc/inetd.conf:
registrar stream tcp nowait root /etc/opt/resmon/lbin/registrar /etc/opt/resmon/lbin/registrar

/etc/services:
registrar 1712/tcp # resource monitoring service
registrar 1712/udp # resource monitoring service

I searched the forums and found that it could be due a corrupt nsswitch.conf, I removed it and rebooted to test if the hp_default kicks in. No luck there (the messages above are already after reboot).

File permissions:
-r--r--r-- 1 bin bin 11105 Jan 29 17:17 /etc/services
-rw-r--r-- 1 root sys 4778 Jan 29 14:58 /etc/inetd.conf

Running on:
HP-UX B.11.11 U 9000/800

Tell me if you need any more info.
4 REPLIES 4
Steven E. Protter
Exalted Contributor

Re: inetd / Unknown service

Shalom,

I'm, not sure there is a relationship between /etc/services entries and what inetd.conf.

1) You need a valid nsswitch.conf file for yoursystem to function normally, including installation of patches and queries on the depot database.

2) Check the errors against /etc/service entires. There should be coresponding entries. If not, get the entries in from a system that is working correctly. Don't take the whole file from another system, this may make the problem worse.

3) Perhaps just restart inetd

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
A. Clay Stephenson
Acclaimed Contributor

Re: inetd / Unknown service

What you assume is the default behavior for services lookups and what is the actual behavior are two different things. Without an nsswitch.conf entry for services, NIS is searched and if not found the behavior is to return. Man 4 nsswich.conf for details. The "fix" is your case is to either change nsswitch.conf to look at files only or restore the nsswitch.conf file to its original state and insert the missing entries in the services NIS map.
If it ain't broke, I can fix that.
mazhead
New Member

Re: inetd / Unknown service

Thanks for the pointers.
Was nsswitch.conf afterall. Had to change the services to be taken from files not from nis.


Thanks
A. Clay Stephenson
Acclaimed Contributor

Re: inetd / Unknown service

You should note that you have "fixed" the problem only on this host. You would be better served by inserting the entries in the NIS source file on the NIS master and then do a ypmake and finally let nsswitch.conf be put back to its former state. Normally, whenever NIS was setup, it was setup to centalize the management of some resource (hostnames, services, automounter maps, ...).
If it ain't broke, I can fix that.