supervisor使用問題1:unix:///var/run/supervisor.sock refused connection

在使用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)刪除
最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容