This article is a mirror article of machine translation, please click here to jump to the original article.

View: 14188|Reply: 0

[Web] nginx: [error] open() /nginx.pid failed (2: No such file or directory)

[Copy link]
Posted on 12/7/2016 1:36:30 PM | | |
nginx: [error] open() "/service/nginx-1.10.2/logs/nginx.pid" failed (2: No such file or directory)

Because, I recompiled nginx, which caused the nginx restart failure, as follows:


I get this error when I run the nginx -s reload restart or nginx -s stop command.

$sudo nginx (after executing the command, nginx will create a file called nginx.pid in the path /usr/local/var/run/)

$sudo nginx -s stop (After running this command, nginx will delete the file named nginx.pid in the path /usr/local/var/run/.)But only if nginx.pid must exist under the /usr/local/var/run/ pathdocument)

$sudo nginx -s reload (After executing the command, nginx will restart,But only if the nginx.pid file exists under the /usr/local/var/run/ path)


Then cd /service/nginx-1.10.2/logs/ directory, found that the nginx.pid file existed, but the file size was 0, and then I rm to delete this file, and found that it still didn't work.

Solution:
Just start nginx
nginx






Previous:Nginx reverse proxy Google
Next:Implementation: The nginx dynamic addition module has been installed
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com