[GH-ISSUE #1730] Certbot plugin dependency not installed #1285

Open
opened 2026-02-26 06:36:34 +03:00 by kerem · 6 comments
Owner

Originally created by @deniszitu on GitHub (Jan 5, 2022).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/1730

Log

DEBUG:certbot._internal.log:Exiting abnormally:
Traceback (most recent call last):
  File "/opt/certbot/bin/certbot", line 8, in <module>
    sys.exit(main())
  File "/opt/certbot/lib/python3.7/site-packages/certbot/main.py", line 19, in main
    return internal_main.main(cli_args)
  File "/opt/certbot/lib/python3.7/site-packages/certbot/_internal/main.py", line 1593, in main
    plugins = plugins_disco.PluginsRegistry.find_all()
  File "/opt/certbot/lib/python3.7/site-packages/certbot/_internal/plugins/disco.py", line 241, in find_all
    plugin_ep = cls._load_entry_point(entry_point, plugins, with_prefix=False)
  File "/opt/certbot/lib/python3.7/site-packages/certbot/_internal/plugins/disco.py", line 261, in _load_entry_point
    plugin_ep = PluginEntryPoint(entry_point, with_prefix)
  File "/opt/certbot/lib/python3.7/site-packages/certbot/_internal/plugins/disco.py", line 60, in __init__
    self.plugin_cls: Type[interfaces.Plugin] = entry_point.load()
  File "/opt/certbot/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2411, in load
    return self.resolve()
  File "/opt/certbot/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2417, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/opt/certbot/lib/python3.7/site-packages/certbot_dns_duckdns/cert/client.py", line 4, in <module>
    from dns import resolver
ModuleNotFoundError: No module named 'dns'
2022-01-04 21:49:41,777:ERROR:certbot._internal.log:An unexpected error occurred:
2022-01-04 21:49:41,778:ERROR:certbot._internal.log:ModuleNotFoundError: No module named 'dns'

Nginx Proxy Manager Version
2.9.14

To Reproduce
Add Let's Encrypt Certificate with wildcard

Workaround:
Access NPM container and install dnspython package:

docker exec -it [container] bash
pip install dnspython
Originally created by @deniszitu on GitHub (Jan 5, 2022). Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/1730 **Log** ``` DEBUG:certbot._internal.log:Exiting abnormally: Traceback (most recent call last): File "/opt/certbot/bin/certbot", line 8, in <module> sys.exit(main()) File "/opt/certbot/lib/python3.7/site-packages/certbot/main.py", line 19, in main return internal_main.main(cli_args) File "/opt/certbot/lib/python3.7/site-packages/certbot/_internal/main.py", line 1593, in main plugins = plugins_disco.PluginsRegistry.find_all() File "/opt/certbot/lib/python3.7/site-packages/certbot/_internal/plugins/disco.py", line 241, in find_all plugin_ep = cls._load_entry_point(entry_point, plugins, with_prefix=False) File "/opt/certbot/lib/python3.7/site-packages/certbot/_internal/plugins/disco.py", line 261, in _load_entry_point plugin_ep = PluginEntryPoint(entry_point, with_prefix) File "/opt/certbot/lib/python3.7/site-packages/certbot/_internal/plugins/disco.py", line 60, in __init__ self.plugin_cls: Type[interfaces.Plugin] = entry_point.load() File "/opt/certbot/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2411, in load return self.resolve() File "/opt/certbot/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2417, in resolve module = __import__(self.module_name, fromlist=['__name__'], level=0) File "/opt/certbot/lib/python3.7/site-packages/certbot_dns_duckdns/cert/client.py", line 4, in <module> from dns import resolver ModuleNotFoundError: No module named 'dns' 2022-01-04 21:49:41,777:ERROR:certbot._internal.log:An unexpected error occurred: 2022-01-04 21:49:41,778:ERROR:certbot._internal.log:ModuleNotFoundError: No module named 'dns' ``` **Nginx Proxy Manager Version** 2.9.14 **To Reproduce** Add Let's Encrypt Certificate with wildcard **Workaround:** Access NPM container and install dnspython package: ``` docker exec -it [container] bash pip install dnspython ```
Author
Owner

@chaptergy commented on GitHub (Jan 5, 2022):

I've made this more generic and grouped it with https://github.com/jc21/nginx-proxy-manager/issues/1535.
It seems sometimes certbot plugins just do not install some dependencies? In this case it was the duckdns plugin, which definitely has dnspython as a requirement.
Furthermore this issue seems to only occur very rarely, as I only know about the one report (by two people) before.

<!-- gh-comment-id:1005599236 --> @chaptergy commented on GitHub (Jan 5, 2022): I've made this more generic and grouped it with https://github.com/jc21/nginx-proxy-manager/issues/1535. It seems sometimes certbot plugins just do not install some dependencies? In this case it was the [duckdns plugin](https://github.com/infinityofspace/certbot_dns_duckdns), which definitely [has `dnspython` as a requirement](https://github.com/infinityofspace/certbot_dns_duckdns/blob/master/requirements.txt#L5). Furthermore this issue seems to only occur very rarely, as I only know about the one report (by two people) before.
Author
Owner

@3xpl0ith4ck3r commented on GitHub (Jan 8, 2022):

I had the same issue.
After manually pip3 install dnspython also an wildcard certificate from DuckDNS is working.
So please fix this issue.

<!-- gh-comment-id:1007858083 --> @3xpl0ith4ck3r commented on GitHub (Jan 8, 2022): I had the same issue. After manually `pip3 install dnspython` also an wildcard certificate from DuckDNS is working. So please fix this issue.
Author
Owner

@thecode commented on GitHub (Jan 10, 2022):

I have the same error:

[1/10/2022] [8:44:43 PM] [SSL ] › ✖ error Error: Command failed: certbot renew --non-interactive --quiet --config "/etc/letsencrypt.ini" --preferred-challenges "dns,http" --disable-hook-validation

An unexpected error occurred:

ModuleNotFoundError: No module named 'dns'

EDIT:
pip3 show dnspython showed that the package is missing. I have tried to redeploy the container which did not help.
pip3 install dnspython fixes it as mentioned above

<!-- gh-comment-id:1009240217 --> @thecode commented on GitHub (Jan 10, 2022): I have the same error: ``` [1/10/2022] [8:44:43 PM] [SSL ] › ✖ error Error: Command failed: certbot renew --non-interactive --quiet --config "/etc/letsencrypt.ini" --preferred-challenges "dns,http" --disable-hook-validation An unexpected error occurred: ModuleNotFoundError: No module named 'dns' ``` EDIT: `pip3 show dnspython` showed that the package is missing. I have tried to redeploy the container which did not help. `pip3 install dnspython` fixes it as mentioned above
Author
Owner

@github-actions[bot] commented on GitHub (Feb 28, 2024):

Issue is now considered stale. If you want to keep it open, please comment 👍

<!-- gh-comment-id:1968040261 --> @github-actions[bot] commented on GitHub (Feb 28, 2024): Issue is now considered stale. If you want to keep it open, please comment :+1:
Author
Owner

@kanjieater commented on GitHub (Jun 30, 2024):

Still running into this on boot but only sometimes... please unstale

<!-- gh-comment-id:2198607053 --> @kanjieater commented on GitHub (Jun 30, 2024): Still running into this on boot but only sometimes... please unstale
Author
Owner

@github-actions[bot] commented on GitHub (Apr 12, 2025):

Issue is now considered stale. If you want to keep it open, please comment 👍

<!-- gh-comment-id:2798385607 --> @github-actions[bot] commented on GitHub (Apr 12, 2025): Issue is now considered stale. If you want to keep it open, please comment :+1:
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/nginx-proxy-manager-NginxProxyManager#1285
No description provided.