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: [emerg] open() "/var/run/nginx/nginx.pid" failed (2: No such file or directory)
解决办法:
[root@izuf68g6a94fj32w0afx00z etc]# nginx -c /etc/nginx/nginx.conf
其他的一些解决办法:
1、进入到文件夹下:cd /var/run ,查看有没有nginx文件夹,如果没有,则创建,然后在启动
2、进入到 nginx.conf文件,找到如下pid的位置,对pid这一行注释掉。然后重启。
user root;
worker_processes 1; error_log /var/log/nginx/error.log warn;
pid /var/run/nginx/nginx.pid; events {
worker_connections 1024;
}
nginx: [error] open() "/var/run/nginx/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/var/run/nginx.pid" failed (2: No such file or directory) ...
- 重启虚拟机后,再次重启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: [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出错: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 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 dir ...
- 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)
测试服务器 问题描述 [root@g-s-- nginx]# /usr/sbin/nginx -c /etc/nginx/nginx.conf open() : No such file or dir ...
随机推荐
- Confluence 6 使用 WebDAV 客户端来对页面进行操作
下面的部分告诉你如何在不同的系统中来设置原生的 WebDAV 客户端,这个客户端通常显示在你操作系统的文件浏览器中,例如,Windows 的 Windows Explorer 或者 Linux 的 K ...
- js 获取当前的网址
http://www.xcx.cc/index.php/home/index/ind?idf=12321var $cur_url=window.location.href; //获取全部的网址var ...
- NHibernate入门
这里是官方的Demo,可以看看,因为我也是通过官方的demo学习的. https://github.com/nhibernate/nhibernate-core/tree/master/src/N ...
- 【python】json中字典key不可为数值型
遇到了一个很诡异的错误.写一个字典,存入json文件.之后读出判断是否存在key.结果惊奇的发现,同一个key居然存在两次. 原因:json会将数值key转换为unicode 结论:使用json时字典 ...
- PHP array_combine()
// 需要替换 key 的数组 $arr_old = array( '0' => array('id' => 1, 'name' => 'Carroll'), '1' => a ...
- Android Studio 配置虚拟设备的镜像文件的存放路径
操作系统:Windows 10 x64 IDE:Android Studio 3.3 Android Studio创建的虚拟设备的默认存放路径是位于C盘,这导致C盘的可用容量变小. 所以,我决定要将虚 ...
- 转: 解压Assets.car (iOS加密资源)
今天想获取APP的资源,但是查看xxx.app文件夹里面,缺少了大部分资源.在文件夹里面发现Assets.car这个文件,发现文件很大有40多M,猜想图片资源会不会被压缩到这里面了,所以就网络上查了下 ...
- Install zeal on ubuntu16.04
Dash is a helpful software for macOS users. For Windows and Linux users, zeal is the open-source cou ...
- NHibernate:no persister for 异常
几种原因: 1.配置文件后缀名写错 mapping file 必须是.hbm.xml结尾 2.Web.config配置里面引用实体 <session-factory> .......... ...
- Elasticsearch索引模板和别名
创建模板(模板名和索引名一样都不能有大写) PUT http://222.108.x.x:9200/_template/templateds { "template": " ...