*The nginx plugin is not working* *NoInstallationError("Could not find a usable 'nginx' binary. Ensure nginx exists, the binary is executable, and your PATH is set correctly.")* #10

Open
opened 2025-01-01 02:34:49 +01:00 by Benjamin_Loison · 7 comments
certbot --nginx --key-type ecdsa --elliptic-curve secp384r1 -d private.yt.lemnoslife.com,v.lemnoslife.com,videos.lemnoslife.com,gitea.lemnoslife.com,server0.lemnoslife.com,gitlab.lemnoslife.com,crawler.yt.lemnoslife.com,yt4.lemnoslife.com,overleaf.lemnoslife.com,etesync.lemnoslife.com
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.")

Source: https://matrix.to/#/!sNARMdEsFZERaQAJzl:matrix.org/$oqK08rnaUbU5KyFu7M0CJhRCHHckIgG_WlX3wuJOPys

When OverClock3000 root crontab runs.

``` certbot --nginx --key-type ecdsa --elliptic-curve secp384r1 -d private.yt.lemnoslife.com,v.lemnoslife.com,videos.lemnoslife.com,gitea.lemnoslife.com,server0.lemnoslife.com,gitlab.lemnoslife.com,crawler.yt.lemnoslife.com,yt4.lemnoslife.com,overleaf.lemnoslife.com,etesync.lemnoslife.com ``` <details> <summary>Output:</summary> ``` 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.") ``` </details> Source: https://matrix.to/#/!sNARMdEsFZERaQAJzl:matrix.org/$oqK08rnaUbU5KyFu7M0CJhRCHHckIgG_WlX3wuJOPys When OverClock3000 `root` `crontab` runs.
Author
Owner

Face again this issue.

Face again this issue.
Author
Owner

When run manually:

certbot --nginx --key-type ecdsa --elliptic-curve secp384r1 -d v.lemnoslife.com,videos.lemnoslife.com,gitea.lemnoslife.com,server0.lemnoslife.com,gitlab.lemnoslife.com,overleaf.lemnoslife.com,etesync.lemnoslife.com
Output:
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Certificate not yet due for renewal

You have an existing certificate that has exactly the same domains or certificate name you requested and isn't close to expiry.
(ref: /etc/letsencrypt/renewal/gitea.lemnoslife.com-0001.conf)

What would you like to do?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1: Attempt to reinstall this existing certificate
2: Renew & replace the certificate (may be subject to CA rate limits)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Select the appropriate number [1-2] then [enter] (press 'c' to cancel):
When run manually: ```bash certbot --nginx --key-type ecdsa --elliptic-curve secp384r1 -d v.lemnoslife.com,videos.lemnoslife.com,gitea.lemnoslife.com,server0.lemnoslife.com,gitlab.lemnoslife.com,overleaf.lemnoslife.com,etesync.lemnoslife.com ``` <details> <summary>Output:</summary> ``` Saving debug log to /var/log/letsencrypt/letsencrypt.log Certificate not yet due for renewal You have an existing certificate that has exactly the same domains or certificate name you requested and isn't close to expiry. (ref: /etc/letsencrypt/renewal/gitea.lemnoslife.com-0001.conf) What would you like to do? - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 1: Attempt to reinstall this existing certificate 2: Renew & replace the certificate (may be subject to CA rate limits) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Select the appropriate number [1-2] then [enter] (press 'c' to cancel): ``` </details>
Author
Owner

DuckDuckGo search "Could not find a usable 'nginx' binary".

DuckDuckGo search `"Could not find a usable 'nginx' binary"`.
Author
Owner
which nginx
/usr/sbin/nginx
```bash which nginx ``` ``` /usr/sbin/nginx ```
Author
Owner

DuckDuckGo search Linux get domain name HTTPS expiration date. I suspect already having searched that.

DuckDuckGo search *Linux get domain name HTTPS expiration date*. I suspect already having searched that.
Author
Owner
The Stack Overflow answer 21297927 helps to establish the Bash script:
DOMAIN_NAME=etesync.lemnoslife.com
FILE=website.pem
echo -n | openssl s_client -connect $DOMAIN_NAME:443 -CAfile /usr/share/ca-certificates/mozilla/DigiCert_Assured_ID_Root_CA.crt 2> /dev/null | \
    sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > $FILE
openssl x509 -enddate -noout -in $FILE
rm $FILE
<details> <summary><a href="https://stackoverflow.com/a/21297927">The Stack Overflow answer 21297927</a> helps to establish the Bash script:</summary> ```bash DOMAIN_NAME=etesync.lemnoslife.com FILE=website.pem echo -n | openssl s_client -connect $DOMAIN_NAME:443 -CAfile /usr/share/ca-certificates/mozilla/DigiCert_Assured_ID_Root_CA.crt 2> /dev/null | \ sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > $FILE openssl x509 -enddate -noout -in $FILE rm $FILE ``` </details>
Author
Owner

The Stack Overflow answer 74171106 solves this issue by adding --nginx-ctl /usr/sbin/nginx to the crontab.

[The Stack Overflow answer 74171106](https://stackoverflow.com/a/74171106) solves this issue by adding `--nginx-ctl /usr/sbin/nginx` to the `crontab`.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Benjamin_Loison/certbot#10
No description provided.