supervisor解决///tmp/supervisor.sock no such file的问题

1、打开配置文件

[plain]  view plain  copy
  1. vim /etc/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自动清掉

2、修改权限

[html]  view plain  copy
  1. sudo chmod 777 /run  
  2. sudo chmod 777 /var/log  

如果没改,启动报错 IOError: [Errno 13] Permission denied: '/var/log/supervisord.log'

3、创建supervisor.sock

[plain]  view plain  copy
  1. sudo touch /var/run/supervisor.sock  
  2. sudo chmod 777 /var/run/supervisor.sock  

4、启动supervisord,注意stop之前的实例或杀死进程

[plain]  view plain  copy
  1. supervisord  

猜你喜欢

转载自blog.csdn.net/qq_40771567/article/details/80061644