nidaye 发表于 2023-3-30 13:53:57

动supervisor启动显示已经停止

cloudreve 后台启动supervisor启动显示已经停止,重启无效,日志报错如下,求指导。
2023-03-30 03:24:36,378 WARN No file matches via include "/www/server/supervisor/conf.d/*.ini"

2023-03-30 03:24:36,378 INFO Set uid to user 0 succeeded
2023-03-30 03:24:36,383 INFO RPC interface 'supervisor' initialized
2023-03-30 03:24:36,384 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2023-03-30 03:24:36,385 INFO daemonizing the supervisord process
2023-03-30 03:24:36,386 INFO supervisord started with pid 30162
2023-03-30 03:25:12,731 INFO spawnerr: can't find command 'php'
2023-03-30 03:25:14,096 INFO spawnerr: can't find command 'php'
2023-03-30 03:29:18,088 INFO spawnerr: can't find command 'php'
2023-03-30 03:29:19,505 INFO spawnerr: can't find command 'php'


midoks 发表于 2023-3-30 13:56:03

明显是php没有找到。

建议用绝对路径。

nidaye 发表于 2023-3-30 14:07:37

是要修改/www/server/supervisor/下supervisor.conf 这个配置文件么,如果是的话,具体需要修改那一部分呢,我找了半天没找到修改位置,还望指导。

nidaye 发表于 2023-3-30 15:08:12


command=php xx horizon
directory=/www/wwwroot/xx.com/
autorestart=true
startsecs=3
startretries=3
stdout_logfile=/www/server/panel/plugin/supervisor/log/rd.out.log
stderr_logfile=/www/server/panel/plugin/supervisor/log/rd.err.log
stdout_logfile_maxbytes=2MB
stderr_logfile_maxbytes=2MB
user=www
priority=999
numprocs=1
process_name=%(program_name)s
软件是相同的,这是子配置,跟BT对比过,未曾发现问题。

midoks 发表于 2023-3-30 15:45:49

两种方法:
1.PHP填写绝对路径。
php xx horizon -> /www/xxx/xx/php xx horizon.
2.在网站下->PHP命令行版本 设置全局php功能。

nidaye 发表于 2023-3-30 16:57:40

设为全局后,还是打不开,
命令如下
# ln -svf /www/server/php/74/bin/php /usr/bin/php
‘/usr/bin/php’ -> ‘/www/server/php/74/bin/php’
# which php
/usr/bin/php 查找到文件后,发现文件30多M,下图为文件大小截图
后续supervisor启动报错如下
2023-03-30 08:53:30,818 INFO RPC interface 'supervisor' initialized
2023-03-30 08:53:30,818 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2023-03-30 08:53:30,820 INFO daemonizing the supervisord process
2023-03-30 08:53:30,821 INFO supervisord started with pid 1829
2023-03-30 08:53:31,828 INFO spawned: 'xx' with pid 1830
2023-03-30 08:53:33,267 WARN exited: xx (exit status 1; not expected)
2023-03-30 08:53:34,272 INFO spawned: 'xx' with pid 1853
2023-03-30 08:53:35,714 WARN exited: xx (exit status 1; not expected)
2023-03-30 08:53:37,719 INFO spawned: 'xx' with pid 1875
2023-03-30 08:53:39,222 WARN exited: xx (exit status 1; not expected)

配置文件如下

command=php /www/wwwroot/xx.com/artisan schedule:run
directory=/www/wwwroot/xx.com/
autorestart=true
startsecs=3
startretries=3
stdout_logfile=/www/server/supervisor/log/xx.out.log
stderr_logfile=/www/server/supervisor/log/xx.err.log
stdout_logfile_maxbytes=2MB
stderr_logfile_maxbytes=2MB
user=root
priority=999
numprocs=1
process_name=%(program_name)s

nidaye 发表于 2023-3-30 16:59:41

nidaye 发表于 2023-3-30 16:57
设为全局后,还是打不开,
命令如下
# ln -svf /www/server/php/74/bin/php /usr/bin/php




此图为 php 文件
页: [1]
查看完整版本: 动supervisor启动显示已经停止