[LINUX] Let's Encrypt updated! What to do if the certbot renew command doesn't work

environment

Linux CentOS 7 apache Let's Encrypt

Update error

Let's Encrypt must be updated once every three months. Therefore, I am using a batch to perform automatic updates, but I received an email notifying me that the update failed.

Actually enter CentOS and execute the following command

certbot renew --dry-run

Below, the result

Congratulations, all renewals succeeded.

That's a success

That's why I decided to remove the dry-run and try it.

certbot renew

Below, the result

Attempting to renew cert (***********.com) from /etc/letsencrypt/renewal/************.com.conf produced an unexpected error: Problem binding to port 80: Could not bind to IPv4 or IPv6.. Skipping.

Mumumu

It succeeds during dry-run and fails during production. ..

Looking at the content of the error, port 80 could not be used. It's like that.

Solution

Go to /etc/letsencrypt/renewal/********.com.conf

Pay attention to the following description

authenticator = standalone

It is in standalone mode. .. .. !! Since standalone mode uses port 80, apache must be stopped once when renewing the certificate.

It's a problem, so change to the webroot pattern! !!

[renewalparams]
#authenticator = standalone
#account = 98155b431f2d9036dcaae14606620c3f
#server = https://acme-v02.api.letsencrypt.org/directory
#installer = apache
authenticator = webroot
account = 56f88f044b7c750ee8b687a024c4ece1
server = https://acme-v02.api.letsencrypt.org/directory
post_hook = /usr/bin/systemctl reload httpd.service

[[webroot_map]]
*****.com = /var/www/html/****
www.*****.com = /var/www/html/****

After completing the settings, update letsencrypt again and you're done. .. .. !!

Recommended Posts

Let's Encrypt updated! What to do if the certbot renew command doesn't work
What to do if rails s doesn't work
What to do if atom autocomplete-python doesn't work
What to do if Python doesn't work on Git for Windows
What to do if the yum command fails to set locale, defaulting to C
What to do if the server doesn't start with python manage.py runserver
What to do if the latest Jupyter Notebook and nb extensions don't work
What to do if scrapy doesn't work after installing scrapy with pip on mac
What to do if the print command itself causes an error in Maya python
What to do if the package dependency cannot be repaired
What to do if you get an error when running "certbot renew" in CakePHP environment
What to do if yum breaks
What to do to get tensorflow-gpu to work
What to do if the inode is exhausted on EC2 Linux
What to do if you can't use the trash in Lubuntu 18.04.
Let's Encrypt certbot renew automatic update error
What to do if the Pipenv environment is corrupted by updating Homebrew
What to do if the Chainer (Windows) sample mnist terminates with WinError 183.
Let's summarize what you want to do.
What to do if you installed pyenv on Mac OS using Homebrew but the python version doesn't switch
Example of what to do when the sample script does not work (OpenCV-Python)
[Note] What to do if the Qt library conflicts between pyqt and opencv
What to do if a version error occurs in the selenium Chrome driver
What to do if (base) is displayed at the beginning of the Mac terminal
What to do if pipreqs results in UnicodeDecodeError
Note: What to do if pip install fails
What to do if mod_fcgid cannot resolve UnicodeEncodeError
What to do if pip cannot be installed
What to do if Docker-sync suddenly stops working
What to do if "amazon-linux-extras" → "No module named amazon_linux_extras"
Create a command to get the work log
What to do if ubuntu says your password is too short to change [passwd command] [ubuntu]
What to do if the Microsoft Store opens even if you run python on Windows
What to do if the progress bar is not displayed in tqdm of python
What to do if Python does not switch from the System version in pyenv
What to do if you get the error ʻERR_FEATURE_UNAVAILABLE_ON_PLATFORM` when using ts-node-dev on Linux
What to do if you can't hit the arrow keys in the Python interactive console
What to do if you can't pip install mysqlclient
No module named What to do if you get'libs.resources'
ModuleNotFoundError: No module What to do if you get'tensorflow.contrib'
What to do if SciPy installation fails on CentOS
What to do if the library doesn't load when you run it in PyCharm, even though it works fine on terminal
What to do if a UnicodeDecodeError occurs in pip
What to do if pip install fails to install dependent libraries
Let's add it to the environment variable from the command ~
What to do if sys / cdefs.h does not exist
What to do if pyenv is not enabled (zsh)
[* CentOS 6.10] What to do if you cannot add the IUS Community Project repository on CentOS 6.5 (VirtualBox)
What to do if ʻarguments [0] .scrollIntoView ();` fails in python selenium
What to do if pip gives a DistributionError in Homebrew
What to do if you get "coverage unknown" in Coveralls
What to do if you can't sort files with subscripts
What to do if a 0xC0000005 error occurs in tf.train.start_queue_runners ()
What to do if package installation fails when deploying to heroku
What to do if `pip install matplotlib` fails on Mac
What to do if you can't log in as root
What to do if you can't use WiFi on Linux
What to do if Linux VLC can no longer rotate
What to do if pip install mysqlclient fails on MacOS
What to do if you lose your EC2 key pair
[Django] Test doesn't work if I change the file location