解决:Job for nginx.service failed because the control process exited with error code

Nginx——Nginx启动报错Job for nginx.service failed because the control process exited with error code 一、报错如下 Job for nginx.service failed because the control process exited with error code. See "systemctl status nginx.service" and "journalctl -xe" for details. 二、解决原因 1、先检查nginx配置文件正否正确 输入nginx -t 命令,如果反回 successful表示配置文件无错误,否则说明配置文件有错误。 [root@localho 阅读详情

解决启动nginx时报错“Job for nginx.service failed because the control process exited with error code”

  • 在安装完nginx时启动
[root@qmfz nginx]# systemctl start nginx
Job for nginx.service failed because the control process exited with error code. See "systemctl status nginx.service" and "journalctl -xe" for details.
[root@qmfz nginx]# nginx
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] still could not bind()

  • 我们先查看一下nginx服务情况
[root@qmfz nginx]# systemctl status nginx.service
● nginx.service
   Loaded: loaded (/usr/lib/systemd/system/nginx.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since 三 2021-01-20 12:22:58 CST; 1min 12s ago
  Process: 13931 ExecStart=/usr/local/nginx/sbin/nginx (code=exited, status=1/FAILURE)

1月 20 12:22:56 qmfz nginx[13931]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Add...se)
1月 20 12:22:56 qmfz nginx[13931]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Add...se)
1月 20 12:22:57 qmfz nginx[13931]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Add...se)
1月 20 12:22:57 qmfz nginx[13931]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Add...se)
1月 20 12:22:58 qmfz nginx[13931]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Add...se)
1月 20 12:22:58 qmfz nginx[13931]: nginx: [emerg] still could not bind()
1月 20 12:22:58 qmfz systemd[1]: nginx.service: control process exited, code=exited status=1
1月 20 12:22:58 qmfz systemd[1]: Failed to start nginx.service.
1月 20 12:22:58 qmfz systemd[1]: Unit nginx.service entered failed state.
1月 20 12:22:58 qmfz systemd[1]: nginx.service failed.
Hint: Some lines were ellipsized, use -l to show in full.
  • (98: Add…se)端口已被占用,我们看看是被什么占用了
[root@qmfz nginx]# netstat -apn|grep :80
tcp        0      0 192.168.10.140:53002    14.17.102.87:80         TIME_WAIT   -            
tcp6       0      0 127.0.0.1:8005          :::*                    LISTEN      2450/java    
tcp6       0      0 :::8009                 :::*                    LISTEN      2450/java    
tcp6       0      0 :::8080                 :::*                    LISTEN      2450/java    
tcp6       0      0 :::80                   :::*                    LISTEN      987/httpd    

PS:没有netstat这个命令,可以使用yum install net-tools安装。

  • 我们可以看出是被httpd占用了80端口,可以停止该服务或者更改nginx的端口。
[root@qmfz nginx]# service httpd stop
Redirecting to /bin/systemctl stop httpd.service
  • 最后启动nginx就可以了
启动mariadb/mysql报错Job for mariadb.service failed because the control process exited with error code解决 报错:Job for mariadb.service failed because the control process exited with error code. See "systemctl status mariadb.service" and "journalctl -xe" for details. 分析:导致这类错误cocntrol process exited的原因有多种,我... 阅读详情

相关推荐

关于Job for mysqld.service failed because the control process exited with error code报错解决办法

4.查看mysql状态:systemctl status mysqld。3. cd /var/lib/ 给mysql赋予777权限。2. 先杀死所有mysql相关进程。

yinghuadaozhang的博客 8697

Job for nginx.service failed because the control process exited with error code. See “systemctl stat

启动nginx服务时如果遇到这个错误 Job for nginx.service failed because the control process exited with error code. See “systemctl stat 可能原因如下: 1.nginx配置文件有错误 运行下面命令查看修改 nginx -t 2.已经启动nginx或者配置文件中的端口号被占用 检查端口是否被占用...

weixin_44486991的博客 6万+

从时序博弈到数据稳定:CS1237驱动中的信号滤波与卡尔曼实践

本文探讨了CS1237高精度ADC驱动在复杂工业环境中的信号处理挑战,重点介绍了一阶滤波与自适应卡尔曼滤波算法的实践应用。通过参数优化和动态调整策略,有效提升了数据稳定性和抗干扰能力,为嵌入式系统在噪声环境下的精密测量提供了可靠解决方案。

rnn9storyteller的博客 863

Job for nginx.service failed because the control process exited with error code.

nginx conf配置文件配置错误

m0_50176078的博客 1万+

VisualStudio2022配置CGAL

vs2022和vs2017安装配置boost没什么区别,只需要注意boost的msvc得是14.3的,这玩意跟visualstudio版本挂钩的。压缩包解压,得到下面这两文件,然后把auxiliary这个文件挪到CGAL-5.6里面就行了。我用cgal读取一个stl模型,并输出相关信息(想可视化的话需要安装Qt,不想装Qt也可以装VTK)然后下载下面这两个压缩包。照着下面的截图填就完事了。

weixin_43850909的博客 1171

AudioTrack音频播放流程深度解析

深入解析Android AudioTrack音频播放的完整链路:从Java API到Native层,从共享内存Ring Buffer机制到FAST Track低延迟优化,配合源码分析带你彻底搞懂Android音频播放的底层原理

Cheson的专栏 940

启动nginx服务报错Job for nginx.service failed because the control process exited with error code.

nginx使用service nginx restart报错 启动nginx服务时如果遇到这个错误 Job for nginx.service failed because the control process exited with error code. See "systemctl status nginx.service" and "journalctl -xe" for details. 可能原因: 1、配置文件语法有误,执行nginx -t 查看输出提示信息 并检查端口是否被占用net

常敲代码手不生 6万+

Qt Location实战:5分钟搞定地图插件切换与卫星图源加载(附完整代码)

本文是Qt Location开发系列教程的实战指南,详细讲解如何在Qt应用中快速实现地图插件(如Esri、OSM、MapboxGL)的动态切换与卫星图源的加载。通过清晰的代码示例,帮助开发者理解插件机制,解决常见配置问题,并在5分钟内构建出具备交互式地图切换功能的应用程序。

kafka6courier的博客 525

Nginx启动出现Job for nginx.service failed because the control process exited with error code.

这种错误一般都是目录不存在或者权限不足,所以直接执行下面两条命令即可,结果发现根本行不通。重新启动nginx,就可以正常运行了。发现报了如此对的错误信息。

2201_75967071的博客 1万+

电子元器件-接口电路篇:RS-232、RS485/422、I2C、SPI、USB、网口

以上规定说明了RS-232C 标准对逻辑电平的定义。对于数据(信息码):逻辑“1”的传输的电平为-3V~-15V,逻辑“0”传输的电平为+3V~+15V;对于控制信号;接通状态(ON)即信号有效的电平为+3V~+15V,断开状态(OFF)即信号无效的电平为-3V~-15V,也就是当传输电平的绝对值大于3V 时,电路可以有效地检查出来;

qq_60226558的博客 887

Unreal5从入门到精通之EnhancedInput增强输入系统详解

从Unreal5开始,老版的输入系统,正式替换为EnhancedInput增强型输入系统,他们之间有什么区别呢?如果有使用过Unity的同学,大概也知道,Unity也在2020版本之后逐渐把输入系统也升级成了新版输入系统,为什么Unreal和Unity都热衷于升级输入系统呢?这之间又有什么联系呢?官方:增强输入EnhancedInput希望这篇文章能够对你有所帮助。

TxNet 944

nginx 启动报错:Job for nginx.service failed because the control process exited with error code

nginx 启动报错:Job for nginx.service failed because the control process exited with error code >>> service nginx restart Job for nginx.service failed because the control process exited with err...

陈新明博客 8万+

RT-Thread Studio 使用笔记(七)| 配合STM32CubeMX添加裸机驱动(以ADC为例)

1. 配置STM32CubeMX 2. 复制stm32xxxx_hal_msp.c文件 将 CubeMx 生成的代码 stm32f7xx_hal_msp.c 函数复制到 RT-Thread Studio 生成的工程中,并参与工程编译: 由于我们并没有使用 CubeMx 生成的工程,所以这里需要将 stm32f7xx_hal_msp.c 文件中 #include “main.h” 替换为 #i...

Mculover666的博客(嵌入式) 9626

关于Nginx开机自动启动-以及错误解决Job for nginx.service failed because the control process exited with error code

3、4、这个命令会创建一个符号链接,将 Nginx 服务的启动脚本放入目录下的.wants目录,或者直接在目录中,这取决于你的系统配置。如果返回enabled,则表示开机自启动已经设置成功。6、: 创建一个新的服务单元文件3、: 使 systemd 重新加载配置文件。4、: 启动你的 Nginx 服务。5、: 使服务在开机时自动启动。6、: 检查服务的状态以确保它正在运行。请确保替换上述示例中的ExecStartExecReload和ExecStop中的路径为你的实际 Nginx 可执行文件路径。

doczs的博客 2039

5G 模组 FM650 USB模式查询及网络配置

完成以上配置后,5G模组可进行搜网,入网成功后,上位机获取 5G IP。

十年通信老兵的技术修炼之路——从3G到5G,从地面基站到卫星通信。 1323

ET2012新版免狗免安装绿色软件

ET2012新版免狗免安祖昂绿色软件。,新界面,新视觉,

nginx启动报错Job for nginx.service failed because the control process exited with error code. See “syste

nginx启动报错Job for nginx.service failed because the control process exited with error code. See "systemctl status nginx.service" and "journalctl -xe" for details.

qq_37263429的博客 8283

pscad IEEE标准系统搭建说明

pscad IEEE标准系统搭建说明,包含典型的IEEE 9节点、14节点、30节点、39节点和118节点系统。内含标准测试系统的原始数据和潮流结果。

Linux上启动Nginx失败:Job for nginx.service failed because the control process exited with error code

Linux上启动Nginx失败,报错:Job for nginx.service failed because the control process exited with error code。nginx 服务启动失败是因为 SELinux 拒绝了 /usr/sbin/nginx 进程在端口 8847 上进行 name_bind 操作。具体解决方案,详细有图。

那仰望的人,心底的孤独和叹息 6059

jre9下载 jdk9

(Java SE Runtime Environment 9.0) 9.0u175 官方最新版 【x86|x64】

数学建模模型总结

这是本人在两年内准备参加数学建模竞赛搜集到的模型资料,已经经过了本人的筛选和整理,希望能够对准备参加数学建模竞赛的学弟学妹们提供一些帮助!

Job for openresty.service failed because the control process exited with error code.

在centos7中,启动openresty时报错: Job for openresty.service failed because the control process exited with error code. See "systemctl status openresty.service" and "journalctl -xe" for details. 然后执行: system...

qq_43732691的博客 2561

Centos启动Apache失败,显示Job for httpd.service failed because the control process exited with error code.

需要的工具: centos 7.x以上的镜像文件 本地VMware 15.5以上 Navicat Premium 使用XSHELL 7和XFTP 其他软件都可 Wechat_devtool (微信开发者工具) ego微商客户端源码 相关软件和源码: hi,这是我用百度网盘分享的内容~复制这段内容打开「百度网盘」APP即可获取 链接:https://pan.baidu.com/s/1U8VrsKr-01aXWyuZ5FfWOg?pwd=1024 提取码:1024 当我们执行systemctl s

zwslovexyj的博客 1万+

Linux Job for nginx.service failed because the control process exited with error code. See “systemct

Job for nginx.service failed because the control process exited with error code. See “systemctl status nginx.service” and “journalctl -xe” for details. 报错解决方法。 场景描述: 安装Nginx、启动项目出现的维妮塔 解决方案: 查看配置文件是否...

H_sen's Blog 2392

[Nginx]-Job for nginx.service failed because the control process exited with error code.已解决

Nginx异常 Job for nginx.service failed because the control process exited with error code. See “systemctl status nginx.service” and “journalctl -xe” for details. nginx正常安装 省略… nginx配置systemctl方式启动 第一步:创建nginx.service文件 vim /usr/lib/systemd/system/nginx.servi

qq_40898875的博客 3895

关于处理:Job for nginx.service failed because the control process exited with error code.……问题

处理:Job for nginx.service failed because the control process exited with error code. See "systemctl status nginx.service" and "journalctl -xe" for details.(端口号被占用)问题解决方案:一.更改Apache默认端口号1.yum安装后,apache配...

yunnuo的博客 1668

启动nginx报错Job for nginx.service failed because the control process exited with error code.

【问题描述】 systemctl start nginx 启动 nginx 报错 Job for nginx.service failed because the control process exited with error code.See "systemctl status nginx.service" and "journalctl -xe" for details. 【问题解决】 根据提示,执行 systemctl status nginx 查看情况,看到有提示Starting n.

a12123456的博客 1万+
上一篇: 部署Tomcat服务器,搭建HTTPS网站
下一篇: 部署Nginx服务器,实现对Tomcat服务器的反向代理
Chensay.
博客等级 码龄6年 1万+粉丝 122原创
评论 1
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值