Hi all,

- RedHat Enterprise 3 Update 4 (Taroon)
- JRun 4 Updater 4
- Kernel 2.4.21-27.ELsmp

I am attempting to monitor an instance of JRun 4 Updater 4 appserver by adding the following to /etc/inittab:

jd1:35:respawn:/home/appserv/jrun4/bin/jrun -config /home/appserv/jrun4/bin/myapp.config -nohup -start myapp 1>/home/appserv/jrun4/bin/myapp.out 2>/home/appserv/jrun4/bin/myapp.err &

I intend to have init check that the process is running, and respawn it if it is not. I have tried executing the line "/home/appserv/jrun4/bin/jrun -config /home/appserv/jrun4/bin/myapp.config -nohup -start myapp 1>/home/appserv/jrun4/bin/myapp.out 2>/home/appserv/jrun4/bin/myapp.err &" as root to imitate the way init runs it. That seems to work fine.

However, if I reload the /etc/inittab file (using "init q") I get the following error in the /var/log/messages file:

Jul 18 16:14:24 ops-testing init: Re-reading inittab
Jul 18 16:14:24 ops-testing init: Id "jd1" respawning too fast: disabled for 5 minutes

As I said, the actual process runs OK from the command line, and it DOES actually run from the inittab, so it's not as if it crashes, attempts to restart, crashes again, then pasuses for 5 minsutes as stated in the log above; it's the fact that it won't be polled again for 5 minutes that bothers me. The Jrun process doesn't fork, so it doesn't lose track of the parent process: when I run it from the command line, the single process that runs has a parent process ID which is the same as the bash shell from where I run it.

I've tried running simple non-forking daemons in the same way. They have the same problem. I also tried running Jrun without sending it to the background (I also did that with the simple daemon). Same problem. sad.gif

Could anyone shed any light on why init is not respawning a simple daemon properly, and also how I could work around it? Or have I misunderstood init and inittab? wink.gif

Many thanks,
Jon Daniels