NginxProxyManager / nginx-proxy-manager

Docker container for managing Nginx proxy hosts with a simple, powerful interface
https://nginxproxymanager.com
MIT License
23.45k stars 2.72k forks source link

Certbot plugin dependency not installed #1730

Open deniszitu opened 2 years ago

deniszitu commented 2 years ago

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
chaptergy commented 2 years ago

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.

3xpl0ith4ck3r commented 2 years ago

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

thecode commented 2 years ago

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

github-actions[bot] commented 9 months ago

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

kanjieater commented 5 months ago

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