在使用supervisor時(shí),使用如下命令啟動(dòng)
supervisord -c /etc/supervisord.conf
隔一段時(shí)間使用supervisorctl檢查狀態(tài)時(shí)發(fā)現(xiàn)如下報(bào)錯(cuò)

image.png
原因?yàn)榕渲梦募斜镜豷ocket文件被寫到tmp目錄下,最終被系統(tǒng)定時(shí)清除了
[unix_http_server]
file=/tmp/supervisor.sock ; the path to the socket file
;chmod=0700 ; socket file mode (default 0700)
;chown=nobody:nogroup ; socket file uid:gid owner
;username=user ; default is no username (open server)
;password=123 ; default is no password (open server)
改為
[unix_http_server]
;file=/tmp/supervisor.sock ; (the path to the socket file)
file=/var/run/supervisor.sock ; 修改為 /var/run 目錄或者其他目錄,避免被系統(tǒng)刪除