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

can't get ssl

Open ghost opened this issue 4 years ago • 17 comments

Checklist

  • Have you pulled and found the error with jc21/nginx-proxy-manager:latest docker image?
    • No
  • Are you sure you're not using someone else's docker image?
    • Yes
  • Have you searched for similar issues (both open and closed)?
    • Yes

Describe the bug

when i try to get SSL it show

Error: Command failed: certbot certonly --config "/etc/letsencrypt.ini" --cert-name "npm-12" --agree-tos --authenticator webroot --email "myemail" --preferred-challenges "dns,http" --domains "mydomain" 
Saving debug log to /var/log/letsencrypt/letsencrypt.log
An unexpected error occurred:
There were too many requests of a given type :: Error creating new order :: too many failed authorizations recently: see https://letsencrypt.org/docs/failed-validation-limit/
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.

    at ChildProcess.exithandler (node:child_process:399:12)
    at ChildProcess.emit (node:events:526:28)
    at maybeClose (node:internal/child_process:1092:16)
    at Socket. (node:internal/child_process:451:11)
    at Socket.emit (node:events:526:28)
    at Pipe. (node:net:687:12)

Nginx Proxy Manager Version

v2.9.18 © 2022 [jc21.com] To Reproduce Steps to reproduce the behavior:

  1. Go to nginx proxy manager
  2. Click on Add Let's Encrypt Certificate
  3. Scroll down to save
  4. See error

Expected behavior

i want to get SSL for my ghost blog stack in portainer

Screenshots

Operating System

Rpi Debian 11 bulleye

Additional context

ghost avatar Aug 24 '22 06:08 ghost

Not much to go on, letsencrypt has failed to get to your NPM too many times and has put you on a temporary blacklist.

the1ts avatar Aug 24 '22 23:08 the1ts

same error here :/

victorcbr avatar Aug 25 '22 17:08 victorcbr

Seeing the same problem here. Just a failure to download the .well-known file.

Edit to add: this is just a renewal of a previously working cert that's failing now. I have not tried to fetch a cert for a previously-unsecured domain.

tfmm avatar Aug 26 '22 01:08 tfmm

Here's the letsencrypt.log entries for a failed renewal:

2022-08-26 01:24:29,775:DEBUG:certbot._internal.error_handler:Calling registered functions
2022-08-26 01:24:29,776:INFO:certbot._internal.auth_handler:Cleaning up challenges
2022-08-26 01:24:29,776:DEBUG:certbot._internal.plugins.webroot:Removing /data/letsencrypt-acme-challenge/.well-known/acme-challenge/5mCq1rVr3oIWGpOHjcwZKRr29XjnU0qGDxVhMJPFYWw
2022-08-26 01:24:29,776:DEBUG:certbot._internal.plugins.webroot:All challenges cleaned up
2022-08-26 01:24:29,776:ERROR:certbot._internal.renewal:Failed to renew certificate npm-28 with error: Some challenges have failed.
2022-08-26 01:24:29,777:DEBUG:certbot._internal.renewal:Traceback was:
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/certbot/_internal/renewal.py", line 484, in handle_renewal_request
    main.renew_cert(lineage_config, plugins, renewal_candidate)
  File "/usr/local/lib/python3.7/dist-packages/certbot/_internal/main.py", line 1541, in renew_cert
    renewed_lineage = _get_and_save_cert(le_client, config, lineage=lineage)
  File "/usr/local/lib/python3.7/dist-packages/certbot/_internal/main.py", line 129, in _get_and_save_cert
    renewal.renew_cert(config, domains, le_client, lineage)
  File "/usr/local/lib/python3.7/dist-packages/certbot/_internal/renewal.py", line 344, in renew_cert
    new_cert, new_chain, new_key, _ = le_client.obtain_certificate(domains, new_key)
  File "/usr/local/lib/python3.7/dist-packages/certbot/_internal/client.py", line 442, in obtain_certificate
    orderr = self._get_order_and_authorizations(csr.data, self.config.allow_subset_of_names)
  File "/usr/local/lib/python3.7/dist-packages/certbot/_internal/client.py", line 510, in _get_order_and_authorizations
    authzr = self.auth_handler.handle_authorizations(orderr, self.config, best_effort)
  File "/usr/local/lib/python3.7/dist-packages/certbot/_internal/auth_handler.py", line 106, in handle_authorizations
    self._poll_authorizations(authzrs, max_retries, best_effort)
  File "/usr/local/lib/python3.7/dist-packages/certbot/_internal/auth_handler.py", line 206, in _poll_authorizations
    raise errors.AuthorizationError('Some challenges have failed.')
certbot.errors.AuthorizationError: Some challenges have failed.

2022-08-26 01:24:29,777:DEBUG:certbot._internal.display.obj:Notifying user:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 

Nothing has changed with my network or external firewall, and all services behind NPM are fully reachable from the internet as far as I can tell.

tfmm avatar Aug 26 '22 01:08 tfmm

There is a bug fixed by #2038, if you are using force SSL, turn it off, try a renew and then turn back on. The problem is letsencrypt get pushed to SSL for renew traffic, this fails since letsencrypt does this work over HTTP only.

the1ts avatar Aug 26 '22 09:08 the1ts

There is a bug fixed by #2038, if you are using force SSL, turn it off, try a renew and then turn back on. The problem is letsencrypt get pushed to SSL for renew traffic, this fails since letsencrypt does this work over HTTP only.

This did resolve it for me, hopefully that PR gets reviewed/merged soon.

tfmm avatar Aug 26 '22 11:08 tfmm

where can I find Saving debug log to /var/log/letsencrypt/letsencrypt.log I got [ Directory '/var/log/letsencrypt' does not exist ]

ghost avatar Aug 27 '22 07:08 ghost

@chatofking where are you looking for /var/log/letsencrypt, this would probably be inside the docker container, not on the host since the standard install method does not have /var/log/letsencrypt on a docker volume.

the1ts avatar Aug 27 '22 08:08 the1ts

how do i can go inside the docker container can you example this??

ghost avatar Aug 28 '22 04:08 ghost

oh I need to mkdir volume

ghost avatar Aug 28 '22 05:08 ghost

docker exec -it "nginxproxymanager container name" /bin/bash will get you inside the docker container. Or as you say put /var/log/ in a volume.

the1ts avatar Aug 28 '22 11:08 the1ts

do you know how to export file ? i try to cp to USB /var/log]# cp -R letsencrypt /mnt/usb cp: cannot overwrite non-directory '/mnt/usb' with directory 'letsencrypt'

ghost avatar Aug 29 '22 06:08 ghost

I think you want to use docker cp from outside the container.

the1ts avatar Aug 29 '22 07:08 the1ts

same error here :/

i solved my problem using the duckdns provider.

victorcbr avatar Aug 29 '22 13:08 victorcbr

you point duckdns where public ip or server IP ?

ghost avatar Aug 29 '22 14:08 ghost

duckdns on my public ip, router with forward port and ssl with dns challenge ( just put the token and voilà ).

thanks for support 👏 🙏

victorcbr avatar Sep 01 '22 03:09 victorcbr

I have the same problem but I realized that port forwarding on my router is does not set correctly. You need to set port forwarding to 443 and also 80. Now everything working fine :)

Tiposbingo avatar Mar 17 '23 10:03 Tiposbingo