Maaz Zindani

Loading the index…

↑↓ move↵ openesc close4791 pages
Servers, nginx and Docker

supervisorctl cannot reach supervisord because the control socket is missing

Your error

unix:///run/supervisor.sock no such file1 more line it can show

Fix it fast

Most common cause, 1 of 3

supervisord is not running

Enable and start the service, then load your program files the way the Laravel queue docs describe.

Fix
sudo systemctl enable --now supervisor
sudo supervisorctl reread
sudo supervisorctl update
sudo supervisorctl start "laravel-worker:*"
Did this fix it?
Full steps for this cause: check, fix, verify

Short answer

"unix:///run/supervisor.sock no such file" means supervisorctl looked for supervisord's control socket and nothing was there, so it reports the daemon as not running. Usually supervisord is stopped, it failed to start because a program file such as a Laravel queue worker config is invalid, or supervisorctl reads a different config. Start the service and read its log. Applies to Supervisor 4.x.

  • Applies to Supervisor 4.3.0, Debian-based supervisor package (systemd unit supervisor.service), Laravel 12 and 13 queue workers
  • Updated
  • By Maaz Zindani, Senior Software Engineer

Which cause do you have?

Ask systemd whether the daemon is running. inactive or disabled points to the first cause, failed or a restart loop to the second, and active (running) to the third.

Run this first
systemctl status supervisor --no-pager

Then find the line you see in this list and open its fix:

  1. 1supervisord is not runningsystemctl status shows inactive (dead), or the unit is disabled and the machine was rebooted
  2. 2supervisord exits at start because a program file is invalidsystemctl shows failed or keeps restarting, and the journal names a file under /etc/supervisor/conf.d
  3. 3supervisorctl reads a different config file than the running daemonsupervisord is active and /run/supervisor.sock exists, yet the error names another path, or which -a supervisorctl lists more than one binary

What does the error look like?

  • unix:///run/supervisor.sock no such file
  • sudo supervisorctl status prints no such file while queue workers have stopped

Cause 1 of 3

supervisord is not running

You seesystemctl status shows inactive (dead), or the unit is disabled and the machine was rebooted

Check

supervisorctl prints <serverurl> no such file when connecting to the UNIX socket fails with file not found, and it exits with the not-running status. The socket only exists while supervisord runs, so a stopped or never-started daemon gives exactly this line.

Check
systemctl is-enabled supervisor
ls -l /run/supervisor.sock

Fix

Enable and start the service, then load your program files the way the Laravel queue docs describe.

Fix
sudo systemctl enable --now supervisor
sudo supervisorctl reread
sudo supervisorctl update
sudo supervisorctl start "laravel-worker:*"

Verify

supervisorctl lists your programs as RUNNING.

Verify
sudo supervisorctl status

Confirmed by raw.githubusercontent.com

Did this fix it?

Cause 2 of 3

supervisord exits at start because a program file is invalid

You seesystemctl shows failed or keeps restarting, and the journal names a file under /etc/supervisor/conf.d

Check

When the daemon dies during start-up it never creates the socket, so supervisorctl reports the same missing file. A typo in a [program:...] section, such as a worker file copied from the Laravel docs and edited by hand, is enough. Running supervisord in the foreground with the package's own config shows the parse error on screen.

Check
sudo journalctl -u supervisor -n 50 --no-pager
sudo systemctl stop supervisor
sudo supervisord -n -c /etc/supervisor/supervisord.conf

Fix

Correct the file the error names (press Ctrl+C to leave the foreground run first), then start the service again.

Fix
sudoedit /etc/supervisor/conf.d/laravel-worker.conf
sudo systemctl start supervisor

Verify

The unit stays active and the socket exists.

Verify
systemctl is-active supervisor
ls -l /run/supervisor.sock

Confirmed by supervisord.org

Did this fix it?

Cause 3 of 3

supervisorctl reads a different config file than the running daemon

You seesupervisord is active and /run/supervisor.sock exists, yet the error names another path, or which -a supervisorctl lists more than one binary

Check

Both programs search a list of places for supervisord.conf when -c is not given and take the first file they find. A second Supervisor installed with pip, or a stray /etc/supervisord.conf, can make supervisorctl pick a config whose serverurl points at a socket the packaged daemon never creates.

Check
which -a supervisorctl
ls -l /etc/supervisord.conf /etc/supervisor/supervisord.conf

Fix

Point supervisorctl at the daemon's config explicitly, and remove the duplicate install or the stray file so the default works again.

Fix
sudo supervisorctl -c /etc/supervisor/supervisord.conf status

Verify

Plain supervisorctl, without -c, now shows the same program list.

Verify
sudo supervisorctl status

Confirmed by supervisord.org

Did this fix it?

How do I stop it coming back?

  • Install Supervisor from one source only (the distribution package on servers) and enable the unit so it starts after every reboot.
  • After editing a file in /etc/supervisor/conf.d, run sudo supervisorctl reread before update; reread loads the files without adding, removing or restarting programs, so you see what changed before update applies it.
  • Add a deploy check that runs supervisorctl status and fails when it exits non-zero, so a dead daemon is noticed before the job queue backs up.

Sources

How was this page made?

I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.

Which stack is behind this page?

Projects of mine on the same stack: Spotless Laundry, EZ Estimater.

Next step

Want this handled for good?

I look after servers, apps and releases end to end. Tell me what keeps breaking.