5

I can't get supervisord to work; after starting the process with:

# supervisord -n -c /etc/supervisord.conf
2013-05-29 11:34:11,861 CRIT Supervisor running as root (no user in config file)
2013-05-29 11:34:11,868 INFO supervisord started with pid 7893

From another terminal, I get:

# supervisorctl -c supervisord.conf status
error: <class 'socket.error'>, [Errno 2] No such file or directory: file: <string> line: 1

Running in vagrant, CentOS 6.3 x86_64.

Configuration:

[unix_http_server]
file=/var/run/supervisor.sock   ; (the path to the socket file)


[supervisord]
logfile=/var/log/supervisor/supervisord.log                      ; (main log file;default $CWD/supervisord.log)
logfile_maxbytes=500MB    ; (max main logfile bytes b4 rotation;default 50MB)
logfile_backups=10      ; (num of main logfile rotation backups;default 10)
loglevel=info                    ; (log level;default info; others: debug,warn,trace)
pidfile=/var/run/supervisord.pid            ; (supervisord pidfile;default supervisord.pid)
nodaemon=false                              ; (start in foreground if true;default false)
minfds=1024                        ; (min. avail startup file descriptors;default 1024)
minprocs=200                    ; (min. avail process descriptors;default 200)
childlogdir=/var/log/supervisor              ; ('AUTO' child log dir, default $TEMP)
nocleanup=false
umask=022

[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface

[supervisorctl]
serverurl=unix:///var/run/supervisor.sock ; use a unix:// URL  for a unix socket

[include]
files = /etc/supervisord.d/*.ini

Trying to find the socket file:

# ls /var/run/supervisor.sock
ls: cannot access /var/run/supervisor.sock: No such file or directory

Versions etc:

# rpm -qi supervisor
Name        : supervisor                   Relocations: (not relocatable)
Version     : 2.1                               Vendor: Fedora Project
Release     : 8.el6                         Build Date: Fri 02 Jul 2010 10:14:29 AM EDT
Install Date: Wed 29 May 2013 09:55:23 AM EDT      Build Host: x86-18.phx2.fedoraproject.org
Group       : System Environment/Base       Source RPM: supervisor-2.1-8.el6.src.rpm
Size        : 1164337                          License: ZPLv2.1 and BSD and MIT
Signature   : RSA/8, Fri 02 Jul 2010 12:36:46 PM EDT, Key ID 3b49df2a0608b895
Packager    : Fedora Project
URL         : http://www.plope.com/software/supervisor2/
Summary     : A System for Allowing the Control of Process State on UNIX
Description :
The supervisor is a client/server system that allows its users to control a
number of processes on UNIX-like operating systems.
  • I have the same problem. Maybe you somehow manage to fix it? Please share :) – egis Jun 30 '13 at 20:42
  • Yes, the problem was too old a version, I fixed up a puppet repo. – Henrik Jul 1 '13 at 6:14
  • FYI, the actual error error: <class 'socket.error'>, [Errno 2] No such file or directory: file: <string> line: 1 just means that supervisor is not running and supervisord cannot connect to it, hence the socket error. – A. McB Sep 15 '15 at 22:34
1

The problem was that the version was old and buggy:

I have upgraded this: https://github.com/haf/puppet-supervisor to install the latest version of supervisor.

The core problem seems to be that failure to launch the daemon the first time creates the socket file at the run location, but the initv script doesn't support removing it (so it must be done manually).

0

I had the same problem. The cause was running supervisord version 2.x instead of 3.x. Upgrading supervisord solved the problem.

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.