赞
踩
[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.
首先,查看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.
netstat -anpt | grep 80 #查看80端口的使用情况
ps -lef | grep nginx #查看nginx的进程
kill -9 938 #杀死nginx进程
systemctl restart httpd.service
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。