52AV手機A片王|52AV.ONE
標題:
[emerg] 5048#0: bind() to x.x.x.x:80 failed (98: Address already in use)
[打印本頁]
作者:
IT_man
時間:
2016-4-6 12:23
標題:
[emerg] 5048#0: bind() to x.x.x.x:80 failed (98: Address already in use)
當啟動nginx時, service nginx start (restart) 出現連續5個相同錯誤:
4 F' @9 Z/ U2 G" \& p4 a8 p& g1 L) S
[emerg] 5048#0: bind() to x.x.x.x:80 failed (98: Address already in use)
/ L7 m6 j. Q$ q J- P1 ~$ T4 J* M
最後再給你出現
, K2 f; o5 h' W5 w' {/ T
[emerg] 5048#0: still could not bind()
0 i2 k; w4 R6 c( y
重開機也沒用
" N" k: R& j6 l! Z
這個意謂"nginx或其他程序正在使用 port 80" , 可以指令
netstat -pan | grep ":80" 或
& A- _, |4 E) f$ n
fuser
80/tcp (fuser 指令可以參考
http://nixgeek.com/finding-out-what-process-is-listening-on-a-port-under-linux.html
)
6 Q$ g9 N7 @/ {3 Z
查看是誰占用 port 80,但nginx也沒占用(啟動不了當然不會占用)
' j F1 ~) _ t! |
. l+ j {. A5 K) V) _
/ m" u& {( s3 g2 m% D+ n3 e; Z! |
最後 f
user -k 80/tcp 刪除占用 port 80 的的所有程序(process)
7 e! R2 U: A& F6 g; w% |+ i
然後 service nginx restart ======> OK
/ e5 S) M' v2 J9 f
0 n) P: n6 X) L7 E, H" {
歡迎光臨 52AV手機A片王|52AV.ONE (https://www.52av.one/)
Powered by Discuz! X3.2