- 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, 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 also 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.
[EDIT 1] I also tried running Jrun without sending it to the background (I also did that with the simple daemon). Same problem
[EDIT 2]Incidentally the process does start but the fact that it won't be checked for 5 minutes is what bothers me.[EDIT 2]
I've tried running simple non-forking daemons in the same way. They have the same problem.
Could anyone shed any light on why init is not respawning a simple daemon properly, and also how I could work around it?