[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Certbot (Let's Encrypt) funktioniert nicht nach Umzug



Hallo Liste!

Aktuell bin ich dabei, meinen Server zu einem neuen Provider umzuziehen
und dabei auch von Debian Stretch auf Debian Buster umzustellen. Die
Konfigurationen - in diesem Fall von Apache und Certbot - habe ich nach
bestem Wissen und Gewissen 1:1 übertragen. Allerdings funktioniert das
Aktualisieren der Let's-Encrypt-Zertifikate (noch) nicht:

| # certbot renew --dry-run --no-self-upgrade
| Saving debug log to /var/log/letsencrypt/letsencrypt.log
|
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
| Processing /etc/letsencrypt/renewal/domain1.tld.conf
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
| Cert is due for renewal, auto-renewing...
| Plugins selected: Authenticator apache, Installer apache
| Renewing an existing certificate
| Performing the following challenges:
| http-01 challenge for domain2.tld
| Waiting for verification...
| Cleaning up challenges
| Attempting to renew cert (domain1.tld) from
/etc/letsencrypt/renewal/domain1.tld.conf produced an unexpected error:
Failed authorization procedure. domain2.tld (http-01):
urn:ietf:params:acme:error:unauthorized :: The client lacks sufficient
authorization :: 202.61.251.82: Invalid response from
http://domain2.tld/.well-known/acme-challenge/$ZUFALLSSTRING: 404. Skipping.
| All renewal attempts failed. The following certs could not be renewed:
|   /etc/letsencrypt/live/domain1.tld/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/domain1.tld/fullchain.pem (failure)
| ** DRY RUN: simulating 'certbot renew' close to cert expiry
| **          (The test certificates above have not been saved.)
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
| Running post-hook command:
/etc/letsencrypt/renewal-hooks/post/certbot-renew-courier
| Running post-hook command:
/etc/letsencrypt/renewal-hooks/post/certbot-renew-exim
| 1 renew failure(s), 0 parse failure(s)
|
| IMPORTANT NOTES:
|  - The following errors were reported by the server:
|
|    Domain: domain2.tld
|    Type:   unauthorized
|    Detail: 202.61.251.82: Invalid response from
|    http://domain2.tld/.well-known/acme-challenge/$ZUFALLSSTRING:
|    404
|
|    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.
| #

Falls es relevant sein sollte: Das Zertifikat umfasst mehrere Domains,
die Verifikation schlägt gleich bei der ersten Domain fehl.
Um den Hinweis von Certbot aufzugreifen: Ja, die Namensauflösung der
Domain(s) funktionieren und AAAA-Records (was laut Google wohl für
Probleme sorgen kann), gibt es nicht.

Aus dem certbot.log habe ich gefischt, dass Certbot anscheinend
versucht, /.well-known/acme-challenge/ über einen URL-Rewrite zugänglich
zu machen:

| 2022-09-25 21:39:25,420:DEBUG:certbot_apache.http_01:writing a pre
config file with text:
|          RewriteEngine on
|         RewriteRule ^/\.well-known/acme-challenge/([A-Za-z0-9-_=]+)$
/var/lib/letsencrypt/http_challenges/$1 [END]
|
| 2022-09-25 21:39:25,420:DEBUG:certbot_apache.http_01:writing a post
config file with text:
|          <Directory /var/lib/letsencrypt/http_challenges>
|             Require all granted
|         </Directory>
|         <Location /.well-known/acme-challenge>
|             Require all granted
|         </Location>
|
| 2022-09-25 21:39:25,566:DEBUG:certbot.reverter:Creating backup of
/etc/apache2/sites-enabled/domain1-le-ssl.conf

Und ja, mod_rewrite ist installiert und grundsätzlich funktionsfähig.
Ich vermute 'mal, dass es an irgendeiner dusseligen Stelle an einer
Kleinigkeit wie z.B. falsche Zugriffsrechte im Dateisystem hakt.
(Leider) räumt aber Certbot auch nach einem fehlgeschlagenen Update sehr
gründlich wieder auf, sodass ich nicht nachsehen kann, wo genau es hakt.
(Rewrite-Regeln gültig eingetragen, Challenge-File lesbar, usw...)

Wo könnte der Fehler liegen? Bzw. wie kann ich den Fehler weiter
einkreisen? Kann man Certbot irgendwie "Schritt für Schritt" laufen
lassen, bzw. Certbot irgendwie dazu bringen, die Rewrite-Regeln,
Challenge-Files etc. /nicht/ zu löschen?


TIA,

Sebastian


Reply to: