日本少妇高潮pics,欧美成人伊人久久综合网,99v久久综合狠狠综合久久,99精品久久精品一区二区

Board logo

標題: [分享] 解決錯誤 Stopping nginx: nginx: [error] invalid PID number [打印本頁]

作者: yux82    時間: 2015-4-21 09:21     標題: 解決錯誤 Stopping nginx: nginx: [error] invalid PID number

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

前幾天忘記什么原因kill 掉80端口nginx 導致出現(xiàn)這個錯誤,新建站點變成了 404 Not Found nginx/1.2.9  重啟nginx后錯誤如下
  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]
復制代碼
查了點資料,有文章上說可能是nginx.pid丟失了,于是 cat /www/wdlinux/nginx/logs/nginx.pid,發(fā)現(xiàn)是空的,無內(nèi)容,其實nginx.pid 中的內(nèi)容就是進程id

然后 netstat -ntpl

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

看到nginx 進程id 是3673

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

重啟 service nginxd restart 成功

本人也是個linux 初學的小菜鳥,以上方法有什么不對的地方請大家指正,謝謝




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