jlesage / docker-nginx-proxy-manager

Docker container for Nginx Proxy Manager
MIT License
770 stars 173 forks source link

pkg_resources.DistributionNotFound #190

Open richardklint opened 3 years ago

richardklint commented 3 years ago

Getting the following error when attempting to create an SSL cert through SSL Certificates > Add SSL Certificate:

Error: Command failed: /opt/certbot/bin/certbot certonly --non-interactive --config "/etc/letsencrypt.ini" --cert-name "npm-21" --agree-tos --email "myemail@gmail.com" --preferred-challenges "dns,http" --domains "mydomain.com" 
An unexpected error occurred:
pkg_resources.DistributionNotFound: The 'future<1,>=0' distribution was not found and is required by dns-lexicon
Please see the logfile '/tmp/tmpjxoe2lym/log' for more details.

    at ChildProcess.exithandler (child_process.js:308:12)
    at ChildProcess.emit (events.js:314:20)
    at maybeClose (internal/child_process.js:1022:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5)

with the logfile being:

2021-06-19 21:00:53,540:DEBUG:certbot._internal.log:Exiting abnormally:
Traceback (most recent call last):
  File "/opt/certbot/bin/certbot", line 8, in <module>
    sys.exit(main())
  File "/usr/lib/python3.8/site-packages/certbot/main.py", line 15, in main
    return internal_main.main(cli_args)
  File "/usr/lib/python3.8/site-packages/certbot/_internal/main.py", line 1403, in main
    plugins = plugins_disco.PluginsRegistry.find_all()
  File "/usr/lib/python3.8/site-packages/certbot/_internal/plugins/disco.py", line 237, in find_all
    plugin_ep = cls._load_entry_point(entry_point, plugins, with_prefix=False)
  File "/usr/lib/python3.8/site-packages/certbot/_internal/plugins/disco.py", line 255, in _load_entry_point
    plugin_ep = PluginEntryPoint(entry_point, with_prefix)
  File "/usr/lib/python3.8/site-packages/certbot/_internal/plugins/disco.py", line 51, in __init__
    self.plugin_cls: interfaces.IPluginFactory = entry_point.load()
  File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2449, in load
    self.require(*args, **kwargs)
  File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2472, in require
    items = working_set.resolve(reqs, env, installer, extras=self.extras)
  File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 772, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'future<1,>=0' distribution was not found and is required by dns-lexicon
2021-06-19 21:00:53,540:ERROR:certbot._internal.log:An unexpected error occurred:
2021-06-19 21:00:53,540:ERROR:certbot._internal.log:pkg_resources.DistributionNotFound: The 'future<1,>=0' distribution was not found and is required by dns-lexicon

I have verified that my dns has the correct A record and that the ports are forwarded correctly.

I found this issue and tried exec'ing into the container to install that package but I still receive the error.

Any help would be appreciated, thanks :)

jlesage commented 3 years ago

Which DNS provider are you trying to use ?

richardklint commented 3 years ago

Right now I'm using 1.1.1.1 and 1.0.0.1, should I try Google's?

jlesage commented 3 years ago

Sorry I was talking about the certificate generation: are you enabling Use a DNS challenge ? If yes, are which one are you using ?

richardklint commented 3 years ago

No, I'm not using one.

jlesage commented 3 years ago

Are you using the latest version of the image ? There was an issue with certbot that has been fixed.

richardklint commented 3 years ago

Yes, I'm on the latest, v1.17.0

richardklint commented 3 years ago

@jlesage Fixed it by exec'ing into the container and running pip install future and that fixed it. Would recommend updating the Dockerfile to include that.

Dianoga commented 2 years ago

pip install future fixes the issue for me as well