cancel
Showing results for 
Search instead for 
Did you mean: 

inetd servi ce issue

 
SOLVED
Go to solution
shikhar_1
Regular Advisor

inetd servi ce issue

Hi All,

 

I am trying to start the inetd services but it is not getting started.

 

I have tried with inetd -c command.

 


[root@ncsqas06:/etc]#
#-> ps -ef | grep -i inetd
    root  4075 20851  0 14:27:45 pts/5     0:00 grep -i inetd

[root@ncsqas06:/etc]#
#->

 


[root@ncsqas06:/etc]#
#-> ll /etc/inetd.conf
-r--r--r--   1 bin        bin           5022 Feb 24  2009 /etc/inetd.conf

[root@ncsqas06:/etc]#
#->

 

Anyone please let me know, whats the exact issue

11 REPLIES
Patrick Wallek
Honored Contributor

Re: inetd servi ce issue

'inted -c' simply tells inetd to re-read its configuration file.  If inetd isn't running then that will not accomplish anything.

 

To start inetd try doing:

 

# /sbin/init.d/inetd start

 

If there are any errors, post them and we can troubleshoot.

 

You should also check /var/adm/syslog/syslog.log for any error messages about inetd.

shikhar_1
Regular Advisor

Re: inetd servi ce issue

#-> /sbin/init.d/inetd start
An inetd is already running
Usage: inetd [-a] [-p proc_limit] [-r count [interval]] [-l | -s]
inetd [-c]
inetd [-k]
EXIT CODE: 255
Unable to start Internet Services

[root@ncsqas06:/.root]#
#->

[root@ncsqas06:/.root]#
#-> ps -ef | grep -i inetd
root 14526 14099 0 07:14:45 pts/0 0:00 grep -i inetd

[root@ncsqas06:/.root]#
#-> /sbin/init.d/inetd -k
usage: /sbin/init.d/inetd {start|stop}

[root@ncsqas06:/.root]#
#-> /sbin/init.d/inetd stop
Terminated

[root@ncsqas06:/.root]#
#-> /sbin/init.d/inetd start
An inetd is already running
Usage: inetd [-a] [-p proc_limit] [-r count [interval]] [-l | -s]
inetd [-c]
inetd [-k]
EXIT CODE: 255
Unable to start Internet Services

[root@ncsqas06:/.root]#
shikhar_1
Regular Advisor

Re: inetd servi ce issue

I have tired to restart it but it is not getting started and these below logs are getting generated on the server.

 

 

#-> ps -ef | grep -i inetd
    root 23682 14099  0 11:06:53 pts/0     0:00 grep -i inetd

[root@ncsqas06:/var/adm/syslog]#
#-> uname -a
HP-UX ncsqas06 B.11.23 U ia64 3127169658 unlimited-user license

[root@ncsqas06:/var/adm/syslog]#
#->

 

Feb 20 11:05:02 ncsqas06 HP-PRM: [5976]: prm1d: moved pid 23205 (/opt/TIDAL/Agent/lib/HP-UX11i/tjb) to PRMID 0
Feb 20 11:05:13 ncsqas06 HP-PRM: [5976]: prm1d: moved pid 23355 (/usr/openv/netbackup/bin/bpcd) to PRMID 1
Feb 20 11:05:14 ncsqas06 HP-PRM: [5976]: prm1d: moved pgrp 23356 (/opt/quest/qmxcm/libexec/qmxsmsoopcpp1pr) to PRMID 1
Feb 20 11:05:21 ncsqas06 HP-PRM: [5976]: prm1d: moved pid 23372 (/usr/openv/netbackup/bin/bpcd) to PRMID 1
Feb 20 11:05:30 ncsqas06 HP-PRM: [5976]: prm1d: moved pid 23397 (/usr/openv/netbackup/bin/bpcd) to PRMID 1
Feb 20 11:05:30 ncsqas06 HP-PRM: [5976]: prm1d: moved pid 23396 (/usr/openv/netbackup/bin/bpcd) to PRMID 1
Feb 20 11:05:55 ncsqas06 HP-PRM: [5976]: prm1d: moved pid 23458 (/usr/openv/netbackup/bin/bpcd) to PRMID 1

Re: inetd service issue

>I have tired to restart it but it is not getting started

 

You may want to try tusc to see what errors inetd is getting.

shikhar_1
Regular Advisor

Re: inetd service issue

#-> /home/sverma8/tusc/tusc/tusc-RUN/usr/local/bin/tusc -f -p -T "%c" -k -o /tmp/tusc_inetd_start inetd

An inetd is already running

Usage:  inetd [-a] [-p proc_limit] [-r count [interval]] [-l | -s]

        inetd [-c]

        inetd [-k]

Re: inetd service issue

>I have tried with inetd -c command.

 

Did you get a message saying: There is no inetd running

 

>An inetd is already running

 

Is it now running?  Or were you very unlucky and caught it just before it died?

Have you changed /etc/inetd.conf recently and broken it?  (I guess not since Feb 2009.)

 

You might want to use "inetd -l" to turn on logging.

And look at syslog to see if any messages.

Matti_Kurkela
Honored Contributor

Re: inetd service issue

Since you ran inetd with tusc, the /tmp/tusc_inetd_start file should now contain a list of all the system calls made by inetd in that start attempt. Examining that file should reveal what inetd was checking to see if it's already running.

 

Look for the "An inetd is already running" message in the tusc output file, then look for filenames it accesses just before that.

 

If you don't know how to interpret the tusc output file (/tmp/tusc_inetd_start according to the command you used), please attach it to this thread.

 

Apparently inetd does not have a PID file, so the reason for this behavior cannot be a stale PID file. Maybe a stale UNIX socket/FIFO or something like that?

MK
shikhar_1
Regular Advisor

Re: inetd service issue

Hi,

 

I am attaching the file  /tmp/tusc_inetd_start.

Please review it.

Re: inetd service issue

Thu Feb 21 07:27:50 2013 [8057] semget(0x1090522, 1, 0) .................................. = 16390

Thu Feb 21 07:27:50 2013 [8057] semctl(16390, 0, GETPID, 0) .............................. = 0

 

These entries indicate that a leftover inetd semaphore with the key  0x1090522 is the problem.

Did someone use a kill -9 on inetd?

 

You may want to list it: ipcs -sa

You can cleanup by: ipcrm -s 16390

 

>Maybe a stale UNIX socket/FIFO or something like that?

 

Hmm, a stale semaphore.  And they are trying to get a PID out of it and not recognizing a PID of 0, isn't much good.

shikhar_1
Regular Advisor
Solution

Re: inetd service issue

Hi Dennis,

Thanks for your reply and solution. Now after doing ipcrm -s 16390. Inetd services started and looks good.

Now I can see inetd services running after removing the semaphore with the given command.

Could you please let us know that inetd uses 0x01090522?

[root@ncsqas06:/home/sverma8]#
#-> ps -ef | grep -i inetd
root 25897 1 0 13:23:04 ? 0:00 /usr/sbin/inetd -l
root 12513 8464 0 14:06:22 pts/2 0:00 grep -i inetd

[root@ncsqas06:/home/sverma8]#


From the previous output I can see these outputs.

Thu Feb 21 07:27:50 2013 [8057] semget(0x1090522, 1, 0) .................................. = 16390 Thu Feb 21 07:27:50 2013 [8057] semctl(16390, 0, GETPID, 0) .............................. = 0

============
From old ipcs -s

IPC status from /dev/kmem as of Thu Feb 21 12:15:51 2013
T ID KEY MODE OWNER GROUP
Semaphores:
s 16390 0x01090522 --ra-r--r-- root root

Could you please let us know that inetd uses 0x01090522?


Re: inetd service issue

>Could you please let us know that inetd uses 0x01090522?

 

That is the semaphore key that is used in semget(2) to get the ID.

And tusc shows that inetd uses that key.  If you use "ipcs -sa", you should see the PID of inetd too.