【Vesta】php-fpm自动停止且无法启动

6.93K 浏览建站交流
0

最新动态:

已经找到问题根源(见文末)

已经找到原因(但是这个问题依然屡次出现),见文章尾部

之前在vesta相关的博文留言了,但还是补充一下吧。

#执行 service php-fpm start
[root@fr1 ~]# service php-fpm start
Redirecting to /bin/systemctl start php-fpm.service
Job for php-fpm.service failed because the control process exited with error code. See “systemctl status php-fpm.service” and “journalctl -xe” for details.
Vous avez du nouveau courrier dans /var/spool/mail/root

#执行 systemctl status php-fpm.service

● php-fpm.service – The PHP FastCGI Process Manager
Loaded: loaded (/usr/lib/systemd/system/php-fpm.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since mer. 2019-05-01 15:36:50 CST; 2min 23s ago
Process: 4614 ExecStart=/usr/sbin/php-fpm –nodaemonize (code=exited, status=78)
Main PID: 4614 (code=exited, status=78)

mai 01 15:36:49 fr1 systemd[1]: Starting The PHP FastCGI Process Man…..
mai 01 15:36:50 fr1 php-fpm[4614]: [01-May-2019 15:36:50] ERROR: fail…)
mai 01 15:36:50 fr1 php-fpm[4614]: [01-May-2019 15:36:50] ERROR: fail…n
mai 01 15:36:50 fr1 php-fpm[4614]: [01-May-2019 15:36:50] ERROR: FPM …d
mai 01 15:36:50 fr1 systemd[1]: php-fpm.service: main process exited…/a
mai 01 15:36:50 fr1 systemd[1]: Failed to start The PHP FastCGI Proc…r.
mai 01 15:36:50 fr1 systemd[1]: Unit php-fpm.service entered failed …e.
mai 01 15:36:50 fr1 systemd[1]: php-fpm.service failed.
Hint: Some lines were ellipsized, use -l to show in full.

#执行 systemctl status php-fpm.service -l

[root@fr1]# systemctl status php-fpm.service -l
● php-fpm.service – The PHP FastCGI Process Manager
Loaded: loaded (/usr/lib/systemd/system/php-fpm.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since mer. 2019-05-01 15:40:27 CST; 7min ago
Process: 6487 ExecStart=/usr/sbin/php-fpm –nodaemonize (code=exited, status=78)
Main PID: 6487 (code=exited, status=78)

mai 01 15:40:27 fr1 systemd[1]: Starting The PHP FastCGI Process Manager…
mai 01 15:40:27 fr1 php-fpm[6487]: [01-May-2019 15:40:27] ERROR: failed to open error_log (/var/log/php-fpm/error.log): No such file or directory (2)
mai 01 15:40:27 fr1 php-fpm[6487]: [01-May-2019 15:40:27] ERROR: failed to post process the configuration
mai 01 15:40:27 fr1 php-fpm[6487]: [01-May-2019 15:40:27] ERROR: FPM initialization failed
mai 01 15:40:27 fr1 systemd[1]: php-fpm.service: main process exited, code=exited, status=78/n/a
mai 01 15:40:27 fr1 systemd[1]: Failed to start The PHP FastCGI Process Manager.
mai 01 15:40:27 fr1 systemd[1]: Unit php-fpm.service entered failed state.
mai 01 15:40:27 fr1 systemd[1]: php-fpm.service failed.
Vous avez du nouveau courrier dans /var/spool/mail/root

#创建 /var/log/php-fpm/error.log

这里发现log文件夹内不包含php-fpm文件夹,所以说明它无法自己创建该目录

#执行 systemctl start php-fpm

可以正常启动,造成的原因就是系统无法生成 /var/log/php-fpm/error.log

#结果

虽然手动创建文件夹能临时解决问题,但它还是屡次猝死

改文件夹权限也没啥用

然后发现之前根据Qi教程开启了文件管理器后 /usr/local/vesta/conf/vesta.conf 即使改为只读(440)系统还是会自动修改,可能是机器的权限问题?求救大佬。

#问题根源

我可能找到原因了,跟
FILEMANAGER_KEY=’KuwangNetwork’
SFTPJAIL_KEY=’KuwangNetwork’
这段代码有关,只要把它们添加到vesta.conf,php就会突然的挂掉,前天开始我恢复了默认配置,然后就正常了。


分享到:
7doger 编辑问题 2019年5月4日
添加评论
写下您的答案。

Login

Welcome! Login in to your account

Remember me Lost your password?

Don't have account. Register

Lost Password

Register