Nginx pid文件找不到 nginx: [error] open() "/run/nginx/nginx.pid" failed (2: No such file or directory)
Nginx pid文件找不到
nginx: [error] open() "/run/nginx/nginx.pid" failed (2: No such file or directory)
原因:pid被误删除或者不存在
解决如下:停掉目前的nginx服务,重启nginx,生成新的pid文件
1. 查看nginx服务所占用的进程
/run/nginx # ps
PID USER TIME COMMAND
1 root 0:00 /bin/sh
23 root 0:00 [nginx]
28 root 0:00 [nginx]
132 root 0:00 nginx: master process nginx
190 nginx 0:00 nginx: worker process
206 root 0:00 sh
245 root 0:00 ps
2. 杀死进程
/run/nginx # kill 132
/run/nginx # ps
PID USER TIME COMMAND
1 root 0:00 /bin/sh
23 root 0:00 [nginx]
28 root 0:00 [nginx]
29 root 0:00 sh
35 root 0:00 [nginx]
36 root 0:00 sh
206 root 0:00 sh
246 root 0:00 ps
3. 重启nginx
/run/nginx # nginx
/run/nginx # ls
nginx.pid # 该文件已生成
- 注意:查看nginx的pid文件生成存放目录,如没有设置则可设置,在nginx.conf配置文件中设置,目录不存在,则需要创建该目录,否则重启的时候pid生成不了。
Nginx pid文件找不到 nginx: [error] open() "/run/nginx/nginx.pid" failed (2: No such file or directory)的更多相关文章
- nginx: [error] open() "/var/run/nginx/nginx.pid" failed (2: No such file or directory)
在重启nginx服务的时候,出现了这个错误. [root@izuf68g6a94fj32w0afx00z etc]# nginx -c /var/run/nginx/nginx.pid nginx: ...
- nginx: [error] open() "/run/nginx.pid" failed (2: No such file or directory)
当你执行sudo nginx -s reload时出现nginx: [error] open() "/run/nginx.pid" failed (2: No such file ...
- nginx: [error] open() "/usr/local/var/run/nginx.pid" failed (2: No such file or directory)
nginx: [error] open() "/usr/local/var/run/nginx.pid" failed (2: No such file or directory) ...
- nginx: [error] open() "/usr/local/nginx/logs/nginx.pid" failed (2: No such file or directory)
问题场景 服务器重启后,重启nginx时报错nginx: [error] open() "/usr/local/nginx/logs/nginx.pid" failed (2: N ...
- nginx ../logs/nginx.pid" failed (2: No such file or directory)
[1]nginx.pid相关 (1)可能出现两种场景: 1.1 nginx.pid文件不存在 发生现象:nginx: [error] open() "/usr/local/lib/ubcsr ...
- Nginx启动报错误unlink() “nginx.pid” failed (2: No such file or directory)
在修改了配置文件之后,启动nginx的时候发现,进程已经存在了,但是端口没有监听到. 查看错误日志,有如下错误信息 2015/10/22 21:39:06 [alert] 26434#0: unlin ...
- 重启虚拟机后,再次重启nginx会报错:[emerg] open() "/var/run/nginx/nginx.pid" failed (2: No such file or directory)
问题: 重启虚拟机后,再次重启nginx会报错: open() "/var/run/nginx/nginx.pid" failed (2: No such file or dire ...
- 启动nginx出错:open() "/var/run/nginx/nginx.pid" failed (2: No such file or directory)
[emerg] open() "/var/run/nginx/nginx.pid" failed (2: No such file or directory) 解决:mkdir / ...
- 关于nginx报错/usr/share/nginx/html/jiankongshare" failed (2: No such file or directory)的问题解决
nginx的location虚拟目录配置: monitor.conf server { server_name monitor.chinasoft.com; server_ ...
随机推荐
- 晶振在电路设计时关于负载电容CL大小取值特别需要注意什么?
在无源晶体的设计中,经常遇到负载电容CL的大小取值.晶振设计与精度的提高.KHz无源晶振的停止.音叉晶体谐振器的精度漂移以及精度和无源晶振在高温下的精度是否等于低温的精度烦忧的问题等. 无源晶体振荡器 ...
- STM32 禁用或开启总中断
今天把之前自己的一些在中断方面所产生的疑惑把具体的解决办法给大家分享一下,希望能够帮到大家. STM32在使用时有时需要禁用全局中断,比如MCU在升级过程中需禁用外部中断,防止升级过程中外部中断触发导 ...
- 计算机网络传输层之TCP可靠传输
文章转自:https://blog.csdn.net/weixin_43914604/article/details/105524592 学习课程:<2019王道考研计算机网络> 学习目的 ...
- Unity——射线系统
Unity射线系统 Demo展示 UI+Physical射线测试: FPS自定义射线测试: UGUI射线工具 实现功能,鼠标点击UI,返回鼠标点击的UI对象: 需要使用到鼠标点击事件-PointerE ...
- Jquery校验中国身份证号码是否正确
在项目中使用表单时经常会涉及到身份证号码是否正确的校验,下面看看应该中国二代身份证号码应该怎么用Jquery校验呢? 二代身份证校验码的计算方法 二代身份证由17位数字和一位校验码组成,那么校验方法是 ...
- v3
#include <iostream> #include <time.h> #include "map" #include "stdio.h&qu ...
- 第01课 OpenGL窗口(3)
接下来的代码段创建我们的OpenGL窗口.我花了很多时间来做决定是否创建固定的全屏模式这样不需要许多额外的代码,还是创建一个容易定制的友好的窗口但需要更多的代码.当然最后我选择了后者.我经常在EMai ...
- 修改openstack镜像--支持root密码登陆
一.前言 从openstack官方下载的云镜像一般都是普通用户密钥登陆,比如centos镜像的普通用户为centos,ubuntu镜像的普通用户为ubuntu,虽然密钥登陆系统相比密码登陆来说比较方便 ...
- notepad++ 替换回车换行
以" | "为分隔符,换行 结果如下图:
- 一文搞懂js中的typeof用法
基础 typeof 运算符是 javascript 的基础知识点,尽管它存在一定的局限性(见下文),但在前端js的实际编码过程中,仍然是使用比较多的类型判断方式. 因此,掌握该运算符的特点,对于写出好 ...