mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2026-04-25 09:25:55 +03:00
[GH-ISSUE #3103] Certbot issues with DNS challenges #2102
Labels
No labels
awaiting feedback
bug
cannot reproduce
dns provider request
duplicate
enhancement
enhancement
enhancement
good first issue
help wanted
invalid
need more info
no certbot plugin available
product-support
pull-request
question
stale
troll
upstream issue
v2
v2
v2
v3
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/nginx-proxy-manager-NginxProxyManager#2102
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @GDowning14 on GitHub (Aug 6, 2023).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/3103
Checklist
jc21/nginx-proxy-manager:latestdocker image?Yes
Yes
Yes
Describe the bug
Certbot certificate renewal when using DNS challenge for GoDaddy fails with the following error:
ImportError: cannot import name 'ClientBase' from 'acme.client'
The entire stack trace is:
Error: 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 "myemail@mydomain" --domains "my.domain" --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 "/opt/certbot/lib/python3.7/site-packages/certbot/main.py", line 6, in
from certbot._internal import main as internal_main
File "/opt/certbot/lib/python3.7/site-packages/certbot/_internal/main.py", line 28, in
from certbot import crypto_util
File "/opt/certbot/lib/python3.7/site-packages/certbot/crypto_util.py", line 42, in
from certbot import interfaces
File "/opt/certbot/lib/python3.7/site-packages/certbot/interfaces.py", line 21, in
from acme.client import ClientBase
ImportError: cannot import name 'ClientBase' from 'acme.client' (/opt/certbot/lib/python3.7/site-packages/acme/client.py)
Nginx Proxy Manager Version
2.10.4
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Expected to receive a Let's Encrypt certificate for my domain
Screenshots
Operating System
Raspberry PI OS 64-bit on RPi 4 model B 8GB. (Debian 11.7 for arm64)
Additional context
I have another instance of NPM (release 2.10.2) running on an amd64 host (Linux Mint LMDE 5 - Debian 11.2). This instance has been running for a couple of years now with no issues. I am attempting to move NPM from the LMDE host to a RPI host. I also tried pulling the 2.10.2 version that is running fine on LMDE and bring it up on the RPI but received a different error (below).
Both the issue with 2.10.4 above, and the issue with 2.10.2 below appear to be issues with Certbot. I did find posts that seem to indicate that the version of Certbot packaged with these release is somewhat dated. Are there known issues with Certbot on RPI?
** Error noted with NPM 2.10.2 on RPi 4 B 8GB - Debian 11.7 ARM64
Error: Command failed: . /opt/certbot/bin/activate && pip install --no-cache-dir --user certbot-dns-godaddy~=0.2.0 && deactivate
ERROR: Will not install to the user site because it will lack sys.path precedence to certbot in /opt/certbot/lib/python3.7/site-packages
[notice] A new release of pip is available: 23.0.1 -> 23.2.1
[notice] To update, run: pip install --upgrade pip
@tiiraluoto commented on GitHub (Aug 7, 2023):
Same problem here with ClouDNS. The output I get is the same as yours but I have this at the end of it:
`ImportError: cannot import name 'ClientBase' from 'acme.client' (/opt/certbot/lib/python3.7/site-packages/acme/client.py)
@Atredies commented on GitHub (Aug 15, 2023):
Same issue here with Route53. I get the same error.
Additionally I've seen that the CPU gets overloaded on my sever since it's spawning multiple processes for:
It's also really weird, as long as I don't touch the web interface or try to renew the certificates or anything like that, the nginx part works just fine and the applications are online and working.
@GDowning14 commented on GitHub (Aug 16, 2023):
UPDATE:
It appears this is a version/dependency issue - perhaps in the docker-nginx-full base docker image? Opening a shell into the container and running the certbot functions from the command line also reports the same errors as noted in the NPM certificates window. A 'pip list' shows the following Python packages installed:
Version 2.6.0 of the "acme" package appears to require a more recent version of the "certbot" packages.
After running
the "pip list" now shows
Running certbot from the command line now succeeds and no errors are reported.
Unfortunately, this does not seem to resolve the original problem. When again attempting to obtain a certificate via NPM, the same error is reported. Using the shell and "pip list" shows that the certbot package upgrades have been reverted and are back to the original, incompatible, versions.
Being an enterprise developer, I am new to both Python and Docker and am unable to determine how/why this downgrade is happening when using NPM to launch the certbot scripts.
@GDowning14 commented on GitHub (Aug 21, 2023):
The following resolved the issue for me. Use the docker shell, updated /app/global/certbot-dns-providers.js to set the required version of "certbot-dns-godaddy" to "~=2.6.0".
Submitted pull request #3147
@jerimiah797 commented on GitHub (Nov 19, 2023):
I resolved all this by combining several steps I saw in this (and other) threads to build the latest certbot/acme in the docker container. I'm now running with everything on 'latest', and did not have to change the godaddy version anywhere. :-)
Shell into your nginx docker container as root. I used portainer so it was very simple.
Install dependencies:
Install Rust - the apt version of rustc is too old (1.41.1, >1.56.0 is required)
Activate python venv
source /opt/certbot/bin/activateBuild and install certbot/acme
After all this, I still got an error trying to renew my godaddy domain. Evidently it now requires domain validation. If you see this problem in the logs, go to your DNS settings at the GoDaddy website and add a TXT entry called
_acme-challengeand put the key that you see in the error log as the value. Then the DNS challenge will succeed.@djmixman commented on GitHub (Nov 26, 2023):
Add another one for ClouDNS. Was trying to setup NPM for the first time and ran into this problem.
@github-actions[bot] commented on GitHub (Jun 2, 2024):
Issue is now considered stale. If you want to keep it open, please comment 👍
@github-actions[bot] commented on GitHub (Jun 6, 2025):
Issue was closed due to inactivity.
@zackfuchtel commented on GitHub (Sep 8, 2025):
My personal solution, one on a proxmox 9.x, one in NginxProxyManager:
pip install dnspython