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
相关推荐
点心的游戏开发世界6 小时前
GDScript 入门笔记(十一):Lambda 与匿名函数
开发语言·笔记·游戏引擎·godot
事圆则缓8 小时前
Kotlin 协程完全指南
开发语言·kotlin
我爱写代码i9 小时前
BeLink - 支持生成多种URL 缩短网址PHP源码
开发语言·php·短网址php源码
Java后端的Ai之路9 小时前
20、Python - 备忘录模式
开发语言·人工智能·python·外观模式·备忘录模式
统计学小王子10 小时前
数学建模国赛倒计时4天——《统计模型精讲(混合效应模型R语言实现)》
开发语言·数学建模·r语言
知无不研10 小时前
c语言中循环的介绍与简单应用
c语言·开发语言·算法·循环·for·while
郝学胜-神的一滴10 小时前
Qt 高级编程 045:坐标体系深度实战
开发语言·c++·windows·python·qt·程序人生
dsyyyyy110110 小时前
JS复习,难点,易错点总结
开发语言·javascript·ecmascript
“AI国潮设计-小江”11 小时前
Python实战 | SDXL精准控制“普宁英歌舞×星空蛋糕”IP落地,附核心Prompt与商用授权思路
开发语言·人工智能·python·prompt·aigc
小刘在重生~13 小时前
Java常用类|String类详解 + BigDecimal精准计算(含面试题)
java·开发语言·python