Struggling to renew certbot -- please help

My domain is:
cloud4.31west.net

I ran this command:
certbot certonly

It produced this output:

[root@cloud4 ~]# certbot certonly
Saving debug log to /var/log/letsencrypt/letsencrypt.log

How would you like to authenticate with the ACME CA?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1: Spin up a temporary webserver (standalone)
2: Place files in webroot directory (webroot)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Select the appropriate number [1-2] then [enter] (press 'c' to cancel): 2
Plugins selected: Authenticator webroot, Installer None
Please enter in your domain name(s) (comma and/or space separated)  (Enter 'c'
to cancel): cloud4.31west.net
Attempting to parse the version 1.9.0 renewal configuration file found at /etc/letsencrypt/renewal/cloud4.31west.net-0001.conf with version 1.6.0 of Certbot. This might not work.
Attempting to parse the version 1.9.0 renewal configuration file found at /etc/letsencrypt/renewal/cloud4.31west.net.conf with version 1.6.0 of Certbot. This might not work.
Attempting to parse the version 1.9.0 renewal configuration file found at /etc/letsencrypt/renewal/cloud5.31west.net.conf with version 1.6.0 of Certbot. This might not work.
Attempting to parse the version 1.9.0 renewal configuration file found at /etc/letsencrypt/renewal/seo.31west.net.conf with version 1.6.0 of Certbot. This might not work.
Cert is due for renewal, auto-renewing...
Renewing an existing certificate
An unexpected error occurred:
FileExistsError: [Errno 17] File exists: '/etc/letsencrypt/archive/cloud4.31west.net/privkey2.pem'
Please see the logfiles in /var/log/letsencrypt for more details.

My web server is (include version):
Apache/2.4.37 (centos)

The operating system my web server runs on is (include version):
CentOS Linux release 8.1.1911 (Core)

My hosting provider, if applicable, is:
VPS on Linode (now Akamai)

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):
No

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

When trying to renew my certificate, I'm getting the below message

Renewing an existing certificate
An unexpected error occurred:
FileExistsError: [Errno 17] File exists: '/etc/letsencrypt/archive/cloud4.31west.net/privkey2.pem'
Please see the logfiles in /var/log/letsencrypt for more details.

I'm not sure how to fix this. Certbot renewal was a very simple process previously, not sure what changed :frowning:

Please help

Thanks

To me, ("-0001") that's an indication that something has gone wrong [not as planned].
Please show:
certbot certificates

3 Likes

here is the output:

[root@cloud4 ~]# certbot certificates
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Attempting to parse the version 1.9.0 renewal configuration file found at /etc/letsencrypt/renewal/cloud4.31west.net-0001.conf with version 1.6.0 of Certbot. This might not work.
Renewal configuration file /etc/letsencrypt/renewal/cloud4.31west.net-0001.conf produced an unexpected error: expected /etc/letsencrypt/live/cloud4.31west.net-0001/cert.pem to be a symlink. Skipping.
Attempting to parse the version 1.9.0 renewal configuration file found at /etc/letsencrypt/renewal/cloud4.31west.net.conf with version 1.6.0 of Certbot. This might not work.
Attempting to parse the version 1.9.0 renewal configuration file found at /etc/letsencrypt/renewal/cloud5.31west.net.conf with version 1.6.0 of Certbot. This might not work.
Attempting to parse the version 1.9.0 renewal configuration file found at /etc/letsencrypt/renewal/seo.31west.net.conf with version 1.6.0 of Certbot. This might not work.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Found the following certs:
  Certificate Name: cloud4.31west.net
    Serial Number: 4de4c669399a327948a8f83cfeff20f8860
    Domains: cloud4.31west.net
    Expiry Date: 2023-03-21 15:19:02+00:00 (VALID: 12 days)
    Certificate Path: /etc/letsencrypt/live/cloud4.31west.net/fullchain.pem
    Private Key Path: /etc/letsencrypt/live/cloud4.31west.net/privkey.pem
  Certificate Name: cloud5.31west.net
    Serial Number: 39d82963f14399f8ae4ac1bac75ab4c6e77
    Domains: cloud5.31west.net
    Expiry Date: 2023-05-28 10:08:20+00:00 (VALID: 80 days)
    Certificate Path: /etc/letsencrypt/live/cloud5.31west.net/fullchain.pem
    Private Key Path: /etc/letsencrypt/live/cloud5.31west.net/privkey.pem
  Certificate Name: seo.31west.net
    Serial Number: 46776c4d5e72306576831395f1af655a3ce
    Domains: seo.31west.net
    Expiry Date: 2023-05-28 10:07:27+00:00 (VALID: 80 days)
    Certificate Path: /etc/letsencrypt/live/seo.31west.net/fullchain.pem
    Private Key Path: /etc/letsencrypt/live/seo.31west.net/privkey.pem

The following renewal configurations were invalid:
  /etc/letsencrypt/renewal/cloud4.31west.net-0001.conf
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
[root@cloud4 ~]#

Somebody messed up the /etc/letsencrypt/live/cloud4.31west.net-0001/ directory.

Somebody messed up the /etc/letsencrypt/archive/cloud4.31west.net/ directory too.

4 Likes

Honestly, I have only used the certbot commands for renewal since past 3 years. No other messing around.

I've been reading other messages on the forum with similar errors. How do all the users mess around in the exact same way? :slight_smile:

Please suggest how to fix this issue?

Thanks!!

1 Like

There are several ways to fix this. But, it looks like the start of the problem was in renewing cloud4.31west.net. For some reason another version of it got created as the -0001 and this new one has damaged folders.

So, what does this show? This original version of the cert is being used by your server right now (expires in 12 days) so it would be good to just keep using that.

certbot renew --dry-run --cert-name cloud4.31west.net
3 Likes

Thanks @MikeMcQ

[root@cloud4 renewal]# certbot renew --dry-run --cert-name cloud4.31west.net
Saving debug log to /var/log/letsencrypt/letsencrypt.log

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Processing /etc/letsencrypt/renewal/cloud4.31west.net.conf
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Attempting to parse the version 1.9.0 renewal configuration file found at /etc/letsencrypt/renewal/cloud4.31west.net.conf with version 1.6.0 of Certbot. This might not work.
Cert is due for renewal, auto-renewing...
Could not choose appropriate plugin: The requested apache plugin does not appear to be installed
Attempting to renew cert (cloud4.31west.net) from /etc/letsencrypt/renewal/cloud4.31west.net.conf produced an unexpected error: The requested apache plugin does not appear to be installed. Skipping.
All renewal attempts failed. The following certs could not be renewed:
  /etc/letsencrypt/live/cloud4.31west.net/fullchain.pem (failure)

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
** DRY RUN: simulating 'certbot renew' close to cert expiry
**          (The test certificates below have not been saved.)

All renewal attempts failed. The following certs could not be renewed:
  /etc/letsencrypt/live/cloud4.31west.net/fullchain.pem (failure)
** DRY RUN: simulating 'certbot renew' close to cert expiry
**          (The test certificates above have not been saved.)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1 renew failure(s), 0 parse failure(s)

But after 12 days, I will need to renew so might as well do it now when I have the time. Please suggest the simplest way to to fix this. I'm novice with Linux but following a step-by-step guide I can get the work done.

TIA

1 Like

It looks like your Certbot install was damaged. And, the warnings about version 1.9 with your current 1.6 says something changed.

Can you describe what changed?

Or, maybe best just to upgrade to the latest snap-based Certbot. The steps are below but follow them carefully

3 Likes

Let me give it a try and revert.
Thanks

2 Likes

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