cron letsencrypt nach Upgrade von Debian9 zu Debian10

  • Hallo Zusammen,


    gestern haben wir auf der ersten Live-Maschine ein Debian-Upgrad von 9 auf 10 gemacht. Das hat scheinbar auch gut funktioniert.

    Lediglich der letsencrypt zickt. Ob das nun auch mit dem certbot-Problem zu tun hat erschließt sich mir jetzt nicht sofort.


    Folgende Meldung hat der Cronjob ausgegeben:


    ###############################

    /opt/pdadmin/etc/ssl-validation/ -d www.domain.de -d domain.de

    ###############################


    Your system is not supported by certbot-auto anymore.

    Certbot will no longer receive updates.

    Please visit https://certbot.eff.org/ to check for other alternatives.

    Traceback (most recent call last):

    File "/opt/eff.org/certbot/venv/bin/letsencrypt", line 7, in <module>

    from certbot.main import main

    File "/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/certbot/main.py", line 2, in <module>

    from certbot._internal import main as internal_main

    File "/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/certbot/_internal/main.py", line 6, in <module>

    import logging.handlers

    File "/usr/lib/python2.7/logging/__init__.py", line 26, in <module>

    import sys, os, time, cStringIO, traceback, warnings, weakref, collections

    File "/usr/lib/python2.7/weakref.py", line 14, in <module>

    from _weakref import (

    ImportError: cannot import name _remove_dead_weakref


    Hat jemand eine Idee was da das Problem ist?


    Manfred

  • Folgender Link hat den Hinweis gegeben das man das /op/eff.org/certbot löschen soll.

    https://community.letsencrypt.…emove-dead-weakref/104556


    Wenn man das aber tut dann kommt man wieder dazu das der Certbot-auto nicht mehr unterstützt ist und nicht installiert werden kann.


    Skipping bootstrap because certbot-auto is deprecated on this system.

    Your system is not supported by certbot-auto anymore.

    Certbot cannot be installed.

    Please visit https://certbot.eff.org/ to check for other alternatives.


    hm. hat da jemand einen workaround der funktioniert?

  • Hallo, ich möchte euch an meinen "fummeleien" teilhaben lassen um anderen vielleicht Arbeit zu ersparen.

    Also auf der von Debian9 zu Debian10 geupdateten Maschine habe ich nun snap installiert.
    Das hat im Endeffekt dazu geführt das man aus dem /usr/bin/certbot vorhandene Zertifikate verlängern könnte, glaube ich.



    Aber mit dem "/opt/pdadmin/bin/letsencrypt --all" greift das System nicht auf den neuen certbot zu.

    Code
    root@server05 /usr/bin # /opt/pdadmin/bin/letsencrypt --all
    ###############################
    /opt/pdadmin/etc/ssl-validation/ -d www.domain.de -d domain.de
    ###############################
    Skipping bootstrap because certbot-auto is deprecated on this system.
    Your system is not supported by certbot-auto anymore.
    Certbot cannot be installed.
    Please visit https://certbot.eff.org/ to check for other alternatives.
  • Ja. in der TXT-Datei steht: BootstrapDebCommon 1

    wenn man das ganze mit dem /opt/pdadmin/bin/certbot-auto renew startet geht nix mehr...

    a) /opt/eff.org/certbot_0 (umbenannt wie in dem Link ganz oben empfohlen)

    root@server05 /opt/eff.org/certbot_0/venv # /opt/pdadmin/bin/certbot-auto renew

    Skipping bootstrap because certbot-auto is deprecated on this system.

    Your system is not supported by certbot-auto anymore.

    Certbot cannot be installed.

    Please visit https://certbot.eff.org/ to check for other alternatives.



    b) /opt/eff.org/certbot so belassen wie es vor der Umstellung auf debian9 war

    ###############################

    /opt/pdadmin/etc/ssl-validation/ -d www.domain.de -d domain.de

    ###############################


    Your system is not supported by certbot-auto anymore.

    Certbot will no longer receive updates.

    Please visit https://certbot.eff.org/ to check for other alternatives.

    Traceback (most recent call last):

    File "/opt/eff.org/certbot/venv/bin/letsencrypt", line 7, in <module>

    from certbot.main import main

    File "/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/certbot/main.py", line 2, in <module>

    from certbot._internal import main as internal_main

    File "/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/certbot/_internal/main.py", line 6, in <module>

    import logging.handlers

    File "/usr/lib/python2.7/logging/__init__.py", line 26, in <module>

    import sys, os, time, cStringIO, traceback, warnings, weakref, collections

    File "/usr/lib/python2.7/weakref.py", line 14, in <module>

    from _weakref import (

    ImportError: cannot import name _remove_dead_weakref


    Mit dem neuen certbot über snap lasst sich der certbot renew ja durchaus irgendwie machen, auch wenn ich nicht abschätzen kann wie gut das mt pdadmin zusammen geht.
    Aber neue Domain bekommen keine Zertifikate valididert weil der Start der /opt/pdadmin/bin/letsencrypt --all immer auf die pdadmin-certbot-auto geht und dann immer der Fehler kommt. wie man das umgehen kann bin ich überfragt.

  • Danke für die Idee, aber das funktioniert komischerweise nicht:

    Code
    root@server05 /opt/pdadmin/bin # mv certbot-auto certbot-auto_0
    root@server05 /opt/pdadmin/bin # ln -sf /snap/bin/certbot /opt/pdadmin/bin/certbot-auto
    root@server05 /opt/pdadmin/bin # /opt/pdadmin/bin/certbot-auto renew
    error: unknown command "renew", see 'snap help'.
    root@server05 /opt/pdadmin/bin #

    Wenn man aber direkt /usr/bin/certbot renew aufruft kommt


    Mir scheint der certbot, der über /usr/bin auf /snap/bin verlinkt ist identisch zu sein.

    Nur der /opt/pdadmin/bin/letsencrypt kann man nicht auf den neuen certbot umstellen.


    Auf allen unseren Systemen funktionieren die Zertifikate nur noch wenn dort bereits das /opf/eff... Verzeichnis korrekt geniert ist. Neu wird das gar nicht mehr angelegt.


    Ehrlich gesagt überrascht mich das vorgehen von letsencrypt schon auch, hier einfach funktionalitäten abzuschalten.

  • Also soweit ich das verstehe wird lediglich die Installation über snapd empfohlen. Nicht aber dass dies zukünftig der einzige Weg ist

    Your system is not supported by certbot-auto anymore.

    Certbot will no longer receive updates.

    Please visit https://certbot.eff.org/ to check for other alternatives.

    Die Meldung kann vielleicht daher kommen, dass das System vorher Debian 9 war und dies ja EOL ist. Dementsprechend keine Updates mehr erhält.


    Der Aufruf von

    Bash
    /snap/bin/certbot renew

    klappt aber? Mir kommt es etwas komisch vor. Die Fehlermeldung

    Bash
    root@server05 /opt/pdadmin/bin # /opt/pdadmin/bin/certbot-auto renew 
    error: unknown command "renew", see 'snap help'.

    scheint ja in Zusammenhang mit snapd zu sein. Letztlich ist /opt/pdadmin/bin/certbot-auto genau ein Symlink wie es laut Anleitung nach snapd /usr/bin/certbot ist.

  • So wie es mir scheint ist Debian komplett depricated bei certbot-auto.
    Denn auf der Debian10.7 maschine gelingt mir eine saubere Ausführung mit dem certbot-auto nicht mehr.


    Folgender Workaround hat nun erstmal geholfen das der certbot-auto, so wie er im PD-Admin verbaut ist wieder geht:


    - certbot-auto 1.9.0 heruntergeladen

    - eff.org in /opt umbenannt

    und dann den certbot-auto190 ausgeführt mit --no-self-upgrade
    /opt/pdadmin/bin/certbot-auto_190 --no-self-upgrade


    Beim zweiten oder dritten mal hat er dann das eff.org Verzeichnis neu generiert.


    Danach klappt auch der 1.10.1 certbot erstmal, aber immer mit der Meldung das Debian 10.7 von certbot-auto nicht mehr unterstützt wird.


    root@server05 /opt/pdadmin/bin # ./certbot-auto renew

    Your system is not supported by certbot-auto anymore.

    Certbot will no longer receive updates.

    Please visit https://certbot.eff.org/ to check for other alternatives.

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


    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    Processing /etc/letsencrypt/renewal/test.domain.de.conf

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    Cert not yet due for renewal



    Das der Symlink aus /opt/pdadmin/bin/certbot-auto -> /usr/bin/certbot der gleiche ist stimmt.

    Aber er heißt halt certbot-auto und nicht certbot. Vielleicht macht snap anhand von dem Link das fest, den auch der Link /usr/bin/certbot auf /snap/bin/certbot führt zu einem weiteren Link


    root@server05 /snap/bin # ls -lisa

    17301516 0 lrwxrwxrwx 1 root root 13 Dez 11 10:39 certbot -> /usr/bin/snap

  • Also, der certbot-auto ist wohl für ALLE Debian-System und Ubuntu nicht länger unterstützt:


    Quelle: https://community.letsencrypt.…an-based-systems/139702/2

    What happened?

    In our 1.10.0 release on Tuesday, we deprecated certbot-auto, one of the ways to install Certbot, on Debian based systems including Ubuntu. In our 1.11.0 release, we plan to deprecate the script on every OS. It is only certbot-auto that we deprecated. Our other distribution methods or Certbot more generally was not deprecated on Debian.

    The behavior you can expect from certbot-auto on a deprecated OS is that if you had run the script before and had an existing Certbot installation from it, that installation will continue to work, however, you will no longer receive updates and a message will be printed every time the script is run explaining this. If you do not have an existing certbot-auto installation, the script will refuse to install Certbot and say that you need to use a different installation method.

    Why did it happen?

    If certbot-auto had been working well for you, I'm glad to hear it, but it became infeasible for our small team to maintain. It's a custom, self-updating shell script that tries to support all popular UNIX OSes. Keeping this script working in all the different environments out there and the changes being made to them was just too much work.

    The biggest factor that drove this deprecation now was Python 2 reaching its end-of-life this year. When this script was initially written 5 years ago, it was written to use Python 2 on most systems. While Python 2 is still receiving security support by various distros, the Python ecosystem has moved on and many of our dependencies are dropping support for Python 2. In order to continue to provide updates to our users, we have to get them on Python 3. We tried to migrate certbot-auto users to Python 3 in the past, but it's a ton of work and extremely error prone. Instead of trying to do this work and hope we didn't break anything (like we did last time 1), we decided to sunset the script in favor of other distribution methods.

    How do I install Certbot now?

    The way we recommend most users install Certbot is through snaps. You can find instructions for doing this at https://certbot.eff.org/instructions 13.

    Some of the benefits of installing Certbot this way are:

    • Certbot automatically stays up-to-date, giving you access to the latest features including updates to the TLS configuration Certbot uses when installing certificates with Apache and Nginx.
    • Automatic renewal comes preconfigured, so there is no need to manually set up a cron job or systemd timer.
    • All of our DNS plugins are available and it is possible for 3rd parties to write their own Certbot snap plugins 1 as well.

    If you don't want to install Certbot through snaps, other installation methods are documented at https://certbot.eff.org/docs/install.html 32. (certbot-auto is still documented there but that will be removed soon.)

    Finally, while I do not recommend this, if certbot-auto was working for you, it's possible to continue to use the last version of the script that worked on Debian based OSes. Taking this approach means you will not receive any bug fixes, security fixes, or compatibility fixes with Let's Encrypt's servers. If that does not deter you, you can find the last version of the script that worked on Debian at https://raw.githubusercontent.com/certbot/certbot/v1.9.0/certbot-auto 8. If you use this, make sure you are fully comfortable with all of these downsides and include --no-self-upgrade on the command line to prevent the script from updating itself to a deprecated version.

  • Also die Funktionsfähigkeit des Certbot mit symlink auf die Snap-Installation hängt direkt von der Namensgebung des symlinks ab.


    Im Verzeichnis /op/pdadmin/bin funktioniert der certbot-Link, aber der certbot-auto Link nicht.


    • Offizieller Beitrag

    Ich breche hier mal wieder eine Lanze für "dehydrated" als letsencrypt Client: https://dehydrated.io/


    Ich habe das seit fünf Jahren im Einsatz um meine Zertifikate zu erstellen und zu erneuern (das hab ich mir entsprechend verskriptet). Darauf gekommen bin ich, weil pd-admin damals noch keine Lösung für letsencrypt an Board hatte und mir certbot irgendwie so umständlich rüber kam und mich, wenn ich mich richtg erinnere, ständig angemeckert hat wegen python Geschichten wo ich keine Lust hatte diese aufzulösen. Ich schätze daran dass es eine reine Bash Implementierung ist, ohne nennenswerte Abhängigkeiten.


    Wäre vielleicht ein adäquater und leicht zu adaptierender Ersatz für certbot-auto um es mit pd-admin mit auszuliefern.