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個相同錯誤:
; t( F! s0 ]9 _9 P[emerg] 5048#0: bind() to x.x.x.x:80 failed (98: Address already in use)
& y/ G$ d! m. T  F最後再給你出現
2 v: g+ d, ?8 F) [0 x1 L! b# l, X[emerg] 5048#0: still could not bind()3 c/ E" h  r: i9 M, }
重開機也沒用
1 c- L* C% H- }' w% ]' ]這個意謂"nginx或其他程序正在使用 port 80" , 可以指令 netstat -pan | grep ":80" 或
, d/ M# I, H$ Q& S2 M$ L/ v( jfuser 80/tcp  (fuser 指令可以參考 http://nixgeek.com/finding-out-what-process-is-listening-on-a-port-under-linux.html)
. b! a, S7 |$ k" G% S9 W% u1 m8 T3 r查看是誰占用 port 80,但nginx也沒占用(啟動不了當然不會占用)$ \, i& C$ S/ J1 q+ C
: w) s; K* s: K* c8 v! p. B. w9 E

$ {) [( @! P% M! G8 W& V: \! L最後  fuser -k 80/tcp  刪除占用 port 80 的的所有程序(process)
- [7 ]9 V3 I# Z! G9 p' r$ D  B- v+ h然後 service nginx restart  ======> OK6 X/ n" \2 X7 a7 Z$ X

6 ?. }9 J, Z3 K' P% C- g




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