nginx: [error] invalid PID number

一、检查nginx配置文件语法有无错误

[[email protected] conf]# /application/nginx/sbin/nginx -t
nginx: the configuration file /application/nginx-16.0/conf/nginx.conf syntax is ok

nginx: configuration file /application/nginx-16.0/conf/nginx.conf test is successful

二、平滑重启并失败

[[email protected] conf]# /application/nginx/sbin/nginx -s reload
nginx: [error] invalid PID number "" in "/application/nginx-16.0/logs/nginx.pid"

三、使用此命令:/application/nginx/sbin/nginx -c /application/nginx-16.0/conf/nginx.conf

[[email protected] conf]# /application/nginx/sbin/nginx -c /application/nginx-16.0/conf/nginx.conf

四、平滑重启成功

[[email protected] conf]# /application/nginx/sbin/nginx -s reload

原文地址:https://blog.51cto.com/14078730/2420859

时间: 2024-10-05 00:08:30

nginx: [error] invalid PID number的相关文章

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

   系统版本:CentOS 6.5 x86_64     nginx版本:Nginx-1.6.1 今天在测试升级nginx版本到nginx-1.7.0的时候,有点小小的插曲,报错了nginx: [error] invalid PID number "" in "/usr/local/nginx/logs/nginx.pid",在此记录以下加强记忆的同时,也避免以后再出现类似错误. Step1. 升级完毕后,进行了重启(也可执行kill -QUIT 主进程号) St

nginx: [error] invalid PID number “” in “/usr/local/var/run/nginx/nginx.pid”

在Mac上用brew安装Nginx,然后修改Nginx配置文件,再重启时报出如下错误: nginx: [error] invalid PID number "" in "/usr/local/var/run/nginx/nginx.pid" 解决办法: $ sudo nginx -c /usr/local/etc/nginx/nginx.conf $ sudo nginx -s reload

nginx: [error] invalid PID number问题处理

再启动nginx服务时,无法正常启动,报错误信息如下nginx: [error] invalid PID number "" in "/usr/local/nginx/logs/nginx.pid" 解决方法: /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf 使用nginx -c的参数指定nginx.conf文件的位置然后再重新启动,解决问题,可以通过ps -ef|grep nginx

nginx: [error] invalid PID number "" in "/run/ngin

nginx重启报错:nginx: [error] invalid PID number "" in "/run/nginx.pid" 问题描述:执行 nginx -t 是OK的,然而在执行 nginx -s reload 的时候报错 nginx: [error] invalid PID number "" in "/run/nginx.pid" 解决办法 需要先执行 nginx -c /etc/nginx/nginx.conf

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

使用/usr/local/nginx/sbin/nginx -s reload 重新读取配置文件出错 [[email protected] nginx]/usr/local/nginx/sbin/nginx -s reload提示 nginx: [error] invalid PID number "" in "/usr/local/nginx/logs/nginx.pid" [[email protected] nginx]# cd logs[[email pro

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

进入nginx文件下,例如 :/usr/local/nginx/sbin [[email protected] /]# cd /usr/local/nginx/sbin 运行命令: [[email protected] /]# ./nginx -c /usr/local/webserver/nginx/conf/nginx.conf 重新加载: [[email protected] /]# ./nginx -s reload 原文地址:https://www.cnblogs.com/gyrgyr

nginx在reload时候报错invalid PID number

今天在nginx重新加载配置文件的时候报错 提示无效的PID,打开nginx.pid文件,发现里面是空的,在网上找了下,有的说sudo可以解决,但是又一次失望了 1 2 [[email protected]_23_56 conf]# sudo /usr/local/nginx/sbin/nginx -s reload nginx: [error] invalid PID number "" in "/usr/local/nginx/logs/nginx.pid" 于

nginx错误:invalid PID number

今天修改了nginx的反向代理配置文件 然后 /usr/local/nginx/sbin/nginx -s reload 的时候出现了以下错误 解决办法: 原文地址:http://blog.51cto.com/zhangcf/2091592

解决Nginx: [error] open() "/usr/local/Nginx/logs/Nginx.pid

重新启动服务器,访问web服务发现无法浏览啦!登陆服务器之后进到nginx使用./nginx -s reload重新读取配置文件,发现报nginx: [error] open() "/usr/local/nginx/logs/nginx.pid" failed (2: No such file or directory)错误,进到logs文件发现的确没有nginx.pid文件 [[email protected] sbin]# ./nginx -s reload nginx: [err