The installation of the supervisor

introduce

Supervisor is a process management tool developed in Python under Linux. It provides a Web management interface. By configuring the process to be monitored, you can easily monitor and manage the process.

Download and install

Ubuntu download

sudo apt-get install supervisor

1. After the installation is complete, add three commands to /usr/bin:

  • Echo_superisord_conf Generates a sample configuration file (recommended only for learning to use)
  • Supervisord server
  • Supervisorctl client

2. After the installation is complete, a Supervisor directory is created in the /etc directory to store the Supervisor configuration file.

  • /etc/supervisor
    • /conf.d (folder)
    • Conf for convenience, the Supervisor server configuration is written to the supervisor. conf, and the supervisor server configuration is stored in the conf.d directory according to the process name. (This can be configured in the [include] section of the supervisord.conf container.)

My configuration is as follows:

Brief Configuration

  • [unix_http_server] Configures the socket connection part
  • It is configured with the Supervisor server
  • [supervisorCTL] Configures the Supervisor client
  • [inet_http_server] Configures the Web management interface
  • [include] Configures other configurations to be imported

Details about the configuration are as follows:

Configuration Documents on the official website

Operation and maintenance time

Problems encountered during installation

Before we start supvisord: go to the /usr/bin directory

cd /usr/bin

Start the

supervisord -c /etc/supervisor/supervisord.conf

Problem a

Error: Another program is already listening on a port that one of our HTTP servers is configured to use. Shut this program down first before starting supervisord. For help, use /usr/bin/supervisord -h

The solution is as follows:

ps -ef | grep supervisord

It is known that there is a container running in the container that is running in the container, so we are going to clean it up.

kill -s SIGTERM 103824

Look again:

ps -ef | grep supervisord

If it’s not seen running in the container, it’s safe to run the following command:

supervisord -c /etc/supervisor/supervisord.conf