Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

ixudra's avatar

Supervisor not found

I'm trying to restart supervisor on my server but I can't seem to get it going. It seems the process is already started but I get a connection error if I try to access the control panel:

[root@server]# supervisorctl
unix:///tmp/supervisor.sock refused connection
supervisor> status
unix:///tmp/supervisor.sock refused connection
supervisor> reread
error: <class 'socket.error'>, [Errno 111] Connection refused: file: /usr/lib64/python2.7/socket.py line: 224
supervisor> exit

I then try to restart the process but that also doesn't seem to work.

[root@server]# service supervisorctl restart
Redirecting to /bin/systemctl restart  supervisorctl.service
Failed to restart supervisorctl.service: Unit supervisorctl.service failed to load: No such file or directory.
[root@server]# service supervisor restart
Redirecting to /bin/systemctl restart  supervisor.service
Failed to restart supervisor.service: Unit supervisor.service failed to load: No such file or directory.
[root@server]# service supervisord restart
Redirecting to /bin/systemctl restart  supervisord.service
Failed to restart supervisord.service: Unit supervisord.service failed to load: No such file or directory.

Anyone have any idea what this could be? Server is CentOS 6.5

0 likes
10 replies
ixudra's avatar

Problem still persists - any help is appreciated

ohffs's avatar

Can you try running :

systemctl list-unit-files --type=service

And make sure systemd knows about the service?

ixudra's avatar

@ohffs Supervisor is not listed in the output, which I guess means that the service is not known. Does this mean the installation wasn't done correctly? I inherited this setup from a previous developer, so I have no knowledge of what he has done with it or why.

How can I fix this issue?

ohffs's avatar

You could try doing a systemctl daemon-reload and see if it shows up after that. Which distribution is it?

ixudra's avatar

@ohffs No success, alas.. Distro: CentOS Linux release 7.2.1511 (Core)

ohffs's avatar

If you do

rpm -qa | grep supervisor

It should show something like 'supervisor-3.1.3-3.el7.noarch' - then do :

rpm -ql supervisor | grep systemd

That should show something like /usr/lib/systemd/system/supervisord.service. If any of those fail we can try and fix it :-)

ixudra's avatar

@ohffs The first command doesn't yield any output at all, but that doesn't surprise me. I knew from the start that the setup wasn't perfect. As an example: the supervisor.conffile is not stored in /etc/supervisor, as you would think, but instead can be found in the /etc directory itself. Additionally, the queues themselves are defined inside the config file instead of using a directory with additional files, as is common.

ohffs's avatar

Sounds like they maybe installed it from source? Or maybe copied it across from another box - fun! ;-) I'm kind of wary to say just install the CentOS version with yum as neither of us knows why it was done that way (if there was any reason at all). I don't think it'd cause you an issue seeing as, well, it isn't running properly anyway ;-) If you're machine has the EPEL repo in /etc/yum.repos.d/ you can just do

yum install supervisor

... if you're feeling brave ;-)

ixudra's avatar

Honestly I don't really remember because it's been such a long time but if I had to guess:

[root@server]# supervisorctl
unix:///tmp/supervisor.sock refused connection
supervisor> status
unix:///tmp/supervisor.sock refused connection
supervisor> reread
error: <class 'socket.error'>, [Errno 111] Connection refused: file: /usr/lib64/python2.7/socket.py line: 224
supervisor> exit

basically means that the service was not started correctly before accessing the control panel. So what you need to do to fix that, is (surprise surprise) start supervisor:

sudo service supervisor restart

After that, you should be able to access the control panel without issue

Please or to participate in this conversation.