0

I am a new bee with Supervisord. And I am on Ubuntu.

My problem is, I have a script to spawn java process using "exec java -cp ....." as the only line in the script. This particular java process is a non-daemon process that runs for infinite time (as the "driver" is always up and running, I checked also it is working as expected if I invoke the start script directly).

But I have configured supervisord.conf file as

[program:mydriver]
command=/home/subho/Workshop/start.sh
directory=/home/subho/Workshop
startsecs=5
stdout_logfile=/home/subho/Workshop/Logs/out.log
stderr_logfile=/home/subho/Workshop/Sink/Logs/err.log

But when I start by ./supervisord -c <path to my conf file>

The process gets started properly and once it goes in running state, it automatically killed by supervisor itself. Below is the log,

2017-06-03 18:58:05,286 CRIT Supervisor running as root (no user in config file)
2017-06-03 18:58:05,297 INFO RPC interface 'supervisor' initialized
2017-06-03 18:58:05,297 CRIT Server 'unix_http_server' running without any 
HTTP authentication checking
2017-06-03 18:58:05,297 INFO daemonizing the supervisord process
2017-06-03 18:58:05,298 INFO supervisord started with pid 19698
2017-06-03 18:58:06,300 INFO spawned: 'mydriver' with pid 19699
2017-06-03 18:58:11,671 INFO success: mydriver entered RUNNING state, process has stayed up for > than 5 seconds (startsecs)
2017-06-03 18:58:27,439 INFO waiting for mydriver to die
2017-06-03 18:58:27,465 INFO stopped: mydriver (exit status 143)

Why it is happening? the same is happening when I am starting tomcat or any other process as well.

  • Help in any aspect of the problem is appreciated since this is very important for me and i am running out of time..i am still strugling :) – Abhishek Chatterjee Jun 4 '17 at 14:53
1

I dont know if this is the right reason or not. But this solved my problem.

I kept the conf file under a custom path. The default path of supervisor conf file is under /etc/supervisor/. When I used the default conf file (and added my custom conf file under /etc/supervisor/conf.d/myconf.conf), it worked as expected.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.