php-fpm 重启失败,php-fpm启动失败

李泓
2023-12-01

背景:

私有云服务器 重启后php-fpm服务启动失败

报错:

[root@localhost php-fpm.d]# systemctl restart 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.

查看systemctl status php-fpm

● 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 二 2019-08-27 17:06:57 CST; 1min 2s ago

Process: 5015 ExecStart=/usr/sbin/php-fpm --nodaemonize --fpm-config /etc/php-fpm.conf (code=exited, status=78)

Main PID: 5015 (code=exited, status=78)

8月 27 17:06:57 localhost.localdomain systemd[1]: Starting The PHP FastCGI Process Manager...

8月 27 17:06:57 localhost.localdomain php-fpm[5015]: [27-Aug-2019 17:06:57] ERROR: [/etc/php-fpm.d/www.conf:120] unknown ent...cal''

8月 27 17:06:57 localhost.localdomain php-fpm[5015]: [27-Aug-2019 17:06:57] ERROR: Unable to include /etc/php-fpm.d/www.conf...e 120

8月 27 17:06:57 localhost.localdomain php-fpm[5015]: [27-Aug-2019 17:06:57] ERROR: failed to load configuration file '/etc/p...conf'

8月 27 17:06:57 localhost.localdomain php-fpm[5015]: [27-Aug-2019 17:06:57] ERROR: FPM initialization failed

8月 27 17:06:57 localhost.localdomain systemd[1]: php-fpm.service: main process exited, code=exited, status=78/n/a

8月 27 17:06:57 localhost.localdomain systemd[1]: Failed to start The PHP FastCGI Process Manager.

8月 27 17:06:57 localhost.localdomain systemd[1]: Unit php-fpm.service entered failed state.

8月 27 17:06:57 localhost.localdomain systemd[1]: php-fpm.service failed.

然后查看日志

[root@localhost php-fpm.d]# tail -20 /var/log/messages

Aug 27 17:13:27 localhost smbd[5234]: Ignoring unknown parameter "admin user"

Aug 27 17:13:27 localhost smbd[5234]: [2019/08/27 17:13:27.966738, 0] ../lib/param/loadparm.c:784(lpcfg_map_parameter)

Aug 27 17:13:27 localhost smbd[5234]: Unknown parameter encountered: "admin user"

Aug 27 17:13:27 localhost smbd[5234]: [2019/08/27 17:13:27.966769, 0] ../lib/param/loadparm.c:1844(lpcfg_do_service_parameter)

Aug 27 17:13:27 localhost smbd[5234]: Ignoring unknown parameter "admin user"

Aug 27 17:13:27 localhost smbd[5234]: [2019/08/27 17:13:27.967337, 0] ../lib/param/loadparm.c:1862(lpcfg_do_service_parameter)

Aug 27 17:13:27 localhost smbd[5234]: Global parameter keepalive found in service section!

Aug 27 17:13:27 localhost smbd[5234]: [2019/08/27 17:13:27.967507, 0] ../lib/param/loadparm.c:1862(lpcfg_do_service_parameter)

Aug 27 17:13:27 localhost smbd[5234]: Global parameter keepalive found in service section!

Aug 27 17:13:27 localhost smbd[5235]: [2019/08/27 17:13:27.986741, 0] ../source3/smbd/sesssetup.c:859(reply_sesssetup_and_X)

Aug 27 17:13:27 localhost smbd[5235]: reply_sesssetup_and_X: Rejecting attempt at 'normal' session setup after negotiating spnego.

Aug 27 17:14:54 localhost systemd: Starting The PHP FastCGI Process Manager...

Aug 27 17:14:54 localhost php-fpm: [27-Aug-2019 17:14:54] ERROR: **[/etc/php-fpm.d/www.conf:120] unknown entry ''memcache.local''**

Aug 27 17:14:54 localhost php-fpm: [27-Aug-2019 17:14:54] ERROR: Unable to include /etc/php-fpm.d/www.conf from /etc/php-fpm.conf at line 120

Aug 27 17:14:54 localhost php-fpm: [27-Aug-2019 17:14:54] ERROR: failed to load configuration file '/etc/php-fpm.conf'

Aug 27 17:14:54 localhost php-fpm: [27-Aug-2019 17:14:54] ERROR: FPM initialization failed

Aug 27 17:14:54 localhost systemd: php-fpm.service: main process exited, code=exited, status=78/n/a

Aug 27 17:14:54 localhost systemd: Failed to start The PHP FastCGI Process Manager.

Aug 27 17:14:54 localhost system**加粗样式**d: Unit php-fpm.service entered failed state.

Aug 27 17:14:54 localhost systemd: php-fpm.service failed.

其中ERROR: **[/etc/php-fpm.d/www.conf:120] unknown entry ‘‘memcache.local’’**提示的错误是关键,

处理:

将www.conf的120行内容注释掉

然后重启成功!!

 类似资料: