inventage / certbot-dns-cloudns

ClouDNS DNS Authenticator plugin for Certbot
https://pypi.org/project/certbot-dns-cloudns/
The Unlicense
19 stars 6 forks source link

Issues with newest version of certbot #2

Closed JerryLava closed 10 months ago

JerryLava commented 1 year ago

Hey, sorry for the crappy bug report but something broke with this plugin and the newest version of certbot. I get the following error running a typical command:

certbot certonly \
>   --authenticator dns-cloudns \
>   --dns-cloudns-credentials ~/.secrets/certbot/cloudns.ini \
>   -d example.com
Traceback (most recent call last):
  File "/opt/certbot/bin/certbot", line 5, in <module>
    from certbot.main import main
  File "/opt/certbot/lib/python3.9/site-packages/certbot/main.py", line 6, in <module>
    from certbot._internal import main as internal_main
  File "/opt/certbot/lib/python3.9/site-packages/certbot/_internal/main.py", line 28, in <module>
    from certbot import crypto_util
  File "/opt/certbot/lib/python3.9/site-packages/certbot/crypto_util.py", line 42, in <module>
    from certbot import interfaces
  File "/opt/certbot/lib/python3.9/site-packages/certbot/interfaces.py", line 21, in <module>
    from acme.client import ClientBase
ImportError: cannot import name 'ClientBase' from 'acme.client' (/opt/certbot/lib/python3.9/site-packages/acme/client.py)
gregfly commented 1 year ago

Hi, @JerryLava

Here is my workaround for the same error.

1 Install certbot and certbot-dns-cloudns plugin separately

pip install certbot==2.1.0

v. 2.0.0 is not working with certbot-dns-cloudns because zope.interface required

pip install --no-deps certbot-dns-cloudns pip install zope.interface pip install cloudns-api pip install dnspython

2 Next step

nano ~/certbot-env/lib/python3.7/site-packages/certbot_dns_cloudns-0.4.0.dist-info/METADATA

Find and edit the line Requires-Dist: certbot (>=1.12.0 ,<2.0.0 )

Make it like this Requires-Dist: certbot (>=1.12.0)

Save.

3 Done!

certbot certonly \ --authenticator dns-cloudns \ --dns-cloudns-credentials ~/.secrets/certbot/cloudns.ini \ -d example.com

uintdev commented 1 year ago

The aforementioned solution essentially works, so much appreciated. It's worth noting that zope.interface is now at 6.0, which no longer fits the requirements. So, an edit needs to be made to that 'requirement' too so that it's Requires-Dist: zope.interface (>=5.1.0).

Unfortunately, the snap method out-right fails when it comes to this DNS plugin, so it looks like going the PIP route is the easiest way to go. Not that I wanted to use snap anyway.

ghost-of-cerberus commented 1 year ago

@dalbothek curious as to the status on this. I've since used the certbot plugin in a few separate instances and simply updating METADATA to Requires-Dist: certbot (>=1.12.0 ) and Requires-Dist: zope.interface (>=5.1.0) has worked in every instance (I've set Requires-Dist: certbot (>=2.0.0) and Requires-Dist: zope.interface (>=6.0.0) in my last two instances and have not seen or experienced any errors either). Is there additional review or rework occurring around this? Would a PR for these changes help expedite the plugin to be updated and pushed to pypi.org?

dalbothek commented 1 year ago

This should now be resolved in the latest version 0.5.1. Please let me know if you're still facing issues.

dalbothek commented 10 months ago

This issue should have been fixed a few months ago in version 0.5.1, so I'm closing it now. With version 0.6.0 the plugin is again compatible with the latest certbot, so there should be no need for manual alterations.