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: No such file or directory),进入到logs目录发现确实没有nginx.pid文件

解决办法
使用指定nginx.conf文件的方式重启nginx
/usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
还有一种可能就是nginx.conf的nginx.pid被注释了,将下图中pid前的#去掉,保存退出再次启动nginx

此时去logs目录下查看发现nginx.pid文件已经生成了
nginx: [error] open() "/usr/local/nginx/logs/nginx.pid" failed (2: No such file or directory)的更多相关文章
- nginx报错 [error] open() “/usr/local/var/run/openresty.pid” failed (2: No such file or directory)
解决: 服务没有启动 使用start启动服务,因为没有start而直接使用stop或者reload报错这个问题: 如果方法一没有解决,使用方法二:-C 指定配置文件nginx.conf或者weblua ...
- 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启动或者重启失败,报错nginx: [error] open() "/usr/local/var/run/nginx.pid" failed (2: No such file or directory)
第一种方案: 1. 执行命令 :open /usr/local/etc/nginx 打开nginx安装目录 nginx安装目录默认位置有:(找到适合你的) /etc/nginx/nginx.conf, ...
- nginx启动报错nginx: [error] open() "/usr/local/etc/nginx/logs/nginx.pid" failed
问题:nginx启动的时候会报丢失pid的错误 nginx: [error] open() “/usr/local/var/run/nginx.pid” failed 解决方案: sudo nginx ...
- Nginx 报错: nginx: [error] open() "/usr/local/nginx/logs/nginx.pid" failed (2: No such file or directory) 的解决方法
今天测试域名访问不了,登陆 Linux(Ubuntu)重启Nginx: nginx -s reload 结果报错: nginx: [error] open() : No such file or di ...
- nginx [error] open() "/usr/local/nginx/logs/nginx.pid" failed的解决
今天关闭nginx后重启不了: nginx -s reload 结果报错: nginx: [error] open() "/usr/local/nginx/logs/nginx.pid&qu ...
- 新装NGINX重启,出现错误 nginx: [error] open() "/usr/local/nginx/logs/nginx.pid"
重装nginx出现,重启出现错误 ./nginx -s reload nginx: [error] open() "/usr/local/nginx/logs/nginx.pid" ...
- 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: [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: ...
随机推荐
- Linq to SQL各种参考
原文:https://www.cnblogs.com/lyj/archive/2008/01/23/1049686.htmlhttps://www.cnblogs.com/lyj/archive/20 ...
- JS RegExp对象(正则表达式)
笔记整理自:廖雪峰老师的JS教程 正则表达式语法:https://www.runoob.com/regexp/regexp-tutorial.html 目录 创建方式 方式一 方式二 简单使用 判断正 ...
- 【转】JVM--内存区域划分
[原文地址]https://blog.csdn.net/sd4015700/article/details/50109939 Eden Space.Survivor Space.Tenured Gen ...
- 关于单调性优化DP算法的理解
Part1-二分栈优化DP 引入 二分栈主要用来优化满足决策单调性的DP转移式. 即我们设\(P[i]\)为\(i\)的决策点位置,那么\(P[i]\)满足单调递增的性质的DP. 由于在这种DP中,满 ...
- Haar小波分析
一 尺度函数与小波函数 基本尺度函数定义为:,对其向右平移任意 k 个单位,构成函数族 , 该函数族在 空间中正交,证明如下: 1 : 2 当 m 不等于 k 时, 函数族 构成一组正交基,并形成 ...
- Solution -「ABC 219H」Candles
\(\mathcal{Description}\) Link. 有 \(n\) 支蜡烛,第 \(i\) 支的坐标为 \(x_i\),初始长度为 \(a_i\),每单位时间燃烧变短 \(1\) ...
- Solution -「ARC 058C」「AT 1975」Iroha and Haiku
\(\mathcal{Description}\) Link. 称一个正整数序列为"俳(pái)句",当且仅当序列中存在连续一段和为 \(x\),紧接着连续一段和为 \(y ...
- Windows RestartManeger重启管理器
介绍 重启管理器API可以消除或是减少在完成安装或是更新的过程中系统需要重启的次数.软件安装或是更新过程之所以需要重启系统的原因在于一些需要更新的文件正在被运行中的程序或服务使用.而重启管理器可以 ...
- XStream: Stream Processing Platform at Facebook
这是Facebook在FlinkForward2021上的一个talk, 主题如下 在前面的论文中分析了Facebook的实时计算引擎的设计和选型的考量,里面提到了Facebook的实时计算引擎为了满 ...
- DevOpts 前端开发和 Spug
DevOpts 前端开发和 Spug 朋友新工作是进行 DevOpts 前端开发,涉及 Spug. DevOps 是什么 DevOps 是一种思想.用于促进开发和运维之间的沟通.协作或整合. Tip: ...