docker-nginx-proxy-manager icon indicating copy to clipboard operation
docker-nginx-proxy-manager copied to clipboard

pkg_resources.DistributionNotFound

Open richardklint opened this issue 3 years ago • 8 comments

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 "[email protected]" --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 :)

richardklint avatar Jun 20 '21 04:06 richardklint

Which DNS provider are you trying to use ?

jlesage avatar Jun 25 '21 11:06 jlesage

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

richardklint avatar Jun 26 '21 04:06 richardklint

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

jlesage avatar Jun 28 '21 11:06 jlesage

No, I'm not using one.

richardklint avatar Jun 28 '21 11:06 richardklint

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

jlesage avatar Jul 06 '21 01:07 jlesage

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

richardklint avatar Jul 06 '21 04:07 richardklint

@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.

richardklint avatar Aug 20 '21 01:08 richardklint

pip install future fixes the issue for me as well

Dianoga avatar Oct 26 '21 13:10 Dianoga