The nginx plugin is not working;

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. https://crt.sh/?q=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:

i-cooltea.top

I ran this command:

certbot certonly --nginx

It produced this output:

Saving debug log to /var/log/letsencrypt/letsencrypt.log
The nginx plugin is not working; there may be problems with your existing configuration.
The error was: NoInstallationError("Could not find a usable 'nginx' binary. Ensure nginx exists, the binary is executable, and your PATH is set correctly.")
Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /var/log/letsencrypt/letsencrypt.log or re-run Certbot with -v for more details.

/var/log/letsencrypt/letsencrypt.log
file content is as follows

[root@VM_0_13_centos ~]# sudo cat /var/log/letsencrypt/letsencrypt.log
2024-07-28 11:55:03,823:DEBUG:urllib3.connectionpool:http://localhost:None "GET /v2/connections?snap=certbot&interface=content HTTP/1.1" 200 97
2024-07-28 11:55:04,048:DEBUG:certbot._internal.main:certbot version: 2.11.0
2024-07-28 11:55:04,048:DEBUG:certbot._internal.main:Location of certbot entry point: /snap/certbot/3834/bin/certbot
2024-07-28 11:55:04,048:DEBUG:certbot._internal.main:Arguments: ['--nginx', '-v', '--preconfigured-renewal']
2024-07-28 11:55:04,049:DEBUG:certbot._internal.main:Discovered plugins: PluginsRegistry(PluginEntryPoint#apache,PluginEntryPoint#manual,PluginEntryPoint#nginx,PluginEntryPoint#null,PluginEntryPoint#standalone,PluginEntryPoint#webroot)
2024-07-28 11:55:04,061:DEBUG:certbot._internal.log:Root logging level set at 20
2024-07-28 11:55:04,061:DEBUG:certbot._internal.plugins.selection:Requested authenticator nginx and installer nginx
2024-07-28 11:55:04,063:DEBUG:certbot._internal.plugins.disco:No installation (PluginEntryPoint#nginx): Could not find a usable 'nginx' binary. Ensure nginx exists, the binary is executable, and your PATH is set correctly.
Traceback (most recent call last):
  File "/var/lib/snapd/snap/certbot/3834/lib/python3.8/site-packages/certbot/_internal/plugins/disco.py", line 112, in prepare
    self._initialized.prepare()
  File "/var/lib/snapd/snap/certbot/3834/lib/python3.8/site-packages/certbot_nginx/_internal/configurator.py", line 204, in prepare
    raise errors.NoInstallationError(
certbot.errors.NoInstallationError: Could not find a usable 'nginx' binary. Ensure nginx exists, the binary is executable, and your PATH is set correctly.
2024-07-28 11:55:04,063:DEBUG:certbot._internal.plugins.selection:No candidate plugin
2024-07-28 11:55:04,063:DEBUG:certbot._internal.plugins.selection:No candidate plugin
2024-07-28 11:55:04,064:DEBUG:certbot._internal.log:Exiting abnormally:
Traceback (most recent call last):
  File "/snap/certbot/3834/bin/certbot", line 8, in <module>
    sys.exit(main())
  File "/var/lib/snapd/snap/certbot/3834/lib/python3.8/site-packages/certbot/main.py", line 19, in main
    return internal_main.main(cli_args)
  File "/var/lib/snapd/snap/certbot/3834/lib/python3.8/site-packages/certbot/_internal/main.py", line 1894, in main
    return config.func(config, plugins)
  File "/var/lib/snapd/snap/certbot/3834/lib/python3.8/site-packages/certbot/_internal/main.py", line 1581, in certonly
    installer, auth = plug_sel.choose_configurator_plugins(config, plugins, "certonly")
  File "/var/lib/snapd/snap/certbot/3834/lib/python3.8/site-packages/certbot/_internal/plugins/selection.py", line 256, in choose_configurator_plugins
    diagnose_configurator_problem("authenticator", req_auth, plugins)
  File "/var/lib/snapd/snap/certbot/3834/lib/python3.8/site-packages/certbot/_internal/plugins/selection.py", line 374, in diagnose_configurator_problem
    raise errors.PluginSelectionError(msg)
certbot.errors.PluginSelectionError: The nginx plugin is not working; there may be problems with your existing configuration.
The error was: NoInstallationError("Could not find a usable 'nginx' binary. Ensure nginx exists, the binary is executable, and your PATH is set correctly.")
2024-07-28 11:55:04,064:ERROR:certbot._internal.log:The nginx plugin is not working; there may be problems with your existing configuration.
The error was: NoInstallationError("Could not find a usable 'nginx' binary. Ensure nginx exists, the binary is executable, and your PATH is set correctly.")

My web server is (include version):

nginx version: nginx/1.14.1

The operating system my web server runs on is (include version):

CentOS Linux release 7.5.1804 (Core)

My hosting provider, if applicable, is:

DNSPod,Inc. (tencent cloud)

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):
no

The version of my client is

(e.g. output of certbot --version or certbot-auto --version if you're using Certbot):
certbot 2.11.0

What's the output of the following commands?

whereis nginx
echo ${PATH}
2 Likes

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