Solving challenge `tls-alpn-01` failed and can't get certificate

1. The problem I’m having:

when I use ./caddy run, it stops trying to solve challenge and said it fails, and keep doing that for a cycle

2. Error messages and/or full log output:

 INFO    http.acme_client        trying to solve challenge       {"identifier": "wu.danielstudying.top", "challenge_type": "tls-alpn-01", "ca": "https://acme-v02.api.letsencrypt.org/directory"}
2023/05/26 00:54:03.336 ERROR   http.acme_client        challenge failed        {"identifier": "wu.danielstudying.top", "challenge_type": "tls-alpn-01", "problem": {"type": "urn:ietf:params:acme:error:connection", "title": "", "detail": "54.183.114.144: Timeout during connect (likely firewall problem)", "instance": "", "subproblems": []}}
2023/05/26 00:54:03.337 ERROR   http.acme_client        validating authorization        {"identifier": "wu.danielstudying.top", "problem": {"type": "urn:ietf:params:acme:error:connection", "title": "", "detail": "54.183.114.144: Timeout during connect (likely firewall problem)", "instance": "", "subproblems": []}, "order": "https://acme-v02.api.letsencrypt.org/acme/order/1128200277/184541797657", "attempt": 1, "max_attempts": 3}
2023/05/26 00:54:04.404 ERROR   tls.obtain      could not get certificate from issuer   {"identifier": "wu.danielstudying.top", "issuer": "acme-v02.api.letsencrypt.org-directory", "error": "HTTP 429 urn:ietf:params:acme:error:rateLimited - Error creating new order :: too many failed authorizations recently: see https://letsencrypt.org/docs/failed-validation-limit/"}
2023/05/26 00:54:04.405 INFO    http    waiting on internal rate limiter        {"identifiers": ["wu.danielstudying.top"], "ca": "https://acme.zerossl.com/v2/DV90", "account": "1062591914@qq.com"}
2023/05/26 00:54:04.405 INFO    http    done waiting on internal rate limiter   {"identifiers": ["wu.danielstudying.top"], "ca": "https://acme.zerossl.com/v2/DV90", "account": "1062591914@qq.com"}
2023/05/26 00:54:06.515 INFO    http.acme_client        trying to solve challenge       {"identifier": "wu.danielstudying.top", "challenge_type": "http-01", "ca": "https://acme.zerossl.com/v2/DV90"}
2023/05/26 00:54:19.927 ERROR   http.acme_client        challenge failed        {"identifier": "wu.danielstudying.top", "challenge_type": "http-01", "problem": {"type": "", "title": "", "detail": "", "instance": "", "subproblems": []}}
2023/05/26 00:54:19.928 ERROR   http.acme_client        validating authorization        {"identifier": "wu.danielstudying.top", "problem": {"type": "", "title": "", "detail": "", "instance": "", "subproblems": []}, "order": "https://acme.zerossl.com/v2/DV90/order/-o7pd6XcuB4HOFUGZltXOg", "attempt": 1, "max_attempts": 3}
2023/05/26 00:54:19.928 ERROR   tls.obtain      could not get certificate from issuer   {"identifier": "wu.danielstudying.top", "issuer": "acme.zerossl.com-v2-DV90", "error": "HTTP 0  - "}
2023/05/26 00:54:19.929 ERROR   tls.obtain      will retry      {"error": "[wu.danielstudying.top] Obtain: [wu.danielstudying.top] solving challenge: wu.danielstudying.top: [wu.danielstudying.top] authorization failed: HTTP 0  -  (ca=https://acme.zerossl.com/v2/DV90)", "attempt": 1, "retrying_in": 60, "elapsed": 27.433072803, "max_duration": 2592000}

3. Caddy version:

v2.6.4

4. How I installed and ran Caddy:

start from a brand new ec2 instance

apt-get install software-properties-common
 
sudo add-apt-repository ppa:longsleep/golang-backports 
 
sudo apt-get update 
 
sudo apt-get install golang-go

apt install golang-go
 
go install github.com/caddyserver/xcaddy/cmd/xcaddy@latest
 
~/go/bin/xcaddy build --with github.com/caddyserver/forwardproxy@caddy2=github.com/klzgrad/forwardproxy@naive

create a CaddyFile

lastly
./caddy run

a. System environment:

Amazon ec2 ubuntu

b. Command:

./caddy run

c. Service/unit/compose file:

d. My complete Caddy config:

:443, wu.danielstudying.top 
tls 2342342342@qq.com 
route {
 forward_proxy {
   basic_auth Fulwin Weston123!
   hide_ip
   hide_via
   probe_resistance
  }
 
 forward_proxy {
   basic_auth danielvpn Weston321!
   hide_ip
   hide_via
   probe_resistance
  }
 reverse_proxy https://moe-y.com/login { 
   header_up  Host  {upstream_hostport}
   header_up  X-Forwarded-Host  {host}
  }
}

5. Links to relevant resources:

The CA is reporting that it can’t connect to your server. Make sure the public Internet can access your caddy instance (so, ensure proper DNS config and firewall and router settings).

Now, if you remove forward_proxy stuff and it works, I’d be curious to look into that more. Or especially probe_resistance

OK, I just opened my inbound to all traffic and it works. Didn’t set up my firewall correctly

1 Like

Thank you so much

1 Like

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