nginx.service: control process exited, code=exited status=1

 

安装linux的宝塔面板,结果面板显示nginx和php已经运行了,但是机器系统上并没有运行。记录一次nginx报错,操作步骤看下代码:

[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]# 

  

说白了就是进程已经在启用了,占用进程杀掉重启服务即可,

posted @ 2019-07-22 16:47  疯刘小三  阅读(12789)  评论(3编辑  收藏  举报