UnixPedia : HPUX / LINUX / SOLARIS: HPUX : inetd is not getting start (reserved in semaphore)

Wednesday, February 27, 2013

HPUX : inetd is not getting start (reserved in semaphore)

The error could occurs because there is an active semaphore attached  to the process id.  To show the active semaphores:

      # ipcs -s

      IPC status from /dev/kmem as of Fri Nov 21 16:11:53 2003
      T      ID     KEY                 MODE        OWNER     GROUP
      s       0    0x412007a0 --ra-ra-ra-      root      root
      s       1    0x4e0c0002 --ra-ra-ra-      root      root
      ...............

The resultant list will display information about active semaphores. To find the semaphore associated with the defunct inetd(1M) process,
look for KEY '0x01090522' in the output
.  For example,

      # ipcs -s | grep 0x01090522
      s    6149 0x01090522 --ra-r--r--      root       sys

 Note:  0x01090522 represents the KEY identifier for inetd(1M) created semaphores.
To resolve the problem, remove the identified semaphore with following command

     # ipcrm -s <ID>                                                            //ipcrm –s 6149

Now you should be able to start inetd process.

If it does not solve the issue, then please install the attached tusc depot in your system and send us the trace file for sbin/init.d/inetd start command as follows

# ./tusc -o /tmp/inetd_tracefile -ccc -f -l -n -p -E -v -T%T  -b 80 -r all -w all /sbin/init.d/inetd start


example 

Run tusc as below :-

[root@mickey:/home/jkumar1]#
#-> ./tusc_ia -o /tmp/inetd_tracefile -ccc -f -l -n -p -E -v -T%T  -b 80 -r all -w all /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@mickey:/home/jkumar1]#

grep "semctl" from the output file “/tmp/inetd_tracefile” to find out the id for inetd service

[root@mickey:/home/jkumar1]#
#-> cat /tmp/inetd_tracefile |grep -i semctl
07:45:13 [/usr/sbin/in][4825]{2180184} <-0.000000> semctl(8198, 0, GETPID, 0) ......................................................... [entry]
07:45:13 [/usr/sbin/in][4825]{2180184} <0.000025> semctl(8198, 0, GETPID, 0) .......................................................... = 0
semctl                         0.00           1
[root@mickey:/home/jkumar1]#
                                ==> id = 8198

Verify the id i.e. root owned and nothing else is attached to this id as below :-

[root@mickey:/home/jkumar1]#
#-> ipcs |grep -i 8198
s       8198 0x01090522 --ra-r--r--      root      root
[root@mickey:/home/jkumar1]#
#-> ipcs -mas |grep -i 8198
s       8198 0x01090522 --ra-r--r--      root      root      root      root     1 no-entry 13:17:14
[root@mickey:/home/jkumar1]#

Now stop/kill the above id as below and start the inetd service :-

[root@mickey:/home/jkumar1]#
#-> ipcrm -s 8198
[root@mickey:/home/jkumar1]#
#-> /sbin/init.d/inetd start
Internet Services started
[root@mickey:/home/jkumar1]#
#-> ps -ef |grep -i inetd
    root 13744     1  0 07:54:24 ?         0:00 /usr/sbin/inetd
    root 13763 27302  0 07:54:36 pts/2     0:00 grep -i inetd
[root@mickey:/home/jkumar1]#
 

1 comment:

  1. Super blog and very interesting information which I always wanted to search many article but you article is really fantastic.
    HP-UX Backup and DR

    ReplyDelete