hassio-addons/addon-nginx-proxy-manager

certbot / godaddy auth issue after update - cannot import name 'ClientBase' from 'acme.client'

seancmalloy opened this issue · 15 comments

Problem/Motivation

NGINX proxy manager fails to import name 'ClientBase' from 'acme.client'

(Why the issue was filed)

Expected behavior

renew certificate with godaddy credentials

(What you expected to happen)

Actual behavior

fails at cannot import name 'ClientBase' from 'acme.client'

(What actually happened)

Steps to reproduce

verified dns records, verified port open, recreated godaddy api key - uninstalled addon and deleted data, reinstalled addon

(How can someone else make/see it happen)

Logs

[1/13/2024] [3:19:16 PM] [Nginx ] › ℹ info Reloading Nginx
[1/13/2024] [3:19:16 PM] [SSL ] › ℹ info Requesting Let'sEncrypt certificates via GoDaddy for Cert #1: my.domain.com
[1/13/2024] [3:19:16 PM] [SSL ] › ℹ info Command: mkdir -p /etc/letsencrypt/credentials 2> /dev/null; echo 'dns_godaddy_secret = mysecret
dns_godaddy_key = mykey' > '/etc/letsencrypt/credentials/credentials-1' && chmod 600 '/etc/letsencrypt/credentials/credentials-1' && pip install certbot-dns-godaddy~=0.2.0 && certbot certonly --config "/etc/letsencrypt.ini" --work-dir "/tmp/letsencrypt-lib" --logs-dir "/tmp/letsencrypt-log" --cert-name "npm-1" --agree-tos --email "my@email.com" --domains "my.domain.com" --authenticator dns-godaddy --dns-godaddy-credentials "/etc/letsencrypt/credentials/credentials-1"
[1/13/2024] [3:20:00 PM] [Nginx ] › ℹ info Reloading Nginx
[1/13/2024] [3:20:00 PM] [Express ] › ⚠ warning Command failed: certbot certonly --config "/etc/letsencrypt.ini" --work-dir "/tmp/letsencrypt-lib" --logs-dir "/tmp/letsencrypt-log" --cert-name "npm-1" --agree-tos --email "my@email.com" --domains "my.domain.com" --authenticator dns-godaddy --dns-godaddy-credentials "/etc/letsencrypt/credentials/credentials-1"
Traceback (most recent call last):
File "/usr/bin/certbot", line 5, in
from certbot.main import main
File "/usr/lib/python3.11/site-packages/certbot/main.py", line 6, in
from certbot._internal import main as internal_main
File "/usr/lib/python3.11/site-packages/certbot/_internal/main.py", line 28, in
from certbot import crypto_util
File "/usr/lib/python3.11/site-packages/certbot/crypto_util.py", line 42, in
from certbot import interfaces
File "/usr/lib/python3.11/site-packages/certbot/interfaces.py", line 21, in
from acme.client import ClientBase
ImportError: cannot import name 'ClientBase' from 'acme.client' (/usr/lib/python3.11/site-packages/acme/client.py)

Getting the same issue. In addition, when trying to test the connection to check if the addon has network connectivity, this error occurs. Not sure if related. I can create another issue if it is not. Error:

-----------------------------------------------------------
 Add-on: Nginx Proxy Manager
 Manage Nginx proxy hosts with a simple, powerful interface
-----------------------------------------------------------
 Add-on version: 1.0.1
 You are running the latest version of this add-on.
 System: Home Assistant OS 11.4  (aarch64 / raspberrypi4-64)
 Home Assistant Core: 2024.1.3
 Home Assistant Supervisor: 2023.12.0
-----------------------------------------------------------

... SNIPPING OUT NORMAL STARTUP ...

[1/14/2024] [10:33:28 AM] [SSL      ] › ℹ  info      Testing http challenge for <DOMAIN>
Uncaught SyntaxError: Unexpected end of JSON input

FROM
2024/01/14 10:33:29 [error] 227#227: *14 upstream prematurely closed connection while reading response header from upstream, client: <MyClientIP>, server: nginxproxymanager, request: "GET /api/nginx/certificates/test-http?domains=%5B%22<DOMAIN>%22%5D HTTP/1.1", upstream: "http://127.0.0.1:3000/nginx/certificates/test-http?domains=%5B%22<DOMAIN>%22%5D", host: "<HomeAssistantIP>:81", referrer: "http://<HomeAssistantIP>:81/nginx/certificates"
JSON.parse (<anonymous>)IncomingMessage.<anonymous> (/opt/nginx-proxy-manager/internal/certificate.js:1178:31)IncomingMessage.emit (node:events:529:35)endReadableNT (node:internal/streams/readable:1400:12)process.processTicksAndRejections (node:internal/process/task_queues:82:21)[10:33:29] INFO: Service Nginx Proxy Manager exited with code 256 (by signal 5)

@pwnpanda About the network connectivity issue: Let's not mix up multiple issues in a single report.

Getting the same issue.

Also using godaddy? Or are you using a different provider?

@pwnpanda About the network connectivity issue: Let's not mix up multiple issues in a single report.

Getting the same issue.

Also using godaddy? Or are you using a different provider?

Yes, also using godaddy!

I completely understand, will make a new issue so it can be tracked :)

Same issue for me, seems like it relates to the discussion in NginxProxyManager/nginx-proxy-manager#3165

I have updated from 0.12.3 to 1.0.1 and my domain is hosted by GoDaddy.
I am getting an "Internal error" message when adding the domain to the configuration and forcing a certificate renewal.

Downgrading to 0.12.3 makes everything work again.

I updated yeterday from 0.12.3 to 1.0.1 and in the initial setup process I saw the problem descirbed here with godaddy DNS challenge.

Following this from #507 - my post

I am also experiencing this issue

yeah the linked issue seems related. Hopefully they gonna fix it

I have this issue on v2.10.4 for GoDaddy.
Upgraded to v2.11.1 and had different error message, sadly I didn't note it down since I was in a hurry.
Reverted to v2.10.4 and ran these into the container:

cd /opt/certbot
/opt/certbot/bin/pip install acme==1.32.0

Renewal worked afterwards.
I'll se you guys again in 3 months with errors from the latest version, if the issue is not resolved :)

Using 2.11.1 on my Docker host all my certificates from GoDaddy generated successfully, I tried renewing one of them and it did as well. Will wait and see in 3 months time if all will renew automatically.

Hello, same error for me with npm rev 1.0.1 and GoDaddy

I just transferred my domains to domain.com and nginx proxy manager ha addon was able request new certs (no dns challenge like godaddy) no problem. easy-peasy

There hasn't been any activity on this issue recently, so we clean up some of the older and inactive issues.
Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thanks!