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.
7 comments:
Thanks for this! It was the first step to my realizing I had multiple instances of supervisord running which was causing the error.
You just saved me :)
Thank you very much for this info. It helped me to tweak everything and make site working again.
Played a bit around. It seems to be problem with running supervisor as service. It just reads default config file which path depends on your specific package.
Thank you ! this was amazing. Tried for hours to figure out what was the problem...hours of reading many forums with the same problem.
Thank you,
From a dev :)
Thanks so much for the "echo_supervisord_conf > /etc/supervisord.conf" line, was pulling my hair out not realising that I was missing some sections from my conf file.
Thank you! It fixed my problem
This works for me. I initally thought I was hitting the overlayfs bug as my symptom was " unix:///var/run/supervisord.sock refused connection?", I have centos7 and docker 17.06.0-ce, but it turned out that I was having the supervisord.conf in conf.d instead of /etc/ and was not using the default template that comes with echo. Thanks for the blog.
Hey Thanks! I thought it to be overlayfs issue and was going in that direction unless I saw this blog as the last entry on the 1st page of google search.
Post a Comment