nginx: [error] invalid PID number "" in "/usr/local/nginx/logs/nginx.pid"
Posted xiaoyou2018
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了nginx: [error] invalid PID number "" in "/usr/local/nginx/logs/nginx.pid"相关的知识,希望对你有一定的参考价值。
[[email protected] sbin]# ./nginx -s reload nginx: [error] invalid PID number "" in "/usr/local/nginx/logs/nginx.pid"
查看nginx.pid为空
[[email protected] sbin]# cat /usr/local/nginx/logs/nginx.pid
解决:
查看nginx运行的PID,然后加入到nginx.pid文件中
[email protected] 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
[[email protected] sbin]# echo 6015 > /usr/local/nginx/logs/nginx.pid [[email protected] sbin]# ./nginx -s reload
以上是关于nginx: [error] invalid PID number "" in "/usr/local/nginx/logs/nginx.pid"的主要内容,如果未能解决你的问题,请参考以下文章
nginx: [error] invalid PID number "" in "/run/ngin
nginx: [error] invalid PID number ““ in “/data/nginx/logs/nginx.pid“
nginx: [error] invalid PID number “” in “/usr/local/var/run/nginx/nginx.pid”
nginx: [error] invalid PID number "" in "/usr/local/nginx/logs/nginx.pid"
nginx: [error] invalid PID number "" in "/usr/local/nginx/logs/nginx.pid"
解决 nginx: [error] invalid PID number "" in "/usr/local/nginx/logs/nginx.pid"