tobychui / zoraxy

A general purpose HTTP reverse proxy and forwarding tool. Now written in Go!
https://zoraxy.aroz.org
GNU Affero General Public License v3.0
2.94k stars 180 forks source link

[BUG] Time limit exceeded: last error: NS vasilii.ns.cloudflare.com. returned REFUSED for _acme-challenge.mydomain.com #290

Open gerryflux opened 2 months ago

gerryflux commented 2 months ago

Describe the bug I'm trying to get a certificate for a domain using Cloudflare. The process takes long and eventually fails. Using similar approach with HaProxy (pfSense) and NPM works fine.

To Reproduce Steps to reproduce the behavior:

  1. Go to TLS / SSL Certificates
  2. Click on 'Open ACME Tool'
  3. Fill in the details (domain, provider as Cloudflare, enable DNS Challenge and enter the credentials - AuthEmail and AuthKey)
  4. Click on 'Get Certificate'
  5. See error

Expected behavior It should successfully return a certificate for the domain.

Screenshots I have added the logs at the end of this post.

Browser (if it is a bug appears on the UI section of the system):

Host Environment (please complete the following information):

Additional context The logs

2024/08/26 17:30:36 [ACME] Obtaining certificate... 2024/08/26 17:30:36 [INFO] Using https://acme-v02.api.letsencrypt.org/directory for CA Directory URL 2024/08/26 17:30:41 [INFO] acme: Registering account for myemail@hotmail.com 2024/08/26 17:30:43 [INFO] [mydomain.com] acme: Obtaining bundled SAN certificate 2024/08/26 17:30:45 [INFO] [mydomain.com] AuthURL: https://acme-v02.api.letsencrypt.org/acme/authz-v3/395417725866 2024/08/26 17:30:45 [INFO] [mydomain.com] acme: use dns-01 solver 2024/08/26 17:30:45 [INFO] [mydomain.com] acme: Preparing to solve DNS-01 2024/08/26 17:30:56 [INFO] cloudflare: new record for mydomain.com, ID 61d12378897012173b2642e3c771dba1 2024/08/26 17:30:56 [INFO] [mydomain.com] acme: Trying to solve DNS-01 2024/08/26 17:30:56 [INFO] [mydomain.com] acme: Checking DNS record propagation. [nameservers=127.0.0.11:53] 2024/08/26 17:30:58 [INFO] Wait for propagation [timeout: 5m0s, interval: 2s] 2024/08/26 17:31:00 [INFO] [mydomain.com] acme: Waiting for DNS record propagation. 2024/08/26 17:31:03 [INFO] [mydomain.com] acme: Waiting for DNS record propagation. 2024/08/26 17:31:06 [INFO] [mydomain.com] acme: Waiting for DNS record propagation. 2024/08/26 17:31:09 [INFO] [mydomain.com] acme: Waiting for DNS record propagation. 2024/08/26 17:31:13 [INFO] [mydomain.com] acme: Waiting for DNS record propagation. 2024/08/26 17:31:16 [INFO] [mydomain.com] acme: Waiting for DNS record propagation. 2024/08/26 17:31:19 [INFO] [mydomain.com] acme: Waiting for DNS record propagation. 2024/08/26 17:31:22 [INFO] [mydomain.com] acme: Waiting for DNS record propagation. 2024/08/26 17:31:26 [INFO] [mydomain.com] acme: Waiting for DNS record propagation. 2024/08/26 17:31:43 [INFO] [mydomain.com] acme: Waiting for DNS record propagation. 2024/08/26 17:31:56 [INFO] [mydomain.com] acme: Waiting for DNS record propagation. 2024/08/26 17:32:17 [INFO] [mydomain.com] acme: Waiting for DNS record propagation. 2024/08/26 17:32:34 [INFO] [mydomain.com] acme: Waiting for DNS record propagation. 2024/08/26 17:32:47 [INFO] [mydomain.com] acme: Waiting for DNS record propagation. 2024/08/26 17:32:50 [INFO] [mydomain.com] acme: Waiting for DNS record propagation. 2024/08/26 17:32:53 [INFO] [mydomain.com] acme: Waiting for DNS record propagation. 2024/08/26 17:32:56 [INFO] [mydomain.com] acme: Waiting for DNS record propagation. 2024/08/26 17:32:59 [INFO] [mydomain.com] acme: Waiting for DNS record propagation. 2024/08/26 17:33:03 [INFO] [mydomain.com] acme: Waiting for DNS record propagation. 2024/08/26 17:33:07 [INFO] [mydomain.com] acme: Waiting for DNS record propagation. 2024/08/26 17:33:10 [INFO] [mydomain.com] acme: Waiting for DNS record propagation. 2024/08/26 17:33:13 [INFO] [mydomain.com] acme: Waiting for DNS record propagation. 2024/08/26 17:33:16 [INFO] [mydomain.com] acme: Waiting for DNS record propagation. 2024/08/26 17:33:19 [INFO] [mydomain.com] acme: Waiting for DNS record propagation. 2024/08/26 17:33:22 [INFO] [mydomain.com] acme: Waiting for DNS record propagation. 2024/08/26 17:33:26 [INFO] [mydomain.com] acme: Waiting for DNS record propagation. 2024/08/26 17:33:29 [INFO] [mydomain.com] acme: Waiting for DNS record propagation. 2024/08/26 17:33:32 [INFO] [mydomain.com] acme: Waiting for DNS record propagation. 2024/08/26 17:33:35 [INFO] [mydomain.com] acme: Waiting for DNS record propagation. 2024/08/26 17:33:42 [INFO] [mydomain.com] acme: Waiting for DNS record propagation. 2024/08/26 17:33:46 [INFO] [mydomain.com] acme: Waiting for DNS record propagation. 2024/08/26 17:33:49 [INFO] [mydomain.com] acme: Waiting for DNS record propagation. 2024/08/26 17:33:52 [INFO] [mydomain.com] acme: Waiting for DNS record propagation. 2024/08/26 17:33:55 [INFO] [mydomain.com] acme: Waiting for DNS record propagation. 2024/08/26 17:33:58 [INFO] [mydomain.com] acme: Waiting for DNS record propagation. 2024/08/26 17:34:01 [INFO] [mydomain.com] acme: Waiting for DNS record propagation. 2024/08/26 17:34:04 [INFO] [mydomain.com] acme: Waiting for DNS record propagation. 2024/08/26 17:34:08 [INFO] [mydomain.com] acme: Waiting for DNS record propagation. 2024/08/26 17:34:11 [INFO] [mydomain.com] acme: Waiting for DNS record propagation. 2024/08/26 17:34:14 [INFO] [mydomain.com] acme: Waiting for DNS record propagation. 2024/08/26 17:34:17 [INFO] [mydomain.com] acme: Waiting for DNS record propagation. 2024/08/26 17:34:21 [INFO] [mydomain.com] acme: Waiting for DNS record propagation. 2024/08/26 17:34:24 [INFO] [mydomain.com] acme: Waiting for DNS record propagation. 2024/08/26 17:34:27 [INFO] [mydomain.com] acme: Waiting for DNS record propagation. 2024/08/26 17:34:30 [INFO] [mydomain.com] acme: Waiting for DNS record propagation. 2024/08/26 17:34:33 [INFO] [mydomain.com] acme: Waiting for DNS record propagation. 2024/08/26 17:34:37 [INFO] [mydomain.com] acme: Waiting for DNS record propagation. 2024/08/26 17:34:39 [INFO] [mydomain.com] acme: Waiting for DNS record propagation. 2024/08/26 17:34:43 [INFO] [mydomain.com] acme: Waiting for DNS record propagation. 2024/08/26 17:34:46 [INFO] [mydomain.com] acme: Waiting for DNS record propagation. 2024/08/26 17:34:49 [INFO] [mydomain.com] acme: Waiting for DNS record propagation. 2024/08/26 17:34:52 [INFO] [mydomain.com] acme: Waiting for DNS record propagation. 2024/08/26 17:34:55 [INFO] [mydomain.com] acme: Waiting for DNS record propagation. 2024/08/26 17:34:58 [INFO] [mydomain.com] acme: Waiting for DNS record propagation. 2024/08/26 17:35:12 [INFO] [mydomain.com] acme: Waiting for DNS record propagation. 2024/08/26 17:35:15 [INFO] [mydomain.com] acme: Waiting for DNS record propagation. [2024-08-26 17:35:16.305361] [uptime-monitor] [system:info] Uptime updated - 1724690116 2024/08/26 17:35:18 [INFO] [mydomain.com] acme: Waiting for DNS record propagation. 2024/08/26 17:35:22 [INFO] [mydomain.com] acme: Waiting for DNS record propagation. 2024/08/26 17:35:25 [INFO] [mydomain.com] acme: Waiting for DNS record propagation. 2024/08/26 17:35:28 [INFO] [mydomain.com] acme: Waiting for DNS record propagation. 2024/08/26 17:35:32 [INFO] [mydomain.com] acme: Waiting for DNS record propagation. 2024/08/26 17:35:35 [INFO] [mydomain.com] acme: Waiting for DNS record propagation. 2024/08/26 17:35:38 [INFO] [mydomain.com] acme: Waiting for DNS record propagation. 2024/08/26 17:35:41 [INFO] [mydomain.com] acme: Waiting for DNS record propagation. 2024/08/26 17:35:45 [INFO] [mydomain.com] acme: Waiting for DNS record propagation. 2024/08/26 17:35:48 [INFO] [mydomain.com] acme: Waiting for DNS record propagation. 2024/08/26 17:35:51 [INFO] [mydomain.com] acme: Waiting for DNS record propagation. 2024/08/26 17:35:54 [INFO] [mydomain.com] acme: Waiting for DNS record propagation. 2024/08/26 17:35:57 [INFO] [mydomain.com] acme: Waiting for DNS record propagation. 2024/08/26 17:35:59 [INFO] [mydomain.com] acme: Cleaning DNS-01 challenge 2024/08/26 17:36:09 [INFO] Deactivating auth: https://acme-v02.api.letsencrypt.org/acme/authz-v3/395417725866 2024/08/26 17:36:10 error: one or more domains had a problem: [mydomain.com] propagation: time limit exceeded: last error: NS vasilii.ns.cloudflare.com. returned REFUSED for _acme-challenge.mydomain.com.

tobychui commented 2 months ago

I guess this is mostly caused by your DNS settings somewhere in your network. As this sometimes do happens with lego (another reported case) for unknown reasons.

As I recall the acme module maintainer @yeungalan is currently on vacation. You can follow up with him after he is back to see what can be done to fix your issues. For now I would recommend just use the http challenge or CF full strict mode (15 years wildcard certificate) for certificates.