yum update httpd後にhttpdが起動しない。

yumでhttpd(apache httpd server)を更新してみたが、 その後、httpd を再起動すると、エラーが発生する。 何度やってみてもエラーだ。

# /etc/init.d/httpd start
Starting httpd: [Wed Jun 11 10:36:57 2014] [warn] module ssl_module is already loaded, skipping
(98)Address already in use: make_sock: could not bind to address [::]:443
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:443
no listening sockets available, shutting down
Unable to open logs
                                                           [FAILED]

どうも SSLのListenするソケットが443ポートにbindできないようだ。 すでに使っているとなっている。 このサーバー、複数IPを持っていて、サーバー名毎に各IPをbindしている。 /etc/httpd/conf.d/ をgrep してみると、443をListenしているサーバーがたくさんある。

host01.conf:Listen xxx.xxxx.xxx.5:443
host02.conf:Listen xxx.xxxx.xxx.6:443
host03.conf:Listen xxx.xxxx.xxx.7:443
host04.conf:Listen xxx.xxxx.xxx.8:443
ssl.conf:Listen 443

ここにssl.conf:Listen 443で0.0.0.0:443をbindしようとしているのでエラーなのではなかろうか? よく考えてみると、ssl.confは不要なので以前退避したのが、yum update httpdで復活したようだ。 というわけで、もう一度ssl.confを退避してみた。

# /etc/init.d/httpd restart
Stopping httpd:                                            [FAILED]
Starting httpd:                                            [  OK  ]

起動した! 今後、yum update時には気をつけよう。また引っかかりそうだが。