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個相同錯誤:
% v: h1 c! ^* K8 ^8 D' G( }
[emerg] 5048#0: bind() to x.x.x.x:80 failed (98: Address already in use)
& Z( x1 C3 u- K6 H% o; I
最後再給你出現
7 z3 T7 N3 u6 @' q# e
[emerg] 5048#0: still could not bind()
J& Z1 ?0 G( f, J
重開機也沒用
# Z6 V6 n, {4 f4 B
這個意謂"nginx或其他程序正在使用 port 80" , 可以指令
netstat -pan | grep ":80" 或
7 I6 G+ d/ o! _; m9 Y R+ Z! i
fuser
80/tcp (fuser 指令可以參考
http://nixgeek.com/finding-out-what-process-is-listening-on-a-port-under-linux.html
)
2 M# O+ R( n% r, ]
查看是誰占用 port 80,但nginx也沒占用(啟動不了當然不會占用)
5 p9 \* f9 ?' G0 j5 J. x
. R2 U; X+ g+ s4 m' w J- a
: q5 f2 ~2 j3 y
最後 f
user -k 80/tcp 刪除占用 port 80 的的所有程序(process)
. L6 Q- }. }! Y2 j
然後 service nginx restart ======> OK
% G( h6 x! ~$ Y6 T8 }
# r: I M3 s5 r; w& l4 ?% Y: U! y
歡迎光臨 52AV手機A片王|52AV.ONE (https://www.52av.one/)
Powered by Discuz! X3.2