Use of the supervisor configuration file
This article does not state the parameters in the configuration file, but focuses on the use of the configuration file.
1. For the supervisor, the configuration file-c parameter is not manually specified
- $ CWD/supervisord. conf
- $ CWD/etc/supervisord. conf
- /Etc/supervisord. conf
Therefore, be careful when the configuration file is incorrectly used.
2. Communication between supervisorctl and supervisord processes uses tcp connections by default.
[inet_http_server]port = 127.0.0.1:9001username = userpassword = 123
However, for security reasons, many users use unix domain sockets,
[unix_http_server]file = /tmp/supervisor.sockchmod = 0777chown= nobody:nogroupusername = userpassword = 123
Therefore, when supervisorctl is used, if supervisorctl cannot find the configuration file,
Supervisorctl cannot know how to communicate with supervisord. You may see the following error:
root@xxx:/home/operation# supervisorctl statushttp://localhost:9001 refused connection
3. supervisorctl support
(sm_env)root@xxx:/etc/supervisor# supervisorctl helpdefault commands (type help <topic>):=====================================add clear fg open quit remove restart start stop update avail exit maintail pid reload reread shutdown status tail versionroot@xxx:/etc/supervisor# supervisorctl help updateupdateReload config and add/remove as necessary
Refer to the official documentation:
The Supervisor configuration file is conventionally namedSupervisord. conf. It is used by bothsupervisord and supervisorctl. If either application is started without-COption (the option which is used to tell the application the configuration filename explicitly), the application will look for a file namedSupervisord. confWithin the following locations, in the specified order. It will use the first file it finds.
- $ CWD/supervisord. conf
- $ CWD/etc/supervisord. conf
- /Etc/supervisord. conf