supervisor报错记录

Posted liusingbon

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了supervisor报错记录相关的知识,希望对你有一定的参考价值。

使用supervisor守护frpc客户端进程,确保开机自启端口,记录报错过程。

报错1[centos@localhost supervisor]$ sudo supervisord

/usr/lib/python2.7/site-packages/supervisor/options.py:461: UserWarning: Supervisord is running as root and it is searching for its configuration file in default locations (including its current working directory); you probably want to specify a "-c" argument specifying an absolute path to a configuration file for improved security.

  ‘Supervisord is running as root and it is searching ‘

解决:按照上面的提示,用supervisord 直接启动supervisor 会引起报错,故第一次启动的时候要加上配置文件。

[centos@localhost supervisor]$ sudo supervisord -c /etc/supervisord.conf

报错2[centos@localhost supervisor]$ sudo supervisord -c /etc/supervisord.conf

Unlinking stale socket /var/run/supervisor/supervisor.sock

解决:

[centos@localhost supervisor]$ unlink /var/run/supervisor/supervisor.sock

报错3[centos@localhost supervisord.d]$ sudo supervisorctl status

unix:///var/run/supervisor/supervisor.sock no such file

解决:

1.需改权限

sudo chmod 777 /run
sudo chmod 777 /var/log

2.创建supervisor.sock文件

[centos@localhost supervisord.d]$ sudo touch /var/run/supervisor/supervisor.sock

[centos@localhost supervisord.d]$ sudo chmod 777 /var/run/supervisor/supervisor.sock

3.重启

[centos@localhost supervisor]$ sudo supervisord -c /etc/supervisord.conf

报错4[centos@localhost supervisor]$ sudo 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 /bin/supervisord -h

解决:

[centos@localhost supervisor]$ ps -ef | grep supervisord    #查看supervisord进程

root      13000      1  0 16:59 ?        00:00:00 /usr/bin/python /bin/supervisord

centos    13347   3471  0 17:00 pts/0    00:00:00 grep --color=auto supervisord

[centos@localhost supervisor]$ sudo kill -s SIGTERM 13000  #杀死进程

[centos@localhost supervisor]$ ps -ef | grep supervisord   #确认进程supervisord被杀死

centos    13664   3471  0 17:01 pts/0    00:00:00 grep --color=auto supervisord

[centos@localhost supervisor]$ sudo supervisord -c /etc/supervisord.conf   #启动新的supervisord进程

结束。

以上是关于supervisor报错记录的主要内容,如果未能解决你的问题,请参考以下文章

/tmp/supervisor.sock no such file 报错

supervisor启动报错

centos 普通用户操作 supervisor 报错

centos 普通用户操作 supervisor 报错

task supervisor timed out 报错及解决

Supervisor管理Laravel队列进程报错