【问题标题】:Supervisor socket error: Unlinking stale socket /tmp/supervisor.sock主管套接字错误:取消链接过时的套接字 /tmp/supervisor.sock
【发布时间】:2021-04-25 02:27:14
【问题描述】:

我在共享的 Debian 服务器上安装了 Supervisor。当我运行时: supervisord -c supervisord.conf 我不断收到此错误,直到我杀死它:Unlinking stale socket /tmp/supervisor.sock
当我运行supervisorctl status 时,我得到:
unix:///tmp/supervisor.sock no such file
我的 supervisord.conf 文件是这样的(我没有改变任何东西):

[unix_http_server]
file=/tmp/supervisor.sock     ; (the path to the socket file)
;chmod=0700                 ; socket file mode (default 0700)

[supervisord]
logfile=/tmp/supervisord.log ; (main log file;default $CWD/supervisord.log)
logfile_maxbytes=50MB        ; (max main logfile bytes b4 rotation;default 50MB)
logfile_backups=10           ; (num of main logfile rotation backups;default 10)
loglevel=info                ; (log level;default info; others: debug,warn,trace)
pidfile=/tmp/supervisord.pid ; (supervisord pidfile;default supervisord.pid)
nodaemon=false               ; (start in foreground if true;default false)
minfds=1024                  ; (min. avail startup file descriptors;default 1024)
minprocs=200                 ; (min. avail process descriptors;default 200)

[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface

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

[program:laravel-worker]
process_name=%(program_name)s_%(process_num)02d
command=php /path/to/app/artisan queue:work  --sleep=3 --tries=3
autostart=true
autorestart=true
;user=
numprocs=8
redirect_stderr=true
stdout_logfile= /path/to/app/worker.log

当我 cd 到 /tmp 以查找套接字文件时,套接字看起来像这样: supervisor.sock.824804
在我运行supervisord -c supervisord.confcommand 后,服务器以某种方式随机生成了六位数。我是否必须在 supervisord.config 文件中考虑这六位数?我该怎么做,因为它是随机生成的?我也已经在 ma​​cOS Mojave 上安装并运行了 Supervisor,没有任何问题,并且套接字文件就像 supervisor.sock 一样被锁定。提前感谢您的任何帮助和建议!

【问题讨论】:

  • 这能回答你的问题吗? unix:///tmp/supervisor.sock no such file
  • 我已经知道这篇文章了。尝试了一些东西,但没有鸟。首先,我没有管理员权限,所以一半的建议对我不起作用。其次,我的首要问题是,在运行 supervisord -c supervisord.conf 之后,我得到永久Unlinking stale socket /tmp/supervisor.sock,而在那个帖子中,supervisord 已经在运行。我认为这与我的共享主机随机生成的六位数有关(supervisor.sock.824804)。

标签: laravel sockets shared-hosting supervisord unlink


【解决方案1】:

我在supervisord.conf 中设置了nodaemon = true,这解决了我的问题。

【讨论】:

    【解决方案2】:

    unlink /tmp/supervisor.sock

    然后我修复了它“取消链接过时的套接字 /tmp/supervisord.sock”。

    【讨论】:

      猜你喜欢
      • 2013-09-22
      • 2015-07-01
      • 2017-06-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-02-11
      相关资源
      最近更新 更多