upstart child process not terminating

Asked by Sam

I have a upstart script under RHEL 6.4 to start and stop a Java process. When I stop Java process, upstart stops parent but not stopping child process (Java process). Parent spawning shell script that starts Java process. Child is started as a different user than parent.I want child process to be stopped along with parent. Please help.

Upstart script:
$ cat /etc/init/npcsoap.conf
start on runlevel [35]
stop on runlevel [!$RUNLEVEL]
respawn
instance $PROC
exec /home/rootnpc/bin/root_npcsoap.sh $PROC
$
when main process running:
$ ps -ef | grep spice17_1
root 25754 1 0 08:44 ? 00:00:00 /bin/bash /home/rootnpc/bin/root_npcsoap.sh spice17_1
root 25758 25754 0 08:44 ? 00:00:00 su - npc -c /home/npc/bin/init_npcsoap.sh spice17_1
npc 25759 25758 2 08:44 ? 00:00:00 /bin/bash /home/npc/bin/init_npcsoap.sh spice17_1
npc 25823 25759 29 08:44 ? 00:00:01 java -DInstanceID=spice17_1 -Xms128m -Xmx256m -XX:+UseParallelGC -........
when main process stopped (child PID changed to 1):
$ ps -ef | grep spice17_1
 npc 25823 1 0 08:44 ? 00:00:01 java -DInstanceID=spice17_1 ...........

Question information

Language:
English Edit question
Status:
Expired
For:
upstart Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Launchpad Janitor (janitor) said :
#1

This question was expired because it remained in the 'Open' state without activity for the last 15 days.