dengwen3 发表于 2015-8-4 12:58:11

service httpd restart 重启APACHE失败解决

  现象:
  # service httpd restart
Stopping httpd:                                          
Starting httpd: module limitipconn_module is already loaded, skipping
httpd: Could not reliably determine the server's fully qualified domain name, using Xfor ServerName
NameVirtualHost *:443 has no VirtualHosts
NameVirtualHost *:80 has no VirtualHosts
(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

  ~~~~~~~
  原因:
  Normally a "could not bind to address" error means that another process
is bound to port 80 preventing Apache from starting up on that port.
This can happen if you are you using a caching server or another web
server that is also using port 80, If this is the case, stop this
alternate process and try restarting Apache again.
  解决链接:
  http://stackoverflow.com/questions/9757599/apache-restart-failed
  要用到KILL命令,我开始找的PKILL或是KILL PROC命令在CENTOS下并不通用。
  ~~~~~~~~~~~
  首先,确定HTTPD的PID。
  ps -ef|grep httpd
root      2213   10 Mar02 ?      00:00:39 /usr/sbin/httpd
apache    764122132 03:16 ?      00:01:09 /usr/sbin/httpd
。。。
apache   1105022132 04:05 ?      00:00:03 /usr/sbin/httpd
  
  显然,parent httpd process id为2213。
  然后,kill 2213
  再运行service httpd start,

  搞定,收工。
  
  
页: [1]
查看完整版本: service httpd restart 重启APACHE失败解决