IT_man 發表於 2016-4-6 12:23:21

[emerg] 5048#0: bind() to x.x.x.x:80 failed (98: Address already in use)

當啟動nginx時, service nginx start (restart) 出現連續5個相同錯誤:
5048#0: bind() to x.x.x.x:80 failed (98: Address already in use)
最後再給你出現
5048#0: still could not bind()
重開機也沒用
這個意謂"nginx或其他程序正在使用 port 80" , 可以指令 netstat -pan | grep ":80" 或
fuser 80/tcp(fuser 指令可以參考 http://nixgeek.com/finding-out-what-process-is-listening-on-a-port-under-linux.html)
查看是誰占用 port 80,但nginx也沒占用(啟動不了當然不會占用)


最後fuser -k 80/tcp刪除占用 port 80 的的所有程序(process)
然後 service nginx restart======> OK

頁: [1]
查看完整版本: [emerg] 5048#0: bind() to x.x.x.x:80 failed (98: Address already in use)