Added subdomain and now certbot fails - AttributeError: can't set attribute

I successfully added the cert for bkrm.games and www.bkrm.games, then I added DNS A records for admin.bkrm.games and www.admin.bkrm.games. I created the Apache virtual environment and I can navigate the the test web pages and they show successfully. I then tried to run certbot --apache and got the following.


Certbot failed to authenticate some domains (authenticator: apache). The Certificate Authority reported these problems:
Domain: www.admin.bkrm.games
Type: dns
Detail: DNS problem: NXDOMAIN looking up A for www.admin.bkrm.games - check that a DNS record exists for this domain; no valid AAAA records found for www.admin.bkrm.games

Hint: The Certificate Authority failed to verify the temporary Apache configuration changes made by Certbot. Ensure that the listed domains point to this Apache server and that it is accessible from the internet.

Some challenges have failed.


DNS records appear correct.
root@backroom:/# nslookup admin.bkrm.games
Server: 127.0.0.53
Address: 127.0.0.53#53

Non-authoritative answer:
Name: admin.bkrm.games
Address: 143.198.135.207

root@backroom:/# nslookup bkrm.games
Server: 127.0.0.53
Address: 127.0.0.53#53

Non-authoritative answer:
Name: bkrm.games
Address: 143.198.135.207


My domain is: bkrm.games admin.bkrm.games

I ran this command: sudo certbot --apache

It produced this output:
hich names would you like to activate HTTPS for?
We recommend selecting either all domains, or all domains in a VirtualHost/server block.


1: bkrm.games
2: admin.bkrm.games
3: www.admin.bkrm.games
4: www.bkrm.games


Select the appropriate numbers separated by commas and/or spaces, or leave input
blank to select all options shown (Enter 'c' to cancel):


You have an existing certificate that contains a portion of the domains you
requested (ref: /etc/letsencrypt/renewal/bkrm.games.conf)

It contains these names: bkrm.games, www.bkrm.games

You requested these names for the new certificate: bkrm.games, admin.bkrm.games,
www.admin.bkrm.games, www.bkrm.games.

Do you want to expand and replace this existing certificate with the new
certificate?


(E)xpand/(C)ancel: e
Renewing an existing certificate for bkrm.games and 3 more domains
An unexpected error occurred:
AttributeError: can't set attribute
Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /var/log/letsencrypt/letsencrypt.log or re-run Certbot with -v for more details.
root@backroom:/# certbot certificates
Saving debug log to /var/log/letsencrypt/letsencrypt.log

My web server is (include version):
root@backroom:/# apache2 -v
Server version: Apache/2.4.57 (Ubuntu)
Server built: 2023-10-26T13:28:30

The operating system my web server runs on is (include version):
Ubuntu 23.10 x64
My hosting provider, if applicable, is:
Digital Ocean
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):
root@backroom:/# certbot --version
certbot 2.1.0

You might be affected by this known bug corrected in Certbot 2.3

I would try updating first https://certbot.eff.org

2 Likes

I had a typo in the config file and directory. admn instead of admin. duh.

1 Like

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