99精品国产综合久久久久五月天,免费观看欧美大片毛片不用播放器 ,AV无码理论片在线观看免费网站,国产精品国产成人国产三级

Board logo

標(biāo)題: [分享] 解決錯(cuò)誤 Stopping nginx: nginx: [error] invalid PID number [打印本頁(yè)]

作者: yux82    時(shí)間: 2015-4-21 09:21     標(biāo)題: 解決錯(cuò)誤 Stopping nginx: nginx: [error] invalid PID number

本帖最后由 yux82 于 2015-4-21 09:22 編輯

前幾天忘記什么原因kill 掉80端口nginx 導(dǎo)致出現(xiàn)這個(gè)錯(cuò)誤,新建站點(diǎn)變成了 404 Not Found nginx/1.2.9  重啟nginx后錯(cuò)誤如下
  1. Stopping nginx: nginx: [error] invalid PID number "" in "/www/wdlinux/nginx/logs/nginx.pid"
  2.                                                            [  OK  ]
  3. Starting nginx: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
  4. nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
  5. nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
  6. nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
  7. nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
  8. nginx: [emerg] still could not bind()
  9.                                                            [FAILED]
復(fù)制代碼
查了點(diǎn)資料,有文章上說(shuō)可能是nginx.pid丟失了,于是 cat /www/wdlinux/nginx/logs/nginx.pid,發(fā)現(xiàn)是空的,無(wú)內(nèi)容,其實(shí)nginx.pid 中的內(nèi)容就是進(jìn)程id

然后 netstat -ntpl

tcp        0      0 0.0.0.0:80                  0.0.0.0:*                   LISTEN      3673/nginx

看到nginx 進(jìn)程id 是3673

vi /www/wdlinux/nginx/logs/nginx.pid  編輯 3673 保存退出

重啟 service nginxd restart 成功

本人也是個(gè)linux 初學(xué)的小菜鳥(niǎo),以上方法有什么不對(duì)的地方請(qǐng)大家指正,謝謝




歡迎光臨 WDlinux官方論壇 (http://fudaan.com/bbs/) Powered by Discuz! 7.2