在 DigitalOcean 托管的 Cento OS 6.4 上安装的 Supervisor 3.1.3 在添加进程时出错

在 DigitalOcean 托管的 Cento OS 6.4 上安装的 Supervisor 3.1.3 在添加进程时出错

我有实时服务器数字海洋使用 Cento OS 6.4 托管。我正在尝试为 Laravel-5 进程安装主管。但是,当我尝试添加进程时,它显示未定义进程的错误。我已将此laravel.conf文件存储在/etc/supervisord.d/

[program:laravel]
command=/usr/local/bin/run_queue.sh
autostart=true 
autorestart=true
stderr_logfile=/var/www/html/laravel/queue.err.log
stdout_logfile=/var/www/html/laravel/queue.out.log

此文件是可执行文件。我尝试了所有介质上的所有可能方法。有人遇到同样的问题吗?任何帮助都将不胜感激。

编辑:运行此程序我得到:

sudo service supervisord restart
Shutting down supervisord:                                 [OK  ]
 Starting supervisord: /usr/lib/python2.6/site-packages supervisor    /options.py:296: 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 '
                                                   [FAILED]

答案1

您是否尝试过更改命令?

命令 = /路径/到/laravel/php artisan 队列:工作 sqs --sleep = 3 --tries = 3 --daemon

文件: http://laravel.com/docs/5.1/queues#supervisor-configuration

但我相信这是因为它找不到 conf 文件。你试过这个吗:echo_supervisord_conf > Supervisord.conf

sudo cp supervisord.conf /etc/supervisord.conf

sudo mkdir /etc/supervisord.d/

sudo vi /etc/supervisord.conf

[包括] 文件 = /etc/supervisord.d/*.conf :

关联:https://rayed.com/wordpress/?p=1496

如果你只有 laravel worker,你可以将该行更改为 /etc/supervisord.d/laravel.conf

相关内容