nginx: [error] invalid PID number "" in "/usr/local/nginx/logs/nginx.pid"


[root@data01 sbin]# ./nginx -s reload
nginx: [error] invalid PID number "" in "/usr/local/nginx/logs/nginx.pid"

 

查看nginx.pid為空

[root@data01 sbin]# cat /usr/local/nginx/logs/nginx.pid

解決:

查看nginx運行的PID,然后加入到nginx.pid文件中

root@data01 sbin]# ps -ef |grep nginx
root       6015      1  0 Jan17 ?        00:00:00 nginx: master process ./sbin/nginx
root      50668   6015  0 Feb01 ?        04:33:36 nginx: worker process
root      50669   6015  0 Feb01 ?        04:42:32 nginx: worker process
root      50670   6015  0 Feb01 ?        04:41:05 nginx: worker process
root      50671   6015  0 Feb01 ?        04:32:57 nginx: worker process
root      50672   6015  0 Feb01 ?        04:36:38 nginx: worker process
root      50673   6015  0 Feb01 ?        04:35:04 nginx: worker process
root      50674   6015  0 Feb01 ?        04:33:01 nginx: worker process
root      50675   6015  0 Feb01 ?        04:43:13 nginx: worker process
root      50676   6015  0 Feb01 ?        04:33:02 nginx: worker process
root      50677   6015  0 Feb01 ?        04:32:44 nginx: worker process
root      50678   6015  0 Feb01 ?        04:40:56 nginx: worker process
root      50679   6015  0 Feb01 ?        04:33:26 nginx: worker process
root      50680   6015  0 Feb01 ?        04:40:43 nginx: worker process
root      50681   6015  0 Feb01 ?        04:31:06 nginx: worker process
root      50682   6015  0 Feb01 ?        04:36:44 nginx: worker process
root      50683   6015  0 Feb01 ?        04:32:21 nginx: worker process
root      50684   6015  0 Feb01 ?        04:39:34 nginx: worker process
root      50685   6015  0 Feb01 ?        04:31:09 nginx: worker process
root      50686   6015  0 Feb01 ?        04:39:19 nginx: worker process
root      50687   6015  0 Feb01 ?        04:29:11 nginx: worker process
[root@data01 sbin]# echo 6015 > /usr/local/nginx/logs/nginx.pid
[root@data01 sbin]# ./nginx -s reload

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM