Let’s Encrypt Zertifikat abgelaufen, aber NextcloudPi erhält kein Neues

Mein Let’s Encrypt Zertifikat ist seit dem 13.02.2019 abgelaufen. Seitdem habe ich keinen Zugang mehr zu meiner Nextcloud. Der Nextcloud Pi läuft jetzt seit mehr als einem Jahr fehlerfrei, macht automatisch Upgrades und bezieht automatisch neue Zertifikate.
Der Browser meldet, dass das Zertifikat seit 13.02. abgelaufen ist. Wenn ich versuche im NextcloudPi Panel ein neues Zertifikat zu ziehen, dann erhalte ich folgende Fehlermeldung:
"Cert not yet due for renewal
Keeping the existing certificate

Certificate not yet due for renewal; no action taken."

Ich habe mir in diversen Foren bereits Lösungsvorschläge angeschaut und ausprobiert. Leider erfolglos.
Die meisten Vorschläge bestehen darin, apache2 und diverse andere Pakete zwangsweise neu zu installieren. Das hat aber nichts gebracht.

Mir ist aufgefallen, das gleichzeitig mit dem Zertifikatablauf automatisch ein NextcloudPi Upgrade auf Version 1.6.3 durchgeführt wurde. Kann es sein, dass dabei etwas schief gelaufen ist ?

Problem gelöst !
Im Verzeichnis /etc/letsencrypt
./certbot-auto gestartet.

Zertifikat wurde erneuert. Warum das nicht mehr automatisch läuft ? Keine Ahnung !

Aus dem Logfile geht hervor, dass das Zertifikat abgelaufen war und erneuet wurde. Das alte Zertifikat war aber noch vorhanden und kein Neues. Nach manuellem Start des Scripts liegt das neue Zertifikat dort, wo es hingehört. Mal sehen, ob das beim nächsten mal wieder automatisch läuft.

2 Likes

Moin hesch,
ein großes Dankeschön für deine Frage/Antwort.
Wie dir, ging es mir heute, und bin deiner Anleitung gefolgt.
Alles wieder gut :slight_smile:
LG soyo

Schön, dass es Dir geholfen hat. Jetzt warte ich nur noch auf das nächste Zertifikat. Ob das wohl wieder automatisch kommt?

Tauend Dank! Hat auch bei mir funktioniert.

Hat hier leider nicht so ganz funktioniert:

Ich steh hier immer noch an:

pi@nextcloudpi:~ $ sudo -i
root@nextcloudpi:~# cd /etc/letsencrypt
root@nextcloudpi:/etc/letsencrypt# ./certbot-auto
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator apache, Installer apache

Which names would you like to activate HTTPS for?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1: xxx.ddns.net
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Select the appropriate numbers separated by commas and/or spaces, or leave input
blank to select all options shown (Enter 'c' to cancel):
Obtaining a new certificate
archive directory exists for xxx.ddns.net-0001
root@nextcloudpi:/etc/letsencrypt#

Und das zugehörige Log-File macht mich leider um nichts schlauer:

2019-04-08 18:45:46,058:DEBUG:certbot.main:certbot version: 0.33.1
2019-04-08 18:45:46,061:DEBUG:certbot.main:Arguments: []
2019-04-08 18:45:46,061:DEBUG:certbot.main:Discovered plugins: PluginsRegistry(PluginEntryPoint#apache,PluginEn$
2019-04-08 18:45:46,161:DEBUG:certbot.log:Root logging level set at 20
2019-04-08 18:45:46,165:INFO:certbot.log:Saving debug log to /var/log/letsencrypt/letsencrypt.log
2019-04-08 18:45:46,171:DEBUG:certbot.plugins.selection:Requested authenticator None and installer None
2019-04-08 18:45:46,543:DEBUG:certbot_apache.configurator:Apache version is 2.4.25
2019-04-08 18:45:48,153:DEBUG:certbot.plugins.disco:No installation (PluginEntryPoint#nginx): Could not find a $
Traceback (most recent call last):
  File "/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/certbot/plugins/disco.py", line 132, in pre$
    self._initialized.prepare()
  File "/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/certbot_nginx/configurator.py", line 143, i$
    "Could not find a usable 'nginx' binary. Ensure nginx exists, "
NoInstallationError: Could not find a usable 'nginx' binary. Ensure nginx exists, the binary is executable, and$
2019-04-08 18:45:48,161:DEBUG:certbot.plugins.selection:Single candidate plugin: * apache
Description: Apache Web Server plugin
Interfaces: IAuthenticator, IInstaller, IPlugin
Entry point: apache = certbot_apache.entrypoint:ENTRYPOINT
Initialized: <certbot_apache.override_debian.DebianConfigurator object at 0x75ad76f0>
Prep: True
2019-04-08 18:45:48,165:DEBUG:certbot.plugins.selection:Selected authenticator <certbot_apache.override_debian.$
2019-04-08 18:45:48,166:INFO:certbot.plugins.selection:Plugins selected: Authenticator apache, Installer apache
2019-04-08 18:45:48,190:DEBUG:certbot.main:Picked account: <Account(RegistrationResource(body=Registration(stat$
2019-04-08 18:45:48,196:DEBUG:acme.client:Sending GET request to https://acme-v02.api.letsencrypt.org/directory.
2019-04-08 18:45:48,205:DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): acme-v02.api.letsencryp$
2019-04-08 18:45:48,572:DEBUG:urllib3.connectionpool:https://acme-v02.api.letsencrypt.org:443 "GET /directory H$
2019-04-08 18:45:48,575:DEBUG:acme.client:Received response:
HTTP 200
Server: nginx
Content-Type: application/json
Content-Length: 658
X-Frame-Options: DENY
Strict-Transport-Security: max-age=604800
Expires: Mon, 08 Apr 2019 16:45:48 GMT
Cache-Control: max-age=0, no-cache, no-store
Pragma: no-cache
Date: Mon, 08 Apr 2019 16:45:48 GMT
Connection: keep-alive

{
  "keyChange": "https://acme-v02.api.letsencrypt.org/acme/key-change",
  "meta": {
    "caaIdentities": [
      "letsencrypt.org"
    ],
    "termsOfService": "https://letsencrypt.org/documents/LE-SA-v1.2-November-15-2017.pdf",
    "website": "https://letsencrypt.org"
  },
  "newAccount": "https://acme-v02.api.letsencrypt.org/acme/new-acct",
  "newNonce": "https://acme-v02.api.letsencrypt.org/acme/new-nonce",
  "newOrder": "https://acme-v02.api.letsencrypt.org/acme/new-order",
  "revokeCert": "https://acme-v02.api.letsencrypt.org/acme/revoke-cert",
  "z4LYyfzWYAg": "https://community.letsencrypt.org/t/adding-random-entries-to-the-directory/33417"
}
2019-04-08 18:46:15,509:DEBUG:certbot.cert_manager:Renewal conf file /etc/letsencrypt/renewal/xxx.ddns.n$
2019-04-08 18:46:15,519:DEBUG:certbot.cert_manager:Traceback was:
Traceback (most recent call last):
  File "/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/certbot/cert_manager.py", line 384, in _sea$
    candidate_lineage = storage.RenewableCert(renewal_file, cli_config)
  File "/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/certbot/storage.py", line 443, in __init__
    "file reference".format(self.configfile))
CertStorageError: renewal config file {} is missing a required file reference

2019-04-08 18:46:15,520:INFO:certbot.main:Obtaining a new certificate
2019-04-08 18:46:17,189:DEBUG:certbot.crypto_util:Generating key (2048 bits): /etc/letsencrypt/keys/0007_key-ce$
2019-04-08 18:46:17,207:DEBUG:certbot.crypto_util:Creating CSR: /etc/letsencrypt/csr/0007_csr-certbot.pem
2019-04-08 18:46:17,211:DEBUG:acme.client:Requesting fresh nonce

LG
SMichel

9th april
Dear diary!

https://www.ssllabs.com/ssltest/ says that my certificate meanwhile is expired for over a month. That means that my nextcloud inkluding the adressbooks and all calendars are completly useless since then.

Getting messages like “nextcloud has 10 new notifications for you” - don’t now what notifications, can’t log in.

Thunderbird gives errors every 5 minutes, can’t sync the calendars, which are completely outdated in the meanwhile.

Bought a book calendar, copied all events by hand.

Wonder if it’s worth to give nextcloud another chance and try a complete new setup… Don’t think so 'cause anyway I have the chance to face the same problem again…

Yours
SMichel

Da von mir nur 3 aufeinanderfolgende Antworten zulässig sind schreib ich jetzt hier auch nicht mehr. Bekomme nur die Meldung, ich solle auf Antworten warten, das mach ich halt jetzt.

LG

SMichel

Bei mir funktioniert inzwischen mit Letsencrypt auch nichts mehr. Jedes mal, wenn das Zertifikat abgelaufen ist gibt es andere Probleme. Neun Monate lang gab es keine Probleme. Dann fiel der Automatismus aus und Nextcloud erhielt automatisch kein neues Zertifikat. Auch über das NextcloudPi-Panel ließ sich kein neues Zertifikat ziehen. Erst mit dem manuellen Start von “certbot-auto” habe ich ein Zertifikat erhalten. Das hat jetzt über 2 Zertifikatsintervalle funktioniert.
Jetzt ist ein neuer Fehler aufgetreten. Es wurde automatisch ein neues Zertifikat gezogen, aber es wird nicht verwendet. Rufe ich Nextcloud über Firefox auf, dann erhalte ich eine Fehlermeldung, dass mein Zertifikat bereits seit Januar 2018 abgelaufen sei. Der Webserver liefert aktuell also mein allererstes, schon lange abgelaufenes Zerfifikat wieder aus. Im Ordner /etc/letsencrypt gibt es jetzt zwei Unterverzeichnisse mit Zertifikaten das 1. “meine.domain”, das 2. “meine.domain-0001”. Im 1. steckt mein uraltes Zertifikat, das schon lange abgelaufen ist. Das 2. erhält das aktuelle Zertifikat. Ich habe erfolglos versucht, durch umbenennen der Verzeichnisse oder durch kopieren der Dateinen, das aktuelle Zertifikat in das 1. Verzeichnis zu bekommen. Aber die Dateien sind nur symbolische Links zu Dateien im Verzeichnis “archiv”. Zu diesem Verzeichnis habe ich sogar als root keinen Zugang. Mir gelingt es einfach nicht die Pfade anzupassen.
Eigentlich sollte das ja alles automatisch laufen. Mittlerweile habe ich die Konfiguration vermutlich zerschossen.
Ich werde wohl alles neu installieren müssen und die Backups wieder einspielen. Oder hat jemand eine bessere Idee ?

1 Like

Hab exakt dasgleiche Problem wie hesch ! Sein Beitrag hat mir vor einigen Monaten bereits weitergeholfen (manueller Start von “certbot-auto” hat erfolgreich zu neuem Zertifikat geführt), nun stehe ich wieder vor demgleichen Problem (s. Beitrag hesch vom 03. Mai). In der Nextcloudpi-Webkonfiguration wird das Zertifikat erfolgreich erneuert (Mitteilung letsencrypt), es wird jedoch vom Firefox-Browser nicht erkannt. Eingabe von /etc/letsencrypt/ “.certbot-auto renew” (als root) führt diesmal auch zu keinem Zertifikat im richtigen Pfad. Desgleichen “certbot renew”:

z.B.:

:~ $ cd /etc/letsencrypt
:/etc/letsencrypt $ sudo su
:/etc/letsencrypt# certbot renew

Saving debug log to /var/log/letsencrypt/letsencrypt.log


Processing /etc/letsencrypt/renewal/“myadress”.com-0001.conf


Cert not yet due for renewal


Processing /etc/letsencrypt/renewal/“myadress”.com.conf


Traceback (most recent call last):
File “/usr/lib/python3/dist-packages/certbot/renewal.py”, line 67, in _reconstitute
renewal_candidate = storage.RenewableCert(full_path, config)
File “/usr/lib/python3/dist-packages/certbot/storage.py”, line 444, in init
“file reference”.format(self.configfile))
certbot.errors.CertStorageError: renewal config file {} is missing a required file reference
Renewal configuration file /etc/letsencrypt/renewal/“myadress”.com.conf is broken. Skipping.


The following certs are not due for renewal yet:
/etc/letsencrypt/live/“myadress”.com-0001/fullchain.pem expires on 2020-02-09 (skipped)
No renewals were attempted.
Additionally, the following renewal configurations were invalid:
/etc/letsencrypt/renewal/“myadress.com”.conf (parsefail)

Auch kopieren von /etc/letsencrypt/renewal/ “myadress”.com-0001.conf auf “myadress”.com.conf brachte kein positives Ergebnis. (Annahme: neues Zertifikat unter com-0001 , altes Zertifikat unter com, wie von hesch beschrieben)
Es scheint, dass Firefox auf eine defekte conf-Datei zugreift, auf der ein altes Zertifikat liegt, das neue wird in der 0001.conf aktualisiert aber nicht gefunden. Wie kann ich den richtigen Pfad setzen und die defekte conf-Datei löschen ? (Hab leider nur Halbwissen :crazy_face:)

Habe mittlerweile die Lösung für mein Problem gefunden (!):


Der Beitrag gonchs commented [on 16 Mar 2016] hilft mir weiter !
:slightly_smiling_face: