Hello, I'm trying to generate new LE certificates for my domain via Traefik. I'll post an excerpt of my Traefik logs and my configuration files.
I checked that both my ports 80 and 443 are open and reaching the server. I also cleared the acme.json file and I'm not sure what else to try. The HTTP-01 challenge used to work for me before and I haven't touched my configs in months I believe, so unless something has changed with the latest Traefik versions, I don't know what the issue could be. I've seen one error references a "/.well-known/" folder but this is the first time I've ever heard of it, just a hunch, maybe it's normal.
Any ideas? Tell me if you need more info, thanks.
docker logs -f traefik
level=debug msg="Building ACME client..." providerName=le-http.acme
level=debug msg="https://acme-staging-v02.api.letsencrypt.org/directory" providerName=le-http.acme
level=info msg=Register... providerName=le-http.acme
level=debug msg="legolog: [INFO] acme: Registering account for mypersonal@email.com"
level=debug msg="Using HTTP Challenge provider." providerName=le-http.acme
level=debug msg="legolog: [INFO] [traefik.example.com] acme: Obtaining bundled SAN certificate"
level=debug msg="legolog: [INFO] [bw.example.com] acme: Obtaining bundled SAN certificate"
level=debug msg="legolog: [INFO] [traefik.example.com] AuthURL: https://acme-staging-v02.api.letsencrypt.org/acme/authz-v3/200627950"
level=debug msg="legolog: [INFO] [traefik.example.com] acme: Could not find solver for: tls-alpn-01"
level=debug msg="legolog: [INFO] [traefik.example.com] acme: use http-01 solver"
level=debug msg="legolog: [INFO] [traefik.example.com] acme: Trying to solve HTTP-01"
level=debug msg="legolog: [INFO] [bw.example.com] AuthURL: https://acme-staging-v02.api.letsencrypt.org/acme/authz-v3/200627952"
level=debug msg="legolog: [INFO] [bw.example.com] acme: Could not find solver for: tls-alpn-01"
level=debug msg="legolog: [INFO] [bw.example.com] acme: use http-01 solver"
level=debug msg="legolog: [INFO] [bw.example.com] acme: Trying to solve HTTP-01"
level=debug msg="Serving default certificate for request: \"traefik.example.com\""
level=debug msg="Serving default certificate for request: \"bw.example.com\""
level=debug msg="vulcand/oxy/roundrobin/rr: begin ServeHttp on request" Request="{\"[...lots of stuff here...]
level=debug msg="legolog: [INFO] Deactivating auth: https://acme-staging-v02.api.letsencrypt.org/acme/authz-v3/200627950"
level=debug msg="legolog: [INFO] Unable to deactivate the authorization: https://acme-staging-v02.api.letsencrypt.org/acme/authz-v3/200627950"
level=error msg="Unable to obtain ACME certificate for domains \"traefik.example.com\": unable to generate a certificate for the domains [traefik.example.com]: error: one or more domains had a problem:\n[traefik.example.com] acme: error: 403 :: urn:ietf:params:acme:error:unauthorized :: Invalid response from https://traefik.example.com/.well-known/acme-challenge/_LNFxTT5H7qcR4CtQ-7Q0sQGZNtSaTvbb17GjIxlOs4 [MY_IP]: 404, url: \n" providerName=le-http.acme routerName=dashboard-https@file rule="Host(`traefik.example.com`)"
level=debug msg="legolog: [INFO] Deactivating auth: https://acme-staging-v02.api.letsencrypt.org/acme/authz-v3/200627952"
level=debug msg="legolog: [INFO] Unable to deactivate the authorization: https://acme-staging-v02.api.letsencrypt.org/acme/authz-v3/200627952"
level=error msg="Unable to obtain ACME certificate for domains \"bw.example.com\": unable to generate a certificate for the domains [bw.example.com]: error: one or more domains had a problem:\n[bw.example.com] acme: error: 403 :: urn:ietf:params:acme:error:unauthorized :: Invalid response from https://bw.example.com/.well-known/acme-challenge/atNYlgD8G85vVZgfc2Zz2fGy63cFVeZqIwJs8i0bpyg [MY_IP]: \"\\n <!DOCTYPE html>\\n <html lang=\\\"en\\\">\\n <head>\\n <meta charset=\\\"utf-8\\\">\\n \", url: \n" providerName=le-http.acme routerName=bitwarden-ui-https@docker rule="Host(`bw.example.com`)"
Temporarily disabling the https redirect middlewares seems to have fixed the issue indeed, now I got the staging certificates correctly, thanks.
What would be the advantage of using TLS-ALPN-01 over HTTP-01? I used the DNS challenge in the past but I don't really want to mess much with the records so I switched to HTTP.
Thanks. I'm still not able to get it to work though, I'm getting the same errors in my logs, posted below.
I'm sure the 443 port on my router is forwarded correctly because I'm getting a response when using a port listener (nc -l -p 443 -- of course with docker stopped) but I don't get any hits while Let's Encrypt is trying to get certificates.
The DNS is pointing to the correct public IP so I'm not sure if it's something wrong with my Traefik configuration, on the other hand HTTP-01 challenge works fine over port 80.
Do you have any ideas? Do the yaml files look correct to you?
I'll recheck my network configuration to make sure but it looks fine to me. I've also tried disabling the secureHeaders middleware but it doesn't help.
docker logs -f traefik
level=debug msg="Building ACME client..." providerName=le-tls.acme
level=debug msg="https://acme-v02.api.letsencrypt.org/directory" providerName=le-tls.acme
level=info msg=Register... providerName=le-tls.acme
level=debug msg="legolog: [INFO] acme: Registering account for mypersonal@email.com"
level=debug msg="Using TLS Challenge provider." providerName=le-tls.acme
level=debug msg="legolog: [INFO] [traefik.example.com] acme: Obtaining bundled SAN certificate"
level=debug msg="No default certificate, generating one"
level=debug msg="legolog: [INFO] [traefik.example.com] AuthURL: https://acme-v02.api.letsencrypt.org/acme/authz-v3/10533585445"
level=debug msg="legolog: [INFO] [traefik.example.com] acme: use tls-alpn-01 solver"
level=debug msg="legolog: [INFO] [traefik.example.com] acme: Trying to solve TLS-ALPN-01"
level=debug msg="TLS Challenge Present temp certificate for traefik.example.com" providerName=tlsalpn.acme
level=debug msg="Configuration received from provider tlsalpn.acme: {\"http\":{},\"tls\":{}}" providerName=tlsalpn.acme
level=debug msg="legolog: [INFO] Deactivating auth: https://acme-v02.api.letsencrypt.org/acme/authz-v3/10533585445"
level=error msg="Unable to obtain ACME certificate for domains \"traefik.example.com\": unable to generate a certificate for the domains [traefik.example.com]: error: one or more domains had a problem:\n[traefik.example.com] [traefik.example.com] acme: error presenting token: timeout 2021-02-01 22:30:27.544977709 +0100 CET m=+91.576358100\n" rule="Host(`traefik.example.com`)" providerName=le-tls.acme routerName=dashboard-https@file