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個相同錯誤:; M, }) I( y2 o& L& N$ I( L# ~
[emerg] 5048#0: bind() to x.x.x.x:80 failed (98: Address already in use)8 M% `0 P1 T& O
最後再給你出現4 X) G# M0 _+ x4 \
[emerg] 5048#0: still could not bind()  P) B1 C4 e) E0 ^
重開機也沒用
( t/ ], `3 Z2 e* Y5 T7 x$ ]這個意謂"nginx或其他程序正在使用 port 80" , 可以指令 netstat -pan | grep ":80" 或
/ b# L4 q1 u( h+ m* F7 V) m: afuser 80/tcp  (fuser 指令可以參考 http://nixgeek.com/finding-out-what-process-is-listening-on-a-port-under-linux.html). t" `( I: L/ A/ S  _; o
查看是誰占用 port 80,但nginx也沒占用(啟動不了當然不會占用)
; P9 L# \( t2 k3 D
# c5 j) ^( Y& M1 H9 ?: X+ X
8 l- _6 S1 k& e2 H
最後  fuser -k 80/tcp  刪除占用 port 80 的的所有程序(process)
* Z  _0 z& k5 A2 N+ X( j然後 service nginx restart  ======> OK
4 ]: w( x1 B. J: V; \+ w& M1 p, \& x: }5 I2 s0 {, M0 C( y% q" k





歡迎光臨 52AV手機A片王|52AV.ONE (https://www.52av.one/) Powered by Discuz! X3.2