nginx.service: control process exited, code=exited status=1
安装linux的宝塔面板,结果面板显示nginx和php已经运行了,但是机器系统上并没有运行。记录一次nginx报错,操作步骤看下代码:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | [root@localhost nginx]# systemctl status nginx.service ● nginx.service - LSB: starts the nginx web server Loaded: loaded (/etc/rc.d/init.d/nginx; bad; vendor preset: disabled) Active: failed (Result: exit-code) since Mon 2019-07-22 16:41:54 CST; 43s ago Docs: man:systemd-sysv-generator(8) Process: 28076 ExecStart=/etc/rc.d/init.d/nginx start (code=exited, status=1/FAILURE) Jul 22 16:41:54 localhost.localdomain systemd[1]: Starting LSB: starts the nginx web server... Jul 22 16:41:54 localhost.localdomain nginx[28076]: Starting nginx... nginx (pid 26717 26716 26715 26042) already running. Jul 22 16:41:54 localhost.localdomain systemd[1]: nginx.service: control process exited, code=exited status=1 Jul 22 16:41:54 localhost.localdomain systemd[1]: Failed to start LSB: starts the nginx web server. Jul 22 16:41:54 localhost.localdomain systemd[1]: Unit nginx.service entered failed state. Jul 22 16:41:54 localhost.localdomain systemd[1]: nginx.service failed. [root@localhost nginx]# ps -e | grep nginx ##查看nginx进程 26042 ? 00:00:00 nginx 26715 ? 00:00:00 nginx 26716 ? 00:00:00 nginx 26717 ? 00:00:00 nginx [root@localhost nginx]# kill -9 26042 ###杀死以下进程 [root@localhost nginx]# kill -9 26715 [root@localhost nginx]# kill -9 26716 [root@localhost nginx]# kill -9 26717 [root@localhost nginx]# ps -e | grep nginx ##再次查看已经没有了 [root@localhost nginx]# [root@localhost nginx]# [root@localhost nginx]# [root@localhost nginx]# systemctl start nginx.service ##启动服务 [root@localhost nginx]# systemctl status nginx.service ##查看服务 ● nginx.service - LSB: starts the nginx web server Loaded: loaded (/etc/rc.d/init.d/nginx; bad; vendor preset: disabled) Active: active (running) since Mon 2019-07-22 16:43:25 CST; 6s ago Docs: man:systemd-sysv-generator(8) Process: 28116 ExecStart=/etc/rc.d/init.d/nginx start (code=exited, status=0/SUCCESS) CGroup: /system.slice/nginx.service ├─28123 nginx: master process /www/server/nginx/sbin/nginx -c /www/server/nginx/conf/nginx.conf ├─28124 nginx: worker process ├─28125 nginx: worker process ├─28126 nginx: cache manager process └─28127 nginx: cache loader process Jul 22 16:43:25 localhost.localdomain systemd[1]: Starting LSB: starts the nginx web server... Jul 22 16:43:25 localhost.localdomain nginx[28116]: Starting nginx... done Jul 22 16:43:25 localhost.localdomain systemd[1]: Started LSB: starts the nginx web server. [root@localhost nginx]# |
说白了就是进程已经在启用了,占用进程杀掉重启服务即可,
专业从事搬砖多年,还是在继续搬砖中,厚积薄发~
分类:
A 系统:(Linux)
, B 运维:(故障处理)
标签:
nginx.service
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】博客园社区专享云产品让利特惠,阿里云新客6.5折上折
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 用 C# 插值字符串处理器写一个 sscanf
· Java 中堆内存和栈内存上的数据分布和特点
· 开发中对象命名的一点思考
· .NET Core内存结构体系(Windows环境)底层原理浅谈
· C# 深度学习:对抗生成网络(GAN)训练头像生成模型
· 为什么说在企业级应用开发中,后端往往是效率杀手?
· 本地部署DeepSeek后,没有好看的交互界面怎么行!
· 趁着过年的时候手搓了一个低代码框架
· 用 C# 插值字符串处理器写一个 sscanf
· 推荐一个DeepSeek 大模型的免费 API 项目!兼容OpenAI接口!