当前位置:   article > 正文

supervisor出现Unlinking stale socket /tmp/supervisor、unix:/run/supervisor/supervisor.sock no such file_unlinking stale socket /tmp/supervisor.sock

unlinking stale socket /tmp/supervisor.sock

supervisor出现Unlinking stale socket /tmp/supervisor、unix:/run/supervisor/supervisor.sock no such file。遇到以上类似的问题,可以通过以下步骤得到解决。

1、修改配置文件

vim supervisord.conf
这里把所有的/tmp路径改掉,
/tmp/supervisor.sock 改成/var/run/supervisor.sock,
/tmp/supervisord.log 改成/var/log/supervisor.log,
/tmp/supervisord.pid 改成 /var/run/supervisor.pid 要不容易被linux自动清掉。
  • 1
  • 2
  • 3
  • 4
  • 5

样例如下:

[unix_http_server]
file=/run/supervisor/supervisor.sock   ; the path to the socket file

[supervisord]
logfile=/var/log/supervisord.log ; main log file; default $CWD/supervisord.log

pidfile=/run/supervisor/supervisord.pid ; supervisord pidfile; default supervisord.pid

[supervisorctl]
serverurl=unix:///run/supervisor/supervisor.sock ; use a unix:// URL  for a unix socket

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11

2、修改权限

sudo chmod 777 -R /run
sudo chmod 777 -R /var
  • 1
  • 2

如果没改,启动可能会报错 IOError: [Errno 13] Permission denied: ‘/var/log/supervisord.log’

3、创建supervisor.sock

sudo touch /run/supervisor/supervisor.sock
sudo chmod 777 /run/supervisor/supervisor.sock
sudo chmod 777 -R /run
  • 1
  • 2
  • 3

4、添加supervisor.sock链接

unlink /run/supervisor/supervisor.sock
  • 1

5、启动supervisord

注意stop之前的实例或杀死进程。

supervisord
或者
supervisord -c /home/Nox/conf/nox/supervisord.conf
  • 1
  • 2
  • 3

更多有趣的实用技术,请查看对应的专栏。

更多干货资源请关注作者的专栏。

留言点赞关注,我们一起分享AI学习与发展的干货。

正经的技术,不正经的程序员~

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/花生_TL007/article/detail/401565
推荐阅读
相关标签
  

闽ICP备14008679号