supervisord failed to start nagiosapi after reboot, need to run reload manually

Posted by Bajingan Keparat on Server Fault See other posts from Server Fault or by Bajingan Keparat
Published on 2012-06-05T20:24:00Z Indexed on 2012/06/05 22:42 UTC
Read the original article Hit count: 237

I have supervisord to start nagiosapi everytime the server starts. The API created a status dump file called status.dat, which will get updated periodically. The following is the conf file that starts the api.

[program:nagapi]
directory = /home/nagapi
user = api
command = /bin/bash -c "source /home/nagapi/.virtualenvs/nagapi/bin/activate;    /home/nagapi/nagios-api/nagios-api"
stdout_logfile = /home/nagapi/supervisor_nagios-api_stdout.log
stderr_logfile = /home/nagapi/supervisor_nagios-api_stderr.log

Everytime i restart the server, supervisord cannot start the api. stderr.log claims that it cannot find the status.dat file located in /var/cache/nagios3.

It seems like the files was not created yet when supervisor tried to run the api the first time. I'm saying this because if i do a supervisorctl reload, everything would reload just fine, and the api would run ok about 50 seconds after the reload command completes.

should i change the command option of the conf file to check for

© Server Fault or respective owner

Related posts about debian

Related posts about nagios