The containers run successfully and I can see traefik has written a certificate in acme.json. Unfortunately bumping into an annoying basicauth issue, where my credentials aren't being accepted and requested after each submit.
Got the below errors showing in traefik.log and assume related to the login issue. How do I fix this?
2024-02-25T13:00:35+01:00 ERR github.com/traefik/traefik/v3/pkg/provider/acme/provider.go:399 > Unable to obtain ACME certificate for domains error="unable to generate a certificate for the domains [traefik.continental34.com]: error: one or more domains had a problem:\n[traefik.continental34.com] acme: error: 403 :: urn:ietf:params:acme:error:unauthorized :: Cannot negotiate ALPN protocol \"acme-tls/1\" for tls-alpn-01 challenge\n" ACME CA=https://acme-v02.api.letsencrypt.org/directory acmeCA=https://acme-v02.api.letsencrypt.org/directory domains=["traefik.continental34.com"] providerName=myresolver.acme routerName=mydashboard@docker rule=Host(`traefik.continental34.com`)
2024-02-25T13:01:12+01:00 ERR github.com/traefik/traefik/v3/pkg/provider/acme/provider.go:399 > Unable to obtain ACME certificate for domains error="unable to generate a certificate for the domains [traefik.continental34.com]: acme: error: 429 :: POST :: https://acme-v02.api.letsencrypt.org/acme/new-order :: urn:ietf:params:acme:error:rateLimited :: Error creating new order :: too many failed authorizations recently: see https://letsencrypt.org/docs/failed-validation-limit/" ACME CA=https://acme-v02.api.letsencrypt.org/directory acmeCA=https://acme-v02.api.letsencrypt.org/directory domains=["traefik.continental34.com"] providerName=myresolver.acme routerName=mydashboard@docker rule=Host(`traefik.continental34.com`)
@bluepuma77 my understanding is also that I can't use wildcards and proxy with TLS, so my reasoning was not to enable it yet and switch to dnschallenge in traefik / cloudflare once things are starting to work. Just so I get this correctly, is my current basicauth issue caused by the LE usage limit or not?
That's exactly my thought and worry here. I've generated a bunch of passwords over the past weeks with the following command:
htpasswd -nb admin password
No luck and I'm also escaping 3 times each password with another $ in labels section. Even when using the exact same credentials from your simple example I'm getting the same basicauth error... It's driving me nuts by now
Desperately want to fix this, where do I take things from here?
Originally wrote that I stated credentials in command section, this is in labels
I know those links work because I've been using that all the time. The problem is that basicauth is not working on the traefik link. But if I understand you correctly that's caused by tlschallenge requiring port 443 (which is already taken by another nginx server).
So I've rebuilt everything again, commented the tls section out and replaced it for the dns values. Still getting the same issue when accessing:
https://traefik.continental34.com:8443/dashboard/
Is the link wrong, or should I change something else? Arghhh
Only one ERR remaining in my log now, how do I fix this one?
2024-02-28T15:04:06+01:00 ERR github.com/traefik/traefik/v3/pkg/provider/acme/provider.go:399 > Unable to obtain ACME certificate for domains error="unable to generate a certificate for the domains [traefik.continental34.com]: error: one or more domains had a problem:\n[traefik.continental34.com] acme: error: 400 :: urn:ietf:params:acme:error:connection :: 24.132.61.220: Connection refused\n" ACME CA=https://acme-v02.api.letsencrypt.org/directory acmeCA=https://acme-v02.api.letsencrypt.org/directory domains=["traefik.continental34.com"] providerName=myresolver.acme routerName=mydashboard@docker rule=Host(`traefik.continental34.com`)
In the end I got the cloudflare dns challenge also working and it was not related to configuration issues in traefik. There were two other issues at play directly in cloudflare:
My api token was not working properly, after creating a new one the dns challenge also started working properly.
My edge certificates were getting a timeout validation error in cloudflare. Disabling the universal SSL settings for 15 min and re-enabling them afterwards again solved that. Then the whole setup started working like a magic, also behind proxy.
@bluepuma77 shoutout to you for helping me out a lot in this process The simplified config was super valuable (incl reading a lot of the traefik docs) and taught me a lot about how traefik really works in the end.