Saving debug log to /var/log/letsencrypt/letsencrypt.log
How would you like to authenticate with the ACME CA?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1: Nginx Web Server plugin (nginx)
2: Spin up a temporary webserver (standalone)
3: Place files in webroot directory (webroot)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Select the appropriate number [1-3] then [enter] (press 'c' to cancel): 1
Plugins selected: Authenticator nginx, Installer None
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for forennyvarld.se
Waiting for verification...
Cleaning up challenges
Failed authorization procedure. forennyvarld.se (http-01): urn:ietf:params:acme:error:unauthorized :: The client lacks sufficient authorization :: The key authorization file from the server did not match this challenge "igI4ufJl6MKO6YDLleKDxdqI9QyulTGgyOHEmQUCMUQ.43oP36BhRd9JXI52luz7wXaE6fGTkXQRzZM2ibq4vsE" != "igI4ufJl6MKO6YDLleKDxdqI9QyulTGgyOHEmQUCMUQ.-f_daEYxVOFls4aupfol2f4PA8ikqBUw-4tU6dotcK8"
IMPORTANT NOTES:
- The following errors were reported by the server:
Domain: forennyvarld.se
Type: unauthorized
Detail: The key authorization file from the server did not match
this challenge
"igI4ufJl6MKO6YDLleKDxdqI9QyulTGgyOHEmQUCMUQ.43oP36BhRd9JXI52luz7wXaE6fGTkXQRzZM2ibq4vsE"
!=
"igI4ufJl6MKO6YDLleKDxdqI9QyulTGgyOHEmQUCMUQ.-f_daEYxVOFls4aupfol2f4PA8ikqBUw-4tU6dotcK8"
To fix these errors, please make sure that your domain name was
entered correctly and the DNS A/AAAA record(s) for that domain
contain(s) the right IP address.
My web server is (include version): nginx/1.14.0 (Ubuntu)
The operating system my web server runs on is (include version): Ubuntu 18.04.6 LTS
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 0.31.0
Please do NOT use this option if you have absolutely no clue what it actually does (as seems to be the case here). It does NOT maaaaaaagically make a previously failing challenge suddenly pass.
Also please use the staging environment for testing before you hit a rate limit.
With regard to the failing challenge: for some reason the nginx plugin uses an account which is different than the account used to communicate with the ACME server, which is kinda weird. I also noticed your Certbot version is 0.31.0, which is like, ancient. There might have been a bug in Certbot which has been fixed in the mean time. (Or maybe not, but a good idea to try and update Certbot nonetheless.) Please upgrade Certbot by switching to snapd, see https://certbot.eff.org/ for the instructions.
The authorization changes with each certbot request.
If the system is finding an entry which is unexpected, then it sounds like it might be an outdated entry - which sounds like it was entered manually; As automated systems won't make such a mistake.
So...
How have you adjusted the ACME challenge response to produce the outdated reply?
That's the first part, the token. The second part after the dot (.) is the base64 of the account thumbprint and is the same for every challenge of the same ACME account.
Ok, thanks. I have removed old certbot and installed version 2.4.0.
I run sudo certbot certonly --test-cert -d forennyvarld.se and still get:
$ sudo certbot certonly --test-cert -d forennyvarld.se
Saving debug log to /var/log/letsencrypt/letsencrypt.log
How would you like to authenticate with the ACME CA?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1: Nginx Web Server plugin (nginx)
2: Runs an HTTP server locally which serves the necessary validation files under
the /.well-known/acme-challenge/ request path. Suitable if there is no HTTP
server already running. HTTP challenge only (wildcards not supported).
(standalone)
3: Saves the necessary validation files to a .well-known/acme-challenge/
directory within the nominated webroot path. A seperate HTTP server must be
running and serving files from the webroot path. HTTP challenge only (wildcards
not supported). (webroot)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Select the appropriate number [1-3] then [enter] (press 'c' to cancel): 1
Requesting a certificate for forennyvarld.se
Certbot failed to authenticate some domains (authenticator: nginx). The Certificate Authority reported these problems:
Domain: forennyvarld.se
Type: unauthorized
Detail: The key authorization file from the server did not match this challenge "KqftifDj-RkDWuDnxCS6ZwUHzuYdiDmShS7kCYoTMtQ.43oP36BhRd9JXI52luz7wXaE6fGTkXQRzZM2ibq4vsE" != "KqftifDj-RkDWuDnxCS6ZwUHzuYdiDmShS7kCYoTMtQ.-f_daEYxVOFls4aupfol2f4PA8ikqBUw-4tU6dotcK8"
Hint: The Certificate Authority failed to verify the temporary nginx configuration changes made by Certbot. Ensure the listed domains point to this nginx server and that it is accessible from the internet.
Some challenges have failed.
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.
ah, ok, no, I did not request any rate increases, so I guess, I can recreate accounts. Would I be able to renew existing certificate with new accounts? Sorry for silly questions
Unless you've implemented some DNS/CAA restrictions to a specific LE account [not likely].
Then as long as you can satisfy the HTTP-01 challenge you can obtain new certs.
[FYI: There really isn't such a thing as a certificate renewal - all renewed certs are new certs]
I have created new account, but getting same error:
Account registered.
Requesting a certificate for forennyvarld.se
Certbot failed to authenticate some domains (authenticator: nginx). The Certificate Authority reported these problems:
Domain: forennyvarld.se
Type: unauthorized
Detail: The key authorization file from the server did not match this challenge "fEDQeCloAvW-vD2YvaZ4MVlrvw4GH2Zab3D-Fs3m-Sg.soPEalyNYAk2O9GoNEjdT5Pq_KtM-XJiKLYSWJFdifk" != "fEDQeCloAvW-vD2YvaZ4MVlrvw4GH2Zab3D-Fs3m-Sg.-f_daEYxVOFls4aupfol2f4PA8ikqBUw-4tU6dotcK8"
You could potentially use the DNS challenge to get your certificate, which will avoid this interception. My certbot-dns-multi plugin supports Loopia with Certbot: