monit-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Application fails to start.


From: jbelant
Subject: Re: Application fails to start.
Date: Tue, 29 Mar 2005 10:55:30 -0600
User-agent: Mozilla Thunderbird 1.0 (X11/20041206)

Jan-Henrik Haukeland wrote:
This is not good:

     ( /home/eminer/cA3Server/cA3Server > /dev/tty6 ) &
     pgrep cA3Server > /var/run/cA3Server.pid

This means that the shell will start the cA3Server in a new sub-process and the control jumps immediately to the pgrep command. In other words the pgrep command may finnish before the cA3Server was started. This should explain why you got an empty value in the pid file. Use the exec statement to start the server and *do not* put the server in the background, monit does this automatically when it calls the script. See also the startup script example in the FAQ.

I've modified my script to use exec. Please see my reply to Martin.

Thanks for your help,

Jim




reply via email to

[Prev in Thread] Current Thread [Next in Thread]