Record the prompt nginx when Nginx starts: [emerg] still could not bind()

Early this morning, the weather was good and I was in a good mood. I was thinking about more articles. Boy, the website couldn't be opened at first. When launching Nginx:/usr/local/nginx/sbin/nginx, I was reminded of the following:

 [ root@host  ~]# /usr/local/nginx/sbin/nginx  nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use) nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use) nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use) nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use) nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use) nginx: [emerg] still could not bind()

terms of settlement:

View the configured port according to the Nginx configuration file (port 80 is used in this article), and then view the port occupancy according to the port

 [ root@v157040  ~]# netstat -ntlp|grep 80 tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      1916/nginx: master

Use the kill command to kill the occupied process, and then restart Nginx

 kill 1916

Then enter the website again and prompt me "database connection error"

 Record the prompt nginx when Nginx starts: [emerg] still could not bind()

Restarting the database is OK!!!

Original article by Mo Tao, if reproduced, please indicate the source: https://imotao.com/1766.html

fabulous (0)
 Head of Mo Tao Mo Tao
Previous 10:19 am, March 25, 2020
Next 12:10 p.m., March 25, 2020

Related recommendations

Post reply

Your email address will not be disclosed. Required items have been used * tagging

This site uses Akismet to reduce spam comments. Learn how we handle your comment data