My transition to traefik from nginx is turning out to be frustrating as I can't even get off the ground with my testing app
I'm running dockerized traefik 2.3.2 within an Ubuntu 20.04 host. I'm just trying to setup a basic traefik container and the proverbial whoami container. My problem arises when trying to add in SSL LE certs using cloudflare as the DNS provider to perform DNS challenge.
Here is my setup (and please tell me if I'm doing something wrong since I'm pretty new to setting things up).
Here is my docker-compose.yml file:
networks:
docker-net:
name: docker-net
driver: bridge
ipam:
config:
- subnet: 10.30.0.0/24
secrets:
CF_DNS_API_TOKEN_secret:
file: /etc/docker/compose/CF_DNS_API_TOKEN.secret
CF_ZONE_API_TOKEN_secret:
file: /etc/docker/compose/CF_ZONE_API_TOKEN.secret
CF_API_KEY_secret:
file: /etc/docker/compose/CLOUDFLARE_API_KEY.secret
services:
traefik:
image: traefik:latest
container_name: traefik
hostname: traefik
restart: unless-stopped
secrets:
- CF_DNS_API_TOKEN_secret
- CF_ZONE_API_TOKEN_secret
- CF_API_KEY_secret
networks:
- docker-net
ports:
- 80:80
- 443:443
- 8080:8080
labels:
- "traefik.enable=true"
- "traefik.http.routers.dashboard.rule=Host(`traefik.xxxxx.com`) && (PathPrefix(`/api`) || PathPrefix(`/dashboard`))"
- "traefik.http.routers.dashboard.tls=true"
- "traefik.http.routers.dashboard.tls.certresolver=le"
- "traefik.http.routers.dashboard.service=api@internal"
- "traefik.http.routers.dashboard.middlewares=auth"
- "traefik.http.middlewares.auth.basicauth.users=admin:$$apr1$$284N9gdE$$HN3oNn0.D82qAFFXsusu00"
environment:
- TZ=${TZ}
- CLOUDFLARE_EMAIL=${CLOUDFLARE_EMAIL}
- CF_API_KEY_FILE=/run/secrets/CF_API_KEY_secret
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- /etc/traefik/traefik.yml:/etc/traefik/traefik.yml:ro
- /etc/letsencrypt/certificates:/etc/letsencrypt
whoami:
image: containous/whoami
container_name: whoami
restart: unless-stopped
networks:
- docker-net
labels:
- "traefik.enable=true"
- "traefik.http.routers.whoami.rule=Host(`whoami.xxxx.com`)"
- "traefik.http.routers.whoami.tls=true"
- "traefik.http.routers.whoami.tls.certresolver=le"
ports:
- 81:80
For the static configuration I'm using a traefik.yml file which is below:
entryPoints:
web:
address: :80
websecure:
address: :443
certificatesResolvers:
le:
acme:
email: xxxxxx@gmail.com
#Staging Server
#caServer: https://acme-staging-v02.api.letsencrypt.org/directory
#Production Server
caServer: https://acme-v02.api.letsencrypt.org/directory
storage: /etc/letsencrypt/acme.json
dnsChallenge:
provider: cloudflare
delayBeforeCheck: 0
resolvers:
- "1.1.1.1:53"
- "9.9.9.9:53"
tls:
options:
default:
minVersion: VersionTLS12
cipherSuites:
- TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
- TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
- TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
- TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
- TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305
- TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305
mintls13:
minVersion: VersionTLS13
providers:
docker:
endpoint: "unix:///var/run/docker.sock"
exposedbydefault: false
network: docker-net
api:
debug: true
dashboard: true
log:
level: DEBUG
I've create an empty acme.json file with mode 600.
My docker logs reveal the SSL certs can not be obtained from cloudflare:
time="2020-11-09T01:16:55-06:00" level=info msg="Configuration loaded from file: /etc/traefik/traefik.yml"
time="2020-11-09T01:16:55-06:00" level=info msg="Traefik version 2.3.2 built on 2020-10-19T18:36:22Z"
time="2020-11-09T01:16:55-06:00" level=debug msg="Static configuration loaded {\"global\":{\"checkNewVersion\":true},\"serversTransport\":{\"maxIdleConnsPerHost\":200},\"entryPoints\":{\"web\":{\"address\":\":80\",\"transport\":{\"lifeCycle\":{\"graceTimeOut\":10000000000},\"respondingTimeouts\":{\"idleTimeout\":180000000000}},\"forwardedHeaders\":{},\"http\":{}},\"websecure\":{\"address\":\":443\",\"transport\":{\"lifeCycle\":{\"graceTimeOut\":10000000000},\"respondingTimeouts\":{\"idleTimeout\":180000000000}},\"forwardedHeaders\":{},\"http\":{}}},\"providers\":{\"providersThrottleDuration\":2000000000,\"docker\":{\"watch\":true,\"endpoint\":\"unix:///var/run/docker.sock\",\"defaultRule\":\"Host(`{{ normalize .Name }}`)\",\"network\":\"docker-net\",\"swarmModeRefreshSeconds\":15000000000}},\"api\":{\"dashboard\":true,\"debug\":true},\"log\":{\"level\":\"DEBUG\",\"format\":\"common\"},\"certificatesResolvers\":{\"le\":{\"acme\":{\"email\":\"xxxxx@gmail.com\",\"caServer\":\"https://acme-v02.api.letsencrypt.org/directory\",\"storage\":\"/etc/letsencrypt/acme.json\",\"keyType\":\"RSA4096\",\"dnsChallenge\":{\"provider\":\"cloudflare\",\"resolvers\":[\"1.1.1.1:53\",\"9.9.9.9:53\"]}}}}}"
time="2020-11-09T01:16:55-06:00" level=info msg="\nStats collection is disabled.\nHelp us improve Traefik by turning this feature on :)\nMore details on: https://doc.traefik.io/traefik/contributing/data-collection/\n"
time="2020-11-09T01:16:55-06:00" level=info msg="Starting provider aggregator.ProviderAggregator "
time="2020-11-09T01:16:55-06:00" level=debug msg="Start TCP Server" entryPointName=websecure
time="2020-11-09T01:16:55-06:00" level=info msg="Starting provider *acme.Provider {\"email\":\"xxxxx@gmail.com\",\"caServer\":\"https://acme-v02.api.letsencrypt.org/directory\",\"storage\":\"/etc/letsencrypt/acme.json\",\"keyType\":\"RSA4096\",\"dnsChallenge\":{\"provider\":\"cloudflare\",\"resolvers\":[\"1.1.1.1:53\",\"9.9.9.9:53\"]},\"ResolverName\":\"le\",\"store\":{},\"ChallengeStore\":{}}"
time="2020-11-09T01:16:55-06:00" level=info msg="Testing certificate renew..." providerName=le.acme
time="2020-11-09T01:16:55-06:00" level=info msg="Starting provider *docker.Provider {\"watch\":true,\"endpoint\":\"unix:///var/run/docker.sock\",\"defaultRule\":\"Host(`{{ normalize .Name }}`)\",\"network\":\"docker-net\",\"swarmModeRefreshSeconds\":15000000000}"
time="2020-11-09T01:16:55-06:00" level=debug msg="Configuration received from provider le.acme: {\"http\":{},\"tls\":{}}" providerName=le.acme
time="2020-11-09T01:16:55-06:00" level=info msg="Starting provider *traefik.Provider {}"
time="2020-11-09T01:16:55-06:00" level=debug msg="Configuration received from provider internal: {\"http\":{\"services\":{\"api\":{},\"dashboard\":{},\"noop\":{}}},\"tcp\":{},\"tls\":{}}" providerName=internal
time="2020-11-09T01:16:55-06:00" level=debug msg="Start TCP Server" entryPointName=web
time="2020-11-09T01:16:55-06:00" level=debug msg="No default certificate, generating one"
time="2020-11-09T01:16:55-06:00" level=debug msg="Provider connection established with docker 19.03.13 (API 1.40)" providerName=docker
time="2020-11-09T01:16:55-06:00" level=debug msg="Configuration received from provider docker: {\"http\":{\"routers\":{\"dashboard\":{\"middlewares\":[\"auth\"],\"service\":\"api@internal\",\"rule\":\"Host(`traefik.xxxxxxx.com`) \\u0026\\u0026 (PathPrefix(`/api`) || PathPrefix(`/dashboard`))\",\"tls\":{\"certResolver\":\"le\"}},\"whoami\":{\"service\":\"whoami-compose\",\"rule\":\"Host(`whoami.xxxxxxx.com`)\",\"tls\":{\"certResolver\":\"le\",\"domains\":[{\"main\":\"whoami.xxxxxxx.com\"}]}}},\"services\":{\"traefik-compose\":{\"loadBalancer\":{\"servers\":[{\"url\":\"http://10.30.0.3:80\"}],\"passHostHeader\":true}},\"whoami-compose\":{\"loadBalancer\":{\"servers\":[{\"url\":\"http://10.30.0.2:80\"}],\"passHostHeader\":true}}},\"middlewares\":{\"auth\":{\"basicAuth\":{\"users\":[\"admin:$apr1$284N9gdE$HN3oNn0.D82qAFFXsusu00\"]}}}},\"tcp\":{},\"udp\":{}}" providerName=docker
time="2020-11-09T01:16:55-06:00" level=debug msg="http: panic serving 10.0.1.184:63010: runtime error: invalid memory address or nil pointer dereference"
time="2020-11-09T01:16:55-06:00" level=debug msg="goroutine 32 [running]:"
time="2020-11-09T01:16:55-06:00" level=debug msg="net/http.(*conn).serve.func1(0xc0004380a0)"
time="2020-11-09T01:16:55-06:00" level=debug msg="\t/usr/local/go/src/net/http/server.go:1801 +0x147"
time="2020-11-09T01:16:55-06:00" level=debug msg="panic(0x2eb7e20, 0x54cdee0)"
time="2020-11-09T01:16:55-06:00" level=debug msg="\t/usr/local/go/src/runtime/panic.go:975 +0x47a"
time="2020-11-09T01:16:55-06:00" level=debug msg="crypto/tls.(*Conn).readClientHello(0xc000112e00, 0xc00006ac00, 0x0, 0x1000)"
time="2020-11-09T01:16:55-06:00" level=debug msg="\t/usr/local/go/src/crypto/tls/handshake_server.go:139 +0x93"
time="2020-11-09T01:16:55-06:00" level=debug msg="crypto/tls.(*Conn).serverHandshake(0xc000112e00, 0xc0006d20f0, 0x10)"
time="2020-11-09T01:16:55-06:00" level=debug msg="\t/usr/local/go/src/crypto/tls/handshake_server.go:40 +0x45"
time="2020-11-09T01:16:55-06:00" level=debug msg="crypto/tls.(*Conn).Handshake(0xc000112e00, 0x0, 0x0)"
time="2020-11-09T01:16:55-06:00" level=debug msg="\t/usr/local/go/src/crypto/tls/conn.go:1362 +0xc9"
time="2020-11-09T01:16:55-06:00" level=debug msg="net/http.(*conn).serve(0xc0004380a0, 0x39ea460, 0xc0002d5530)"
time="2020-11-09T01:16:55-06:00" level=debug msg="\t/usr/local/go/src/net/http/server.go:1817 +0x1a5"
time="2020-11-09T01:16:55-06:00" level=debug msg="created by net/http.(*Server).Serve"
time="2020-11-09T01:16:55-06:00" level=debug msg="\t/usr/local/go/src/net/http/server.go:2969 +0x36c"
time="2020-11-09T01:16:55-06:00" level=debug msg="http: panic serving 10.0.1.184:63011: runtime error: invalid memory address or nil pointer dereference"
time="2020-11-09T01:16:55-06:00" level=debug msg="goroutine 65 [running]:"
time="2020-11-09T01:16:55-06:00" level=debug msg="net/http.(*conn).serve.func1(0xc000438320)"
time="2020-11-09T01:16:55-06:00" level=debug msg="\t/usr/local/go/src/net/http/server.go:1801 +0x147"
time="2020-11-09T01:16:55-06:00" level=debug msg="panic(0x2eb7e20, 0x54cdee0)"
time="2020-11-09T01:16:55-06:00" level=debug msg="\t/usr/local/go/src/runtime/panic.go:975 +0x47a"
time="2020-11-09T01:16:55-06:00" level=debug msg="crypto/tls.(*Conn).readClientHello(0xc0000c7880, 0xc00006ac00, 0x0, 0x1000)"
time="2020-11-09T01:16:55-06:00" level=debug msg="\t/usr/local/go/src/crypto/tls/handshake_server.go:139 +0x93"
time="2020-11-09T01:16:55-06:00" level=debug msg="crypto/tls.(*Conn).serverHandshake(0xc0000c7880, 0xc0006d2670, 0x10)"
time="2020-11-09T01:16:55-06:00" level=debug msg="\t/usr/local/go/src/crypto/tls/handshake_server.go:40 +0x45"
time="2020-11-09T01:16:55-06:00" level=debug msg="crypto/tls.(*Conn).Handshake(0xc0000c7880, 0x0, 0x0)"
time="2020-11-09T01:16:55-06:00" level=debug msg="\t/usr/local/go/src/crypto/tls/conn.go:1362 +0xc9"
time="2020-11-09T01:16:55-06:00" level=debug msg="net/http.(*conn).serve(0xc000438320, 0x39ea460, 0xc0002d5530)"
time="2020-11-09T01:16:55-06:00" level=debug msg="\t/usr/local/go/src/net/http/server.go:1817 +0x1a5"
time="2020-11-09T01:16:55-06:00" level=debug msg="created by net/http.(*Server).Serve"
time="2020-11-09T01:16:55-06:00" level=debug msg="\t/usr/local/go/src/net/http/server.go:2969 +0x36c"
time="2020-11-09T01:16:55-06:00" level=debug msg="http: panic serving 10.0.1.184:63012: runtime error: invalid memory address or nil pointer dereference"
time="2020-11-09T01:16:55-06:00" level=debug msg="goroutine 67 [running]:"
time="2020-11-09T01:16:55-06:00" level=debug msg="net/http.(*conn).serve.func1(0xc000438460)"
time="2020-11-09T01:16:55-06:00" level=debug msg="\t/usr/local/go/src/net/http/server.go:1801 +0x147"
time="2020-11-09T01:16:55-06:00" level=debug msg="panic(0x2eb7e20, 0x54cdee0)"
time="2020-11-09T01:16:55-06:00" level=debug msg="\t/usr/local/go/src/runtime/panic.go:975 +0x47a"
time="2020-11-09T01:16:55-06:00" level=debug msg="crypto/tls.(*Conn).readClientHello(0xc0003cf500, 0xc00006ac00, 0x0, 0x1000)"
time="2020-11-09T01:16:55-06:00" level=debug msg="\t/usr/local/go/src/crypto/tls/handshake_server.go:139 +0x93"
time="2020-11-09T01:16:55-06:00" level=debug msg="crypto/tls.(*Conn).serverHandshake(0xc0003cf500, 0xc0006d2f50, 0x10)"
time="2020-11-09T01:16:55-06:00" level=debug msg="\t/usr/local/go/src/crypto/tls/handshake_server.go:40 +0x45"
time="2020-11-09T01:16:55-06:00" level=debug msg="crypto/tls.(*Conn).Handshake(0xc0003cf500, 0x0, 0x0)"
time="2020-11-09T01:16:55-06:00" level=debug msg="\t/usr/local/go/src/crypto/tls/conn.go:1362 +0xc9"
time="2020-11-09T01:16:55-06:00" level=debug msg="net/http.(*conn).serve(0xc000438460, 0x39ea460, 0xc0002d5530)"
time="2020-11-09T01:16:55-06:00" level=debug msg="\t/usr/local/go/src/net/http/server.go:1817 +0x1a5"
time="2020-11-09T01:16:55-06:00" level=debug msg="created by net/http.(*Server).Serve"
time="2020-11-09T01:16:55-06:00" level=debug msg="\t/usr/local/go/src/net/http/server.go:2969 +0x36c"
time="2020-11-09T01:16:55-06:00" level=debug msg="http: panic serving 10.0.1.184:63013: runtime error: invalid memory address or nil pointer dereference"
time="2020-11-09T01:16:55-06:00" level=debug msg="goroutine 69 [running]:"
time="2020-11-09T01:16:55-06:00" level=debug msg="net/http.(*conn).serve.func1(0xc0004385a0)"
time="2020-11-09T01:16:55-06:00" level=debug msg="\t/usr/local/go/src/net/http/server.go:1801 +0x147"
time="2020-11-09T01:16:55-06:00" level=debug msg="panic(0x2eb7e20, 0x54cdee0)"
time="2020-11-09T01:16:55-06:00" level=debug msg="\t/usr/local/go/src/runtime/panic.go:975 +0x47a"
time="2020-11-09T01:16:55-06:00" level=debug msg="crypto/tls.(*Conn).readClientHello(0xc000402000, 0xc00006ac00, 0x0, 0x1000)"
time="2020-11-09T01:16:55-06:00" level=debug msg="\t/usr/local/go/src/crypto/tls/handshake_server.go:139 +0x93"
time="2020-11-09T01:16:55-06:00" level=debug msg="crypto/tls.(*Conn).serverHandshake(0xc000402000, 0xc0006d3450, 0x10)"
time="2020-11-09T01:16:55-06:00" level=debug msg="\t/usr/local/go/src/crypto/tls/handshake_server.go:40 +0x45"
time="2020-11-09T01:16:55-06:00" level=debug msg="crypto/tls.(*Conn).Handshake(0xc000402000, 0x0, 0x0)"
time="2020-11-09T01:16:55-06:00" level=debug msg="\t/usr/local/go/src/crypto/tls/conn.go:1362 +0xc9"
time="2020-11-09T01:16:55-06:00" level=debug msg="net/http.(*conn).serve(0xc0004385a0, 0x39ea460, 0xc0002d5530)"
time="2020-11-09T01:16:55-06:00" level=debug msg="\t/usr/local/go/src/net/http/server.go:1817 +0x1a5"
time="2020-11-09T01:16:55-06:00" level=debug msg="created by net/http.(*Server).Serve"
time="2020-11-09T01:16:55-06:00" level=debug msg="\t/usr/local/go/src/net/http/server.go:2969 +0x36c"
time="2020-11-09T01:16:55-06:00" level=debug msg="http: panic serving 10.0.1.184:63014: runtime error: invalid memory address or nil pointer dereference"
time="2020-11-09T01:16:55-06:00" level=debug msg="goroutine 71 [running]:"
time="2020-11-09T01:16:55-06:00" level=debug msg="net/http.(*conn).serve.func1(0xc0004386e0)"
time="2020-11-09T01:16:55-06:00" level=debug msg="\t/usr/local/go/src/net/http/server.go:1801 +0x147"
time="2020-11-09T01:16:55-06:00" level=debug msg="panic(0x2eb7e20, 0x54cdee0)"
time="2020-11-09T01:16:55-06:00" level=debug msg="\t/usr/local/go/src/runtime/panic.go:975 +0x47a"
time="2020-11-09T01:16:55-06:00" level=debug msg="crypto/tls.(*Conn).readClientHello(0xc0002e2000, 0xc00006ac00, 0x0, 0x1000)"
time="2020-11-09T01:16:55-06:00" level=debug msg="\t/usr/local/go/src/crypto/tls/handshake_server.go:139 +0x93"
time="2020-11-09T01:16:55-06:00" level=debug msg="crypto/tls.(*Conn).serverHandshake(0xc0002e2000, 0xc0006d3660, 0x10)"
time="2020-11-09T01:16:55-06:00" level=debug msg="\t/usr/local/go/src/crypto/tls/handshake_server.go:40 +0x45"
time="2020-11-09T01:16:55-06:00" level=debug msg="crypto/tls.(*Conn).Handshake(0xc0002e2000, 0x0, 0x0)"
time="2020-11-09T01:16:55-06:00" level=debug msg="\t/usr/local/go/src/crypto/tls/conn.go:1362 +0xc9"
time="2020-11-09T01:16:55-06:00" level=debug msg="net/http.(*conn).serve(0xc0004386e0, 0x39ea460, 0xc0002d5530)"
time="2020-11-09T01:16:55-06:00" level=debug msg="\t/usr/local/go/src/net/http/server.go:1817 +0x1a5"
time="2020-11-09T01:16:55-06:00" level=debug msg="created by net/http.(*Server).Serve"
time="2020-11-09T01:16:55-06:00" level=debug msg="\t/usr/local/go/src/net/http/server.go:2969 +0x36c"
time="2020-11-09T01:16:55-06:00" level=debug msg="No default certificate, generating one"
time="2020-11-09T01:16:55-06:00" level=debug msg="No entryPoint defined for this router, using the default one(s) instead: [web websecure]" routerName=dashboard
time="2020-11-09T01:16:55-06:00" level=debug msg="No entryPoint defined for this router, using the default one(s) instead: [web websecure]" routerName=whoami
time="2020-11-09T01:16:55-06:00" level=debug msg="Added outgoing tracing middleware api@internal" routerName=dashboard@docker middlewareName=tracing middlewareType=TracingForwarder entryPointName=web
time="2020-11-09T01:16:55-06:00" level=debug msg="Creating middleware" entryPointName=web routerName=dashboard@docker middlewareName=auth@docker middlewareType=BasicAuth
time="2020-11-09T01:16:55-06:00" level=debug msg="Adding tracing to middleware" entryPointName=web routerName=dashboard@docker middlewareName=auth@docker
time="2020-11-09T01:16:55-06:00" level=debug msg="Creating middleware" middlewareName=pipelining middlewareType=Pipelining entryPointName=web routerName=whoami@docker serviceName=whoami-compose
time="2020-11-09T01:16:55-06:00" level=debug msg="Creating load-balancer" routerName=whoami@docker serviceName=whoami-compose entryPointName=web
time="2020-11-09T01:16:55-06:00" level=debug msg="Creating server 0 http://10.30.0.2:80" serverName=0 entryPointName=web routerName=whoami@docker serviceName=whoami-compose
time="2020-11-09T01:16:55-06:00" level=debug msg="Added outgoing tracing middleware whoami-compose" middlewareType=TracingForwarder entryPointName=web routerName=whoami@docker middlewareName=tracing
time="2020-11-09T01:16:55-06:00" level=debug msg="Creating middleware" middlewareName=traefik-internal-recovery middlewareType=Recovery entryPointName=web
time="2020-11-09T01:16:55-06:00" level=debug msg="Creating middleware" entryPointName=websecure middlewareName=traefik-internal-recovery middlewareType=Recovery
time="2020-11-09T01:16:55-06:00" level=debug msg="No default certificate, generating one"
time="2020-11-09T01:16:56-06:00" level=debug msg="Try to challenge certificate for domain [traefik.xxxxxxx.com] found in HostSNI rule" providerName=le.acme routerName=dashboard@docker rule="Host(`traefik.xxxxxxx.com`) && (PathPrefix(`/api`) || PathPrefix(`/dashboard`))"
time="2020-11-09T01:16:56-06:00" level=debug msg="Looking for provided certificate(s) to validate [\"whoami.xxxxxxx.com\"]..." providerName=le.acme
time="2020-11-09T01:16:56-06:00" level=debug msg="Domains [\"whoami.xxxxxxx.com\"] need ACME certificates generation for domains \"whoami.xxxxxxx.com\"." providerName=le.acme
time="2020-11-09T01:16:56-06:00" level=debug msg="Loading ACME certificates [whoami.xxxxxxx.com]..." providerName=le.acme
time="2020-11-09T01:16:56-06:00" level=debug msg="Looking for provided certificate(s) to validate [\"traefik.xxxxxxx.com\"]..." providerName=le.acme routerName=dashboard@docker rule="Host(`traefik.xxxxxxx.com`) && (PathPrefix(`/api`) || PathPrefix(`/dashboard`))"
time="2020-11-09T01:16:56-06:00" level=debug msg="Domains [\"traefik.xxxxxxx.com\"] need ACME certificates generation for domains \"traefik.xxxxxxx.com\"." providerName=le.acme routerName=dashboard@docker rule="Host(`traefik.xxxxxxx.com`) && (PathPrefix(`/api`) || PathPrefix(`/dashboard`))"
time="2020-11-09T01:16:56-06:00" level=debug msg="Loading ACME certificates [traefik.xxxxxxx.com]..." rule="Host(`traefik.xxxxxxx.com`) && (PathPrefix(`/api`) || PathPrefix(`/dashboard`))" providerName=le.acme routerName=dashboard@docker
time="2020-11-09T01:16:56-06:00" level=debug msg="Serving default certificate for request: \"traefik.xxxxxxx.com\""
time="2020-11-09T01:16:56-06:00" level=debug msg="http: TLS handshake error from 10.0.1.184:63015: remote error: tls: bad certificate"
time="2020-11-09T01:16:57-06:00" level=debug msg="Serving default certificate for request: \"traefik.xxxxxxx.com\""
time="2020-11-09T01:16:57-06:00" level=debug msg="http: TLS handshake error from 10.0.1.184:63016: remote error: tls: unknown certificate"
time="2020-11-09T01:16:57-06:00" level=debug msg="Building ACME client..." providerName=le.acme
time="2020-11-09T01:16:57-06:00" level=debug msg="https://acme-v02.api.letsencrypt.org/directory" providerName=le.acme
time="2020-11-09T01:16:58-06:00" level=debug msg="Serving default certificate for request: \"traefik.xxxxxxx.com\""
time="2020-11-09T01:16:58-06:00" level=debug msg="http: TLS handshake error from 10.0.1.184:63008: remote error: tls: bad certificate"
time="2020-11-09T01:16:58-06:00" level=info msg=Register... providerName=le.acme
time="2020-11-09T01:16:58-06:00" level=debug msg="legolog: [INFO] acme: Registering account for xxxxx@gmail.com"
time="2020-11-09T01:16:58-06:00" level=debug msg="Using DNS Challenge provider: cloudflare" providerName=le.acme
time="2020-11-09T01:16:58-06:00" level=debug msg="legolog: [INFO] [whoami.xxxxxxx.com] acme: Obtaining bundled SAN certificate"
time="2020-11-09T01:16:58-06:00" level=debug msg="legolog: [INFO] [traefik.xxxxxxx.com] acme: Obtaining bundled SAN certificate"
time="2020-11-09T01:16:58-06:00" level=debug msg="legolog: [INFO] [whoami.xxxxxxx.com] AuthURL: https://acme-v02.api.letsencrypt.org/acme/authz-v3/8473265437"
time="2020-11-09T01:16:58-06:00" level=debug msg="legolog: [INFO] [whoami.xxxxxxx.com] acme: Could not find solver for: tls-alpn-01"
time="2020-11-09T01:16:58-06:00" level=debug msg="legolog: [INFO] [whoami.xxxxxxx.com] acme: Could not find solver for: http-01"
time="2020-11-09T01:16:58-06:00" level=debug msg="legolog: [INFO] [whoami.xxxxxxx.com] acme: use dns-01 solver"
time="2020-11-09T01:16:58-06:00" level=debug msg="legolog: [INFO] [whoami.xxxxxxx.com] acme: Preparing to solve DNS-01"
time="2020-11-09T01:16:58-06:00" level=debug msg="legolog: [INFO] [traefik.xxxxxxx.com] AuthURL: https://acme-v02.api.letsencrypt.org/acme/authz-v3/8473265461"
time="2020-11-09T01:16:58-06:00" level=debug msg="legolog: [INFO] [traefik.xxxxxxx.com] acme: Could not find solver for: tls-alpn-01"
time="2020-11-09T01:16:58-06:00" level=debug msg="legolog: [INFO] [traefik.xxxxxxx.com] acme: Could not find solver for: http-01"
time="2020-11-09T01:16:58-06:00" level=debug msg="legolog: [INFO] [traefik.xxxxxxx.com] acme: use dns-01 solver"
time="2020-11-09T01:16:58-06:00" level=debug msg="legolog: [INFO] [traefik.xxxxxxx.com] acme: Preparing to solve DNS-01"
time="2020-11-09T01:16:59-06:00" level=debug msg="legolog: [INFO] [whoami.xxxxxxx.com] acme: Cleaning DNS-01 challenge"
time="2020-11-09T01:16:59-06:00" level=debug msg="Serving default certificate for request: \"traefik.xxxxxxx.com\""
time="2020-11-09T01:16:59-06:00" level=debug msg="http: TLS handshake error from 10.0.1.184:63009: remote error: tls: unknown certificate"
time="2020-11-09T01:16:59-06:00" level=debug msg="legolog: [WARN] [whoami.xxxxxxx.com] acme: cleaning up failed: cloudflare: failed to find zone com.: Zone could not be found "
time="2020-11-09T01:16:59-06:00" level=debug msg="legolog: [INFO] [traefik.xxxxxxx.com] acme: Cleaning DNS-01 challenge"
time="2020-11-09T01:16:59-06:00" level=debug msg="legolog: [INFO] Deactivating auth: https://acme-v02.api.letsencrypt.org/acme/authz-v3/8473265437"
time="2020-11-09T01:16:59-06:00" level=error msg="Unable to obtain ACME certificate for domains \"whoami.xxxxxxx.com\" : unable to generate a certificate for the domains [whoami.xxxxxxx.com]: error: one or more domains had a problem:\n[whoami.xxxxxxx.com] [whoami.xxxxxxx.com] acme: error presenting token: cloudflare: failed to find zone com.: Zone could not be found\n" providerName=le.acme
time="2020-11-09T01:16:59-06:00" level=debug msg="legolog: [WARN] [traefik.xxxxxxx.com] acme: cleaning up failed: cloudflare: failed to find zone com.: Zone could not be found "
time="2020-11-09T01:16:59-06:00" level=debug msg="legolog: [INFO] Deactivating auth: https://acme-v02.api.letsencrypt.org/acme/authz-v3/8473265461"
time="2020-11-09T01:16:59-06:00" level=error msg="Unable to obtain ACME certificate for domains \"traefik.xxxxxxx.com\": unable to generate a certificate for the domains [traefik.xxxxxxx.com]: error: one or more domains had a problem:\n[traefik.xxxxxxx.com] [traefik.xxxxxxx.com] acme: error presenting token: cloudflare: failed to find zone com.: Zone could not be found\n" providerName=le.acme routerName=dashboard@docker rule="Host(`traefik.xxxxxxx.com`) && (PathPrefix(`/api`) || PathPrefix(`/dashboard`))"
time="2020-11-09T01:17:01-06:00" level=debug msg="Serving default certificate for request: \"traefik.xxxxxxx.com\""
time="2020-11-09T01:17:01-06:00" level=debug msg="http: TLS handshake error from 10.0.1.184:63018: remote error: tls: bad certificate"
Unfortunately thats a mighty long log however I think the relevant error is:
time="2020-11-09T01:16:59-06:00" level=error msg="Unable to obtain ACME certificate for domains \"whoami.xxxxxxx.com\" : unable to generate a certificate for the domains [whoami.xxxxxxx.com]: error: one or more domains had a problem:\n[whoami.xxxxxxx.com] [whoami.xxxxxxx.com] acme: error presenting token: cloudflare: failed to find zone com.: Zone could not be found\n" providerName=le.acme
Before complaining here I came across a similar report within traefik's github:
https://github.com/traefik/traefik/issues/4575.
Although a solution was not specifically given the OP felt it to be a problem with name resolution.
I'm not specifically sure is this is a problem in my case. I'm using pfsense in front of my servers with a DNS resolver. Within the traefik container I can perform a nslookup of cloudflare.com and it resolves.
What else can I try?