我无法(重新)启动 apache,因为端口 80 已在使用中:
[root@out-dev log]# service httpd start
Starting httpd: httpd: Could not reliably determine the server's fully qualified domain name, using <ip> for ServerName
(98)Address already in use: make_sock: could not bind to address [::]:80
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
[FAILED]
所以我尝试识别使用端口 80 的进程:
[root@out-dev log]# netstat -npl | grep ':80'
tcp 0 0 :::80 :::* LISTEN 3840/httpd
这是httpd!这对我来说很奇怪,因为服务 httpd 显然没有运行:
[root@out-dev log]# service httpd status
httpd is stopped
无论如何,我尝试杀死该进程,但只要我这样做,就会出现一个新进程,控制端口 80。并且一直service httpd status
表明 httpd 没有运行。
[root@out-dev log]# kill -9 3840
[root@out-dev log]# netstat -npl | grep ':80'
tcp 0 0 :::80 :::* LISTEN 3842/httpd