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個相同錯誤:. [5 @& k  q3 S8 c
[emerg] 5048#0: bind() to x.x.x.x:80 failed (98: Address already in use)
& q: m3 M; h3 b" @6 E0 n1 ]) e$ H& m最後再給你出現6 O4 q- T6 U+ f  U( e4 v
[emerg] 5048#0: still could not bind()5 }4 l, t3 B, }" q
重開機也沒用
1 y) t+ h" ~9 D9 g8 J6 ?! \% O這個意謂"nginx或其他程序正在使用 port 80" , 可以指令 netstat -pan | grep ":80" 或 6 ?6 ?8 @: {# y" H
fuser 80/tcp  (fuser 指令可以參考 http://nixgeek.com/finding-out-what-process-is-listening-on-a-port-under-linux.html)
# |1 A1 d  |" J( V8 V) M查看是誰占用 port 80,但nginx也沒占用(啟動不了當然不會占用)% ^3 B& g1 a. c' @& G

8 o' p1 T: P+ E# w9 O5 d# |

0 K7 i% N+ F' N# |最後  fuser -k 80/tcp  刪除占用 port 80 的的所有程序(process)
0 D* G$ U: A# N6 r3 I6 h/ R3 y6 V然後 service nginx restart  ======> OK
" z0 M% m& m: k' s& u3 F8 a* y
' U4 R- i6 y1 m* s1 x, V




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