Search code examples
supervisord

supervisorctl 3.3.1 not working, complaining about not finding .conf file


root@dev-demo-karl:~# supervisord -v
3.3.1

I'm getting the following error when trying to access supervisorctl:

Error: .ini file does not include supervisorctl section
For help, use /usr/bin/supervisorctl -h

Supervisor not using configuration file

root@dev-demo-karl:/srv/www# /usr/bin/supervisorctl
Error: .ini file does not include supervisorctl section
For help, use /usr/bin/supervisorctl -h
root@dev-demo-karl:/srv/www# cd /etc/              
root@dev-demo-karl:/etc# cat supervisor
supervisor/       supervisord/      supervisord.conf
root@dev-demo-karl:/etc# ls supervisord/conf.d                  
supervisord.conf
root@dev-demo-karl:/etc# ls supervisor/conf.d
supervisord.conf
root@dev-demo-karl:/etc# ls supervisord       
conf.d  supervisord.conf
root@dev-demo-karl:/etc# ls supervisor
conf.d  supervisord.conf

All the supervisord.conf files have the following:

root@dev-demo-karl:/etc# cat supervisord.conf 
[supervisord]
nodaemon=true

[program:node]
directory=/srv/www
command=npm run demo
autostart=true
autorestart=true

[program:mongod]
command=/usr/bin/mongod --auth --fork --smallfiles --logpath /var/log/mongodb.log

I KNOW supervisord is finding one of them because the services are up:

root@dev-demo-karl:~# ps aux
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root         1  0.0  0.8  47624 17744 ?        Ss   21:03   0:00 /usr/bin/python /usr/bin/supervisord
root         8  0.1  2.4 1003400 49580 ?       Sl   21:03   0:00 npm
root        16  0.6  2.3 295224 48192 ?        Sl   21:03   0:03 /usr/bin/mongod --auth --fork --smallfiles --logpath /var/log/mongodb.log
root        40  0.0  0.0   4512   844 ?        S    21:03   0:00 sh -c npm run prod
root        41  0.1  2.4 1003412 49584 ?       Sl   21:03   0:00 npm
root        52  0.0  0.0   4512   712 ?        S    21:03   0:00 sh -c NODE_ENV=production NODE_PATH="$(pwd)" node src/index.js
root        54  0.4  8.1 1068568 166080 ?      Sl   21:03   0:02 node src/index.js
root        79  0.0  0.1  18240  3248 ?        Ss+  21:04   0:00 bash
root       238  0.0  0.1  18248  3248 ?        Ss   21:06   0:00 bash
root       501  0.0  0.1  34424  2884 ?        R+   21:12   0:00 ps aux

Why isn't supervisorctl not working?

And last:

root@dev-demo-karl:~# cat /etc/supervisord.conf
[supervisord]
nodaemon=true

[program:node]
directory=/srv/www
command=npm run demo
autostart=true
autorestart=true

[program:mongod]
command=/usr/bin/mongod --auth --fork --smallfiles --logpath /var/log/mongodb.log
root@dev-demo-karl:~# supervisorctl -c /etc/supervisord.conf
Error: .ini file does not include supervisorctl section
For help, use /usr/bin/supervisorctl -h

Wth? Anyone know what I'm doing wrong? I'm starting it via the command in a Docker container:

CMD ["/usr/bin/supervisord"]

Solution

  • Supervisor in version 3.3.1 has added a few more required fields. http://supervisord.org/configuration.html

    I added them and it is now read!