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個相同錯誤:
" r1 r% @. n5 i/ U" a0 g* n[emerg] 5048#0: bind() to x.x.x.x:80 failed (98: Address already in use)
% z" l( p0 O3 w& M9 h$ `最後再給你出現
5 f+ c* x3 ~3 n9 D; [9 S[emerg] 5048#0: still could not bind()
( P; V- Q; r* G* g/ A& i重開機也沒用" Z% b* q* h( v) Y! s
這個意謂"nginx或其他程序正在使用 port 80" , 可以指令 netstat -pan | grep ":80" 或 ! R# a7 l( x" q6 z% U; ~' D
fuser 80/tcp  (fuser 指令可以參考 http://nixgeek.com/finding-out-what-process-is-listening-on-a-port-under-linux.html)/ Z) ^9 d! E7 t5 D( Y
查看是誰占用 port 80,但nginx也沒占用(啟動不了當然不會占用)
4 {0 M0 \, W/ T  J8 K8 ?) g% \$ E& p, u
0 g, D: B/ a* {3 t9 D
最後  fuser -k 80/tcp  刪除占用 port 80 的的所有程序(process)7 @$ |" N' X7 Z- D2 \+ ?8 z
然後 service nginx restart  ======> OK
) \9 |; Q# p  h& D
# {2 a8 P) _# D6 y' ]' z




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