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
相关推荐
阿米亚波40 分钟前
【C++ STL】std::unordered_multiset
开发语言·数据结构·c++·笔记·stl
我是唐青枫1 小时前
Java ReentrantLock 实战详解:比 synchronized 更灵活的可重入锁
java·开发语言
QH139292318801 小时前
# R&S ZNB43 ZNA43 ZNA67矢量网络分析仪
开发语言·网络·php
脚踏实地皮皮晨2 小时前
003003001_Grid控件
开发语言·windows·算法·c#·visual studio
十年磨剑走天涯2 小时前
C++ STL 容器操作复杂度速查表
开发语言·c++
always_TT2 小时前
【Python requirements.txt 依赖管理】
开发语言·python
15Moonlight2 小时前
C++进阶(09):特殊类设计
开发语言·c++
宁风NF2 小时前
JavaScript:网络请求与前端通信
开发语言·前端·javascript·网络·学习·ecmascript
Logintern092 小时前
py文件开头为什么需要加:from __future__ import annotations
开发语言·python