No module named 'dns'

Please fill out the fields below so we can help you better. Note: you must provide your domain name to get help. Domain names for issued certificates are all made public in Certificate Transparency logs (e.g. crt.sh | example.com), so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.

My domain is: duckdns.org

I ran this command:

mkdir -p /etc/letsencrypt/credentials 2> /dev/null; echo 'dns_duckdns_token=
' > '/etc/letsencrypt/credentials/credentials-1' && chmod 600 '/etc/letsencrypt/credentials/credentials-1' && pip install certbot-dns-duckdns~=0.6 && certbot certonly --config "/etc/letsencrypt.ini" --cert-name "npm-1" --agree-tos --email "" --domains "*.larsen-home.duckdns.org" --authenticator dns-duckdns --dns-duckdns-credentials "/etc/letsencrypt/credentials/credentials-1"

It produced this output:

[1/9/2022] [6:26:09 PM] [Express ] › :warning: warning Command failed: certbot certonly --config "/etc/letsencrypt.ini" --cert-name "npm-1" --agree-tos --email "" --domains "*.larsen-home.duckdns.org" --authenticator dns-duckdns --dns-duckdns-credentials "/etc/letsencrypt/credentials/credentials-1"

My web server is (include version): nginx-proxy-manager

The operating system my web server runs on is (include version): Ubuntu 20.04.3 LTS (GNU/Linux 5.4.0-1048-raspi aarch64)

My hosting provider, if applicable, is:

I can login to a root shell on my machine (yes or no, or I don't know): Yes

I'm using a control panel to manage my site (no, or provide the name and version of the control panel): Nginx proxy manager

The version of my client is (e.g. output of certbot --version or certbot-auto --version if you're using Certbot): certbot-1.22.0

I'm used this image to run Nginx proxy manager successfully including SSL certificates via letsencrypt. After activating a VPN on the same machine I began to have resolution errors, even though my DDNs had updated to the new public IP.

I'm no longer using the VPN and my public IP is the same as it was previously but I began getting certificate errors that I hadn't seen before.

I wasn't able to remove the old SSL and create new ones and opted to remove and completely reinstall the docker container.

Currently, fresh installs of Nginx proxy manger all run normally except when requesting a new SSL certificate. I receive an error that there is no module named 'dns'. I've bashed into the container and pop uninstalled and reinstalled certbot and it returns the same error when I run certbot -v.

Unsure what the issue is here, as prior to my public IP chanign everything worked perfectly.

2 Likes

I think this is an issue with a recent release of the duckdns plugin. I've opened an issue about it: Undeclared dependency on dnspython · Issue #22 · infinityofspace/certbot_dns_duckdns · GitHub

You could try downgrade to ==0.6 or manually install the missing dnspython dependency for the time being.

5 Likes

Perfect,

Thanks for the reply and adding the issue. Simply pip installing dnspython within the container resolved the issue as you said.

Cheers!

4 Likes

Is there any ways to downgrade dnspython dependency with docker Nginx Proxy Manager container?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.