unix:///tmp/supervisor.sock no such file
1.打开配置文件
nano /etc/supervisord.conf
2.修改后如下内容:
unix_http_server结点
[unix_http_server]
;file=/tmp/supervisor.sock ; (the path to the socket file)
file=/var/run/supervisor.sock ;
supervisord结点
[supervisord]
;logfile=/tmp/supervisord.log ; (main log file;default $CWD/supervisord.log)
logfile=/var/log/supervisord.log ;
supervisorctl结点
[supervisorctl]
;serverurl=unix:///tmp/supervisor.sock ; use a unix:// URL for a unix socket
serverurl=unix:///var/run/supervisor.sock ;
3.修改后保存文件
参考文档:
解决unix:///tmp/supervisor.sock no such file的问题
"unix:///tmp/supervisor.sock no such file" 错误处理 (亲测)
这种方法,我改了之后,并不管用,所以配置文件又改回去了
又试了这种方法:这里注意 supervisord.conf文件的路径(这回管用了)
执行命令报错:
[root@67 etc]# /usr/bin/python2 /usr/bin/supervisord -c /etc/supervisord.conf
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
解决办法
Terminal上输入
ps -ef | grep supervisord
获取所有supervisord正在运行的pid
root 2503 1 0 Nov19 ? 00:03:23 /usr/bin/python /usr/bin/supervisord
root 21337 2556 0 18:15 pts/8 00:00:00 grep --color=auto supervisord
pid=2503
kill -s SIGTERM 2503
之后在重新执行
supervisord -c /etc/supervisord.conf
后记---这个问题又在反复的出现诶
先是这个问题
(gotest_official) [root@devops-testserver01 gotest_official]# supervisord -c /etc/supervisord.conf Unlinking stale socket /data/logs/supervisor/supervisor.sock
试了
(gotest_official) [root@devops-testserver01 gotest_official]# unlink /data/logs/supervisor/supervisor.sock (gotest_official) [root@devops-testserver01 gotest_official]# supervisorctl status unix:///data/logs/supervisor/supervisor.sock no such file
之后就又出现no such file的问题
换了一台服务器,现在第2种方法也不试用了
首先根据百度的结果,造成这个问题的原因是:使用systemctl enable supervisord 设置开机启动,一般就不会出现 socker文件不存在的问题了
参考文档:
解决unix:///tmp/supervisor.sock no such file的问题
执行命令 supervisorctl 就可以看到你的进程状态了
[root@devops-testserver01 app_user_5i5j]# supervisorctl gotest RUNNING pid 15897, uptime 0:00:03 supervisor>
蒙,进行了一堆操作,一直都有异常问题,执行命令supervisorctl也看不到gotest任务有启动着,但是去了个厕所,他竟然神奇的好了
这是什么情况。。。纳尼???
我回忆,我进行的关键的操作是在/data/logs/supervisor/这个目录下创建了 supervisor.sock这个文件,文件内容为空,操作权限为777
我参考的文档有:
解决unix:///tmp/supervisor.sock no such file的问题
解决unix:///var/run/supervisor.sock no such file
解决unix:///var/run/supervisor.sock no such file
解决unix:///tmp/supervisor.sock no such file的问题