当前位置:   article > 正文

安装logstash时,systemctl start httpd出现错误_systemctl status httpd httpd.service - the apache

systemctl status httpd httpd.service - the apache http server loaded: loaded

问题

systemctl start httpd出现错误

[root@localhost ~]# systemctl start httpd
Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details.
  • 1
  • 2

思路

首先,查看systemctl status httpd.service或journalctl -x

[root@localhost ~]# systemctl status httpd
● httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset: disabled)		
   Active: failed (Result: exit-code) since 五 2021-03-05 11:53:10 CST; 24s ago			#状态是失败
     Docs: man:httpd(8)
           man:apachectl(8)
  Process: 7169 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE)
  Process: 7165 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
 Main PID: 7165 (code=exited, status=1/FAILURE)

3月 05 11:53:10 apache httpd[7165]: (98)Address already in use: AH00072: m...80			#这里显示80端口已经在使用了
3月 05 11:53:10 apache httpd[7165]: (98)Address already in use: AH00072: m...80
3月 05 11:53:10 apache httpd[7165]: no listening sockets available, shutti...wn
3月 05 11:53:10 apache httpd[7165]: AH00015: Unable to open logs
3月 05 11:53:10 apache systemd[1]: httpd.service: main process exited, cod...RE
3月 05 11:53:10 apache kill[7169]: kill: cannot find process ""
3月 05 11:53:10 apache systemd[1]: httpd.service: control process exited, ...=1
3月 05 11:53:10 apache systemd[1]: Failed to start The Apache HTTP Server.
3月 05 11:53:10 apache systemd[1]: Unit httpd.service entered failed state.
3月 05 11:53:10 apache systemd[1]: httpd.service failed.
Hint: Some lines were ellipsized, use -l to show in full.
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21

在这里插入图片描述

解决过程

1、我们找到了原因,所以查看一下80端口

netstat -anpt | grep 80			#查看80端口的使用情况
  • 1

在这里插入图片描述

2、查看nginx进程

ps -lef | grep nginx 			#查看nginx的进程
  • 1

在这里插入图片描述

3、杀死niginx进程

 kill -9 938				#杀死nginx进程
 
systemctl restart httpd.service 
  • 1
  • 2
  • 3

在这里插入图片描述

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/盐析白兔/article/detail/155347
推荐阅读
相关标签
  

闽ICP备14008679号