Error ini file does not include supervisorctl section

Supervisorctl doesn't seem to let me in: $ supervisorctl -c /etc/supervisor/supervisord.conf Error: .ini file does not include supervisorctl section For help, use /usr/bin/supervisorctl -h $ cat /...

Supervisorctl doesn’t seem to let me in:

$ supervisorctl -c /etc/supervisor/supervisord.conf
Error: .ini file does not include supervisorctl section
For help, use /usr/bin/supervisorctl -h
$ cat /etc/supervisor/supervisord.conf 
[supervisord]
nodaemon=true

I have both specified the config and [supervisord]. Is it possible my config is in the wrong place?

asked May 4, 2017 at 18:54

Karl Morrison's user avatar

Karl MorrisonKarl Morrison

8,64622 gold badges57 silver badges89 bronze badges

2

Adding a blank [supervisorctl] section seems to resolve the issue for me:

$ cat /etc/supervisor/supervisord.conf 
[supervisord]
nodaemon=true

[supervisorctl]

answered Jul 6, 2017 at 13:24

Jason's user avatar

In the supervisor version 3+, I had to add the following in the conf file to make it work:

[inet_http_server]         
port=127.0.0.1:9001

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

[supervisorctl]
serverurl=http://127.0.0.1:9001

or you may use unix socket as:

[unix_http_server]
file=/run/supervisord.sock

[supervisorctl]
serverurl=unix:///run/supervisord.sock

answered Jul 13, 2019 at 22:15

atb00ker's user avatar

atb00keratb00ker

2013 silver badges4 bronze badges

I had duplicate supervisord.conf files. One empty file «/etc/supervisord.conf» which was being used, and the other one at «/etc/supervisor/supervisord.conf» which I thought was the one being used. I deleted the empty file (/etc/supervisord.conf) and the error was gone.

answered Mar 25, 2022 at 3:25

gachokaeric's user avatar

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"]

A specific «not found» error should be emitted if supervisord can’t find a config file. In later versions, there’s also a different «not readable» error if supervisord finds one but can’t read it. When -c is not used to specify an explicit path to a config file, supervisord will search for one.

supervisorctl will also search for a config file. Before Supervisor 3.0b2, a config file was always required and it would give an error as described above. In 3.0b2 and later, supervisorctl can be used without a config file. In that case, the connection info should be given in command line options. I think if it can’t find a config file, and you don’t give the connection options, it defaults to http://localhost:9001 with no auth. I’m not certain about that.

It sounds like supervisorctl is searching for and finding another config file on your system, but that file contains a line that causes the Address family not supported by protocol error. It could also be that supervisorctl is using its default but the default causes this error on your system. It would be helpful if we could get more info. The last time this was reported we didn’t find out.

Edit: Clarified supervisorctl behavior.

Add Answer
|
View In TPC Matrix

Technical Problem Cluster First Answered On
November 20, 2020

Popularity
8/10

Helpfulness
7/10


Contributions From The Grepper Developer Community

Contents

Code Examples

  • Error: .ini file does not include supervisorctl section
  • Related Problems

  • error: .ini file does not include supervisorctl section
  • TPC Matrix View Full Screen

    Error: .ini file does not include supervisorctl section

    Comment

    0


    Popularity

    8/10 Helpfulness
    7/10
    Language
    shell

    Source: Grepper

    Tags: file
    include
    shell

    Friendly Hawk

    Contributed on Nov 20 2020

    Friendly Hawk

    1,223 Answers  Avg Quality 8/10


    Supervisorctl, кажется, не впускает меня:

    $ supervisorctl -c /etc/supervisor/supervisord.conf
    Error: .ini file does not include supervisorctl section
    For help, use /usr/bin/supervisorctl -h
    $ cat /etc/supervisor/supervisord.conf 
    [supervisord]
    nodaemon=true
    

    Я и указал конфигурацию и [supervisord]. Действительно ли возможно, что моя конфигурация находится в неправильном месте?

    задан
    4 May 2017 в 11:54

    поделиться

    3 ответа

    Добавление пустого раздела [supervisorctl], кажется, решает проблему для меня:

    ответ дан Jason
    23 November 2019 в 05:23

    поделиться

    ответ дан Shihe Zhang
    23 November 2019 в 05:23

    поделиться

    В версии 3 супервизора +, я должен был добавить следующее в conf файле, чтобы заставить его работать:

    [inet_http_server]         
    port=127.0.0.1:9001
    
    [rpcinterface:supervisor]
    supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
    
    [supervisorctl]
    serverurl=http://127.0.0.1:9001
    
    

    или можно использовать сокет Unix как:

    [unix_http_server]
    file=/run/supervisord.sock
    
    [supervisorctl]
    serverurl=unix:///run/supervisord.sock
    

    ответ дан atb00ker
    23 November 2019 в 05:23

    поделиться

    Понравилась статья? Поделить с друзьями:
  • Error information log entries растет
  • Error information has been collected world of tanks как исправить
  • Error information has been collected world of tanks виндовс 10
  • Error information has been collected world of tanks please confirm sending error report перевод
  • Error information has been collected world of tanks please confirm sending error report to the