Failed to start The PHP FastCGI Process Manager.

报错如下:

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.

2月 25 21:49:00 nginx systemd1: Starting The PHP FastCGI Process Manager...

2月 25 21:49:00 nginx php-fpm86494: 25-Feb-2025 21:49:00 ERROR: unable to bind listening socket for address '127.0.0.1:9000': Addr...use (98)

2月 25 21:49:00 nginx php-fpm86494: 25-Feb-2025 21:49:00 ERROR: FPM initialization failed

2月 25 21:49:00 nginx systemd1: php-fpm.service: main process exited, code=exited, status=78/n/a

2月 25 21:49:00 nginx systemd1: Failed to start The PHP FastCGI Process Manager.

2月 25 21:49:00 nginx systemd1: Unit php-fpm.service entered failed state.

2月 25 21:49:00 nginx systemd1: php-fpm.service failed.

Hint: Some lines were ellipsized, use -l to show in full.

root@nginx /usr/local/nginx/html#systemctl start php-fpm

解决方法

查看端口:

bash 复制代码
ss -tunlp | grep php

发现进程中已经有php-fpm存在,将其杀死

杀死进程

bash 复制代码
pkill -9 php-fpm

systemctl start php-fpm
systemctl status php-fpm

第二中报错可能

在编辑/etc/php-fpm.d/www.conf文件时,user=nginx,但是linux系统中没有创建nginx用户

使用如下方法解决

bash 复制代码
id nginx
useradd -M -s /usr/sbin/nologin nginx
id nginx
systemctl restart php-fpm
systemctl status php-fpm
相关推荐
c++之路1 小时前
CMake 系列教程(二):基础命令详解
开发语言·c++
南境十里·墨染春水5 小时前
C++ 工厂模式:从入门到进阶,彻底掌握对象创建的艺术
开发语言·c++·算法
JosieBook7 小时前
【数据库】时序预测能力的分级进化:TimechoAI如何让每一类用户都能精准预见未来
java·开发语言·数据库
加号37 小时前
【C#】 文件与目录管理:创建、删除操作的技术解析
开发语言·c#
diving deep7 小时前
脚本速览-python
开发语言·python
一生了无挂8 小时前
Java处理JSON技巧教学(从基础到高阶实战全覆盖)
java·开发语言·json
swordbob8 小时前
Spring 单例 Bean 是线程安全的吗?
java·开发语言
小小编程路9 小时前
C++ 异常 完整讲解
开发语言·c++
AI科技星9 小时前
数术工坊 · 第四卷 橡皮泥江湖(拓扑学)【完整定稿】
c语言·开发语言·汇编·electron·概率论·拓扑学
张忠琳10 小时前
【Go 1.26.4】Golang Select 深度解析
开发语言·后端·golang