2018年10月9日火曜日

(98)Address already in use: make_sock: could not bind to address の対処

httpdが起動できず、エラーになる。

(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

対処法

/usr/sbin/lsof -i | grep http

で使用ポートを特定

httpd 26333  root    8u  IPv6       0t0  TCP *:http (LISTEN)

26333   が原因なので、

sudo kill -9 26333

sudo /etc/init.d/httpd restart

でOK