SyntaxHighlighter

2013年2月28日木曜日

apache再起動エラー Address already in use: make_sock: could not bind to address [::]:80

バーチャルホストのsslの設定で、ssl.confやhttpd.confを編集して、apacheを再起動したらエラー。
その時の解決メモ。

お世話になったサイト
(98)Address already in use: が出てApacheが再起動できないときの対処方法。
http://blog.earthyworld.com/archives/98address-already-in-use/

/usr/sbin/lsof -i | grep http 上記コマンドでエラー。
確認すると私の環境にはlsofコマンドが入っていない。

lsofとは、使用中プロセスを調べるコマンド。

CentOSで、lsofコマンドのインストール
yum install lsof

lsofコマンドでhttpをパイプし、使用中プロセスを調査。
/usr/sbin/lsof -i | grep http
httpd     32101 apache    5u  IPv6 3680371      0t0  TCP *:http (LISTEN)
httpd     32101 apache    7u  IPv6 3680375      0t0  TCP *:https (LISTEN)
左から2番めの数値がプロセスID(32101)。
オプション9とkillコマンドでプロセスを強制終了。
kill -9 32101

apacheを再起動で無事解決できました。

0 件のコメント:

コメントを投稿