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個相同錯誤:: G: v# D9 V  L: J# \
[emerg] 5048#0: bind() to x.x.x.x:80 failed (98: Address already in use)' ?2 X' p7 [. \- k
最後再給你出現
$ x! s8 E& ^) J# i1 l* A! O" z[emerg] 5048#0: still could not bind(), @$ i: {5 \. T* }: G0 q
重開機也沒用' ]& y# R7 x; e( i
這個意謂"nginx或其他程序正在使用 port 80" , 可以指令 netstat -pan | grep ":80" 或 6 O. H# h5 b9 o. s5 ~3 i
fuser 80/tcp  (fuser 指令可以參考 http://nixgeek.com/finding-out-what-process-is-listening-on-a-port-under-linux.html). i- S1 r; K! b- N  m
查看是誰占用 port 80,但nginx也沒占用(啟動不了當然不會占用); h0 c7 [4 l& Z2 b7 f/ b

5 q/ \* ^9 A9 C0 R: B" A

/ \8 X4 J) J2 B/ v  t8 \7 D# d最後  fuser -k 80/tcp  刪除占用 port 80 的的所有程序(process)) O7 p, e) M1 p6 v# Q/ ^( J
然後 service nginx restart  ======> OK% K% l! y; |$ K) T
/ O" _. X8 f2 L9 L# i2 r





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