笔者在centos7上,配置nginx代理服务后,
systemctl status nginx.service

提示错误
Failed to read PID from file /run/nginx.pid: Invalid argument

看到好多说删掉改nginx.pid 文件的,试之,无效。

后来找到了一个方法:
mkdir -p /etc/systemd/system/nginx.service.d
printf "[Service]\nExecStartPost=/bin/sleep 0.1\n" > /etc/systemd/system/nginx.service.d/override.conf

然后
systemctl daemon-reload
systemctl restart nginx.service
---------------------
作者:katios
来源:CSDN
原文:https://blog.csdn.net/sinat_21302587/article/details/72722096
版权声明:本文为博主原创文章,转载请附上博文链接!

centos7 nginx Failed to read PID from file /run/nginx.pid: Invalid argument 解决方法的更多相关文章

  1. nginx.service: Failed to read PID from file /run/nginx.pid: Invalid argument解决

    先附上错误信息: (myblog) root@Dapeng:/home/uwsgi# service nginx status ● nginx.service - A high performance ...

  2. Nginx启动错误 Failed to read PID from file /run/nginx.pid 的处理方法

    问题产生原因 因为 nginx 启动需要一点点时间,而 systemd 在 nginx 完成启动前就去读取 pid file 造成读取 pid 失败 解决方法 让 systemd 在执行 ExecSt ...

  3. Centos7.5中Nginx报错:nginx: [error] invalid PID number "" in "/run/nginx.pid" 解决方法

    服务器重启之后,执行 nginx -t 是OK的,然而在执行 nginx -s reload 的时候报错 nginx: [error] invalid PID number "" ...

  4. nginx重启报错:nginx: [error] invalid PID number "" in "/run/nginx.pid"

    问题描述:执行 nginx -t 是OK的,然而在执行 nginx -s reload 的时候报错 nginx: [error] invalid PID number “” in “/run/ngin ...

  5. nginx: [error] invalid PID number "" in "/run/nginx.pid"

    在重启云主机(系统)之后,执行 nginx -t 是OK的,然而在执行 nginx -s reload 的时候报错 nginx: [error] invalid PID number “” in “/ ...

  6. CCS5 建立SYS/BIOS工程时报错“cannot find file "./configPkg/linker.cmd" bios”的解决方法

    CCS5 建立SYS/BIOS工程时报错“cannot find file "./configPkg/linker.cmd" bios”的解决方法 报错 #10008-D cann ...

  7. 启动 Eclipse 弹出“Failed to load the JNI shared library jvm.dll”错误的解决方法!&&在eclipse.ini中为eclipse指定jdk启动

    参考:http://blog.csdn.net/zyz511919766/article/details/7442633 http://blog.sina.com.cn/s/blog_028f0c1c ...

  8. 启动 Eclipse 弹出“Failed to load the JNI shared library jvm.dll”错误的解决方法!

    启动 Eclipse 弹出"Failed to load the JNI shared library jvm.dll"错误的解决方法 http://blog.csdn.net/z ...

  9. XXXX is not in the sudoers file. This incident will be reported解决方法

    假设你用的是Red Hat系列(包括Fedora和CentOS)的Linux系统.当你执行sudo命令时可能会提示“某某用户 is not in the sudoers file.  This inc ...

随机推荐

  1. bzoj3255 一个关于序列的游戏

    题意是啥 给你一个数列,可以任意删去一段,记其长度为$s$,得到$val_s$的价值,问你最大价值和为多少.. 其中这一段数要满足成一个上凸且相邻数差为$1$ 显然,删掉一段数后剩下的左右会相邻.. ...

  2. Ubuntu编译安装配置Redis以及基本使用

    1.首先下载redis curl -O http://download.redis.io/releases/redis-4.0.8.tar.gz 2.解压压缩包 .tar.gz 3.安装TCL测试工具 ...

  3. JS基本数据类型

    基本数据类型: Undefined,null,boolean,number,string symbol(ES6) 复杂数据类型: object undefined: 变量声明未初始化,自动为undef ...

  4. token和盐

    // 盐,加密后密码获取    Map<String, String> map = new HashMap<String, String>();    map.put(&quo ...

  5. jQueryUI使用指南

    jQuery UI包含了许多维持状态的小部件(Widget),因此,它与典型的 jQuery 插件使用模式略有不同.所有的 jQuery UI 小部件(Widget)使用相同的模式,所以,只要您学会使 ...

  6. centos7证书安全登录

    生成一对密钥,本地私钥匹配线上主机的公钥进行登录,比密码登录更加安全方便. 本文适用MAC/Linux的本地环境 1.本地生成一对密钥 ssh-keygen -t rsa 2.把生成的公钥上传到线上主 ...

  7. 处理程序“AllowAccessJavaScripts”在其模块列表中有一个错误模块“ManagedPipelineHandler”

    处理程序“AllowAccessJavaScripts”在其模块列表中有一个错误模块“ManagedPipelineHandler” 执行命令"cd C:\Windows\Microsoft ...

  8. gitlab简单使用教程【转】

    平时一直是用git来管理代码仓库,也用过一段时间github,但是github免费版不能建私有仓库.后来转到了bitbucket,后来被atlassian收购后有点不适应,而且在国内访问经常连不上.还 ...

  9. 诡异的druid链接池链接断开故障经验总结

    背景 症状 排查 修复 背景 最近在陆续做机房升级相关工作,配合DBA对产线数据库链接方式做个调整,将原来直接链接读库的地址切换到统一的读负载均衡的代理 haproxy 上,方便机柜和服务器的搬迁. ...

  10. Spring中Mybatis的花样配置 及 原理

    摘自: https://www.jianshu.com/p/fc23c94fc439