In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-21 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article introduces the relevant knowledge of "what to do if you fail to open nginx.pid". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
I. description of the problem
When we usually use nginx, it is often possible to find that our pid is missing and missing, which leads to an error, as follows:
Nginx: [error] open () "/ var/run/nginx/nginx.pid" failed (2: No such file or directory)
Or:
Nginx: [error] invalid PID number "" in "/ var/run/nginx/nginx.pid"
2. analysis of the emergence of problems
Nginx.pid file does not exist
The directory where nginx.pid is located does not exist.
Solution 1: create a directory
For the problem:
Try to enter the / var/run/nginx directory:
The directory configured by nginx.pid here is set when compiling nginx, so which directory to detect depends on what directory you set at compile time:
You can view it through: nginx-V instruction
If the directory is not found, create it:
Mkdir / var/run/nginx
Exactly where to create a directory here is also the same as above to see what directory you configured at compile time.
Try to enter the newly created directory and check that it has been created successfully:
Cd / var/run/nginx
Enter the directory where nginx is installed:
Cd / usr/local/nginx
Get the installation directory of nginx: whereis nginx
Scenario 2: reassign a profile
For the problem:
Enter sbin:
Cd / sbin
Reassign a nginx.conf file:
. / nginx-c / usr/local/nginx/conf/nginx.conf
Reload the configuration file
. / nginx-s reload scheme 3: modify the default pid
Enter the conf directory:
Cd.. / conf
Modify the nginx.conf file to execute the new nginx.pid:
# pid logs/nginx.pid;, "what if nginx.pid fails to open" is introduced here. Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.