I am using supevisord which is a great tool to spawn processes
http://supervisord.org/running.html
When I get things configured, I run supervisor with the command below:
supervisord -c /etc/supervisord.conf
Supervisor runs successfully and I can see programs got started, but when I check processes using
supervisorctl status
I got an strange error as below:
I tried several solutions for example change supervisord.conf ot use http socket
It even reported an refuse connection error.
supervisorctl status http://127.0.0.1:9001 refused connection.
I searched a lot and finally got the solution.
Problem:
I was using a old version of supervisord.conf file, people who work on clusters and do maintenance work often do this. But the problem happend because I did a fresh install of supervisord, and copied a supervisord.conf from another machine. The install is the latest version, and the copied one is old, which caused the problem.
The solution is very simple:
echo_supervisord_conf > /etc/supervisord.conf #modify supervisord.conf, after it's done sudo supervisord -c /etc/supervisord.conf sudo supervisorctl status
The first line generates a new supervisord.conf which is a template, and then you can modify with the programs you want to start. And then start supervisord and check status. The result is good.
If you find this article is useful, please click the ads on this page to help. Thank you very much.