Encountered exception during recovery: certbot.errors.MisconfigurationError: nginx restart failed

My domain is: appsmith.convoicar.fr

I ran this command: sudo certbot --nginx

It produced this output:
Encountered exception during recovery: certbot.errors.MisconfigurationError: nginx restart failed:
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Unknown error)
nginx: [emerg] bind() to [::]:80 failed (98: Unknown error)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Unknown error)
nginx: [emerg] bind() to [::]:80 failed (98: Unknown error)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Unknown error)
nginx: [emerg] bind() to [::]:80 failed (98: Unknown error)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Unknown error)
nginx: [emerg] bind() to [::]:80 failed (98: Unknown error)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Unknown error)
nginx: [emerg] bind() to [::]:80 failed (98: Unknown error)
nginx: [emerg] still could not bind()
nginx restart failed:
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Unknown error)
nginx: [emerg] bind() to [::]:80 failed (98: Unknown error)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Unknown error)
nginx: [emerg] bind() to [::]:80 failed (98: Unknown error)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Unknown error)
nginx: [emerg] bind() to [::]:80 failed (98: Unknown error)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Unknown error)
nginx: [emerg] bind() to [::]:80 failed (98: Unknown error)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Unknown error)
nginx: [emerg] bind() to [::]:80 failed (98: Unknown error)
nginx: [emerg] still could not bind()

My web server is (include version) / The operating system my web server runs on is (include version):
**nginx version: nginx/1.18.0 **
NAME="Ubuntu"
VERSION="21.04 (Hirsute Hippo)"

My hosting provider, if applicable, is: One & One

I can login to a root shell on my machine (yes or no, or I don't know): Yes

I'm using a control panel to manage my site (no, or provide the name and version of the control panel):

The version of my client is (e.g. output of certbot --version or certbot-auto --version if you're using Certbot): certbot 1.20.0

@j2bd Welcome to the community!

This is a coincidence. We resolved a problem like this just yesterday. Hopefully yours is caused by a similar reason. In that case an nginx server got stuck and could not be stopped. We had to restart the server.

Show results of these commands. Please put three backticks ``` before and after to format nice (or use the preformatted text menu option).

sudo netstat -pant | grep -Ei ':80|listen'
sudo systemctl stop nginx
sudo netstat -pant | grep -Ei ':80|listen'

We want to see what nginx is currently listening (the first netstat command) and then if it remains listening after stopping it. If it remains listening after the stop, try restarting your server. If it did stop then we will investigate more - please post the results of the commands then.

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.