634
魔獸
[emerg]: bind() to 0.0.0.0:80 failed (98: Address already in use) 問題思考?
正常運行時,即網頁能夠訪問時:[root@web1 ~]# ps -aux | grep nginx
Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.8/FAQ
www 1928 0.0 0.5 64560 21748 ? S 10:29 0:00 nginx: worker process
root 37826 0.0 0.0 103168 856 pts/0 S+ 10:56 0:00 grep nginx
出現 [emerg]: bind() to 0.0.0.0:80 failed (98: Address already in use)
問題時:
[root@web2 sk]# ps -aux | grep nginx
Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.8/FAQ
root 1608 0.0 0.0 44548 1080 ? Ss 10:48 0:00 nginx: master process /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
www 1609 0.0 0.5 64560 21276 ? S 10:48 0:00 nginx: worker process
root 1628 0.0 0.0 103168 856 pts/0 S+ 10:56 0:00 grep nginx
然後測試其狀態:
[root@web1 ~]# nginx -c /usr/local/nginx/conf/nginx.conf
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] still could not bind()
[root@web2 sk]# nginx -c /usr/local/nginx/conf/nginx.conf
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] still could not bind()
兩個 web 服務器都被占用?那 web1 怎麼能夠訪問? web2 竟然不能
難道是 主進程 在幹擾?
怎樣解決?
網上說的是
kill -9 $PID --nginx 的 pid
沒有用,我這裏
突然就弄好了?
看來下次要好好觀察
最後更新:2017-04-03 14:54:23