Starting supervisord as root or not?

前端 未结 5 1066
别跟我提以往
别跟我提以往 2021-02-01 02:13

Supervisor is running on 3.0:

pip freeze | grep supervisor
supervisor==3.0

When starting supervisord from the command line:

sud         


        
5条回答
  •  走了就别回头了
    2021-02-01 02:50

    For me, I received this error while running as a non-root user:

    Error: Cannot open an HTTP server: socket.error reported errno.EACCES (13)
    

    This went away after I chowned the directory holding the sock file to that user.

    In your case:

    [unix_http_server]
    file = /opt/run/supervisord.sock
    

    Either chown username /opt/run/, or point the file to another directory that is owned by the user.

    I learned this approach from this link.


    Additionally, my sysadmins installed an init.d script I wrote. The init.d script is run as root, but the script can get supervisord to start on myuser with this command:

    SUPERVISORD=/path/to/supervisord
    PIDFILE=/path/to/supervisord.pid
    OPTIONS='-c /path/to/supervisord.conf'
    daemon --pidfile=$PIDFILE --user=myuser $SUPERVISORD $OPTIONS
    

提交回复
热议问题