i'm trying to setup traefik as reverse proxy for my service . i purchased domain in godaddy . trying to configure secure connection (TLS),
level=error msg="Unable to obtain ACME certificate for domains \"test.XXX.com\": unable to generate a certificate for the domains [test.XXX.com]: acme: Error -> One or more domains had a problem:\n[test.XXX.com] time limit exceeded: last error: NS ns25.domaincontrol.com. returned NXDOMAIN for _acme-challenge.test.XXX.com.\n" providerName=myresolver.acme routerName=whoami@docker rule="Host(`test.XXX.com`)"
Note : i just replaced my exact domain name with test.XXX.com
image: "traefik:v2.2"
version: "3.3"
services:
traefik:
image: "traefik:v2.2"
container_name: "traefik"
command:
# - "--log.level=DEBUG"
- "--api.insecure=true"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.web.address=:80"
- "--entrypoints.websecure.address=:443"
- "--certificatesresolvers.myresolver.acme.dnschallenge=true"
- "--certificatesresolvers.myresolver.acme.dnschallenge.provider=godaddy"
#- "--certificatesresolvers.myresolver.acme.caserver=https://acme-staging-v02.api.letsencrypt.org/directory"
- "--certificatesresolvers.myresolver.acme.email=amose.cd@domain"
- "--certificatesresolvers.myresolver.acme.storage=/letsencrypt/acme.json"
ports:
- "80:80"
- "443:443"
- "8080:8080"
environment:
- "GODADDY_API_KEY=XXXXX"
- "GODADDY_API_SECRET=XXXXXX"
volumes:
- "./letsencrypt:/letsencrypt"
- "/var/run/docker.sock:/var/run/docker.sock:ro"
whoami:
image: "containous/whoami"
container_name: "simple-service"
labels:
- "traefik.enable=true"
- "traefik.http.routers.whoami.rule=Host(`test.XXX.com`)"
- "traefik.http.routers.whoami.entrypoints=websecure"
- "traefik.http.routers.whoami.tls.certresolver=myresolver"
PS E:\wearehex\api_gateway\playground_traefik\https> docker-compose up
Recreating traefik ... done
Starting simple-service ... done
Attaching to simple-service, traefik
simple-service | Starting up on port 80
traefik | time="2020-03-30T18:23:01Z" level=info msg="Configuration loaded from flags."
traefik | time="2020-03-30T18:23:01Z" level=info msg="Traefik version 2.2.0 built on 2020-03-25T17:32:57Z"
traefik | time="2020-03-30T18:23:01Z" level=debug msg="Static configuration loaded {\"global\":{\"checkNewVersion\":true},\"serversTransport\":{\"maxIdleConnsPerHost\":200},\"entryPoints\":{\"traefik\":{\"address\":\":8080\",\"transport\":{\"lifeCycle\":{\"graceTimeOut\":10000000000},\"respondingTimeouts\":{\"idleTimeout\":180000000000}},\"forwardedHeaders\":{},\"http\":{}},\"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 }}`)\",\"swarmModeRefreshSeconds\":15000000000}},\"api\":{\"insecure\":true,\"dashboard\":true},\"log\":{\"level\":\"DEBUG\",\"format\":\"common\"},\"certificatesResolvers\":{\"myresolver\":{\"acme\":{\"email\":\"amose.cd@lynk.co.in\",\"caServer\":\"https://acme-v02.api.letsencrypt.org/directory\",\"storage\":\"/letsencrypt/acme.json\",\"keyType\":\"RSA4096\",\"dnsChallenge\":{\"provider\":\"godaddy\"}}}}}"
traefik | time="2020-03-30T18:23:01Z" level=info msg="\nStats collection is disabled.\nHelp us improve Traefik by turning this feature on :)\nMore details on: https://docs.traefik.io/contributing/data-collection/\n"
traefik | time="2020-03-30T18:23:01Z" level=error msg="The ACME resolver \"myresolver\" is skipped from the resolvers list because: unable to get ACME account: permissions 755 for /letsencrypt/acme.json are too open, please use 600"
traefik | time="2020-03-30T18:23:01Z" level=info msg="Starting provider aggregator.ProviderAggregator {}"
traefik | time="2020-03-30T18:23:01Z" level=debug msg="Start TCP Server" entryPointName=traefik
traefik | time="2020-03-30T18:23:01Z" level=debug msg="Start TCP Server" entryPointName=websecure
traefik | time="2020-03-30T18:23:01Z" level=debug msg="Start TCP Server" entryPointName=web
traefik | time="2020-03-30T18:23:01Z" level=info msg="Starting provider *traefik.Provider {}"
traefik | time="2020-03-30T18:23:01Z" level=info msg="Starting provider *docker.Provider {\"watch\":true,\"endpoint\":\"unix:///var/run/docker.sock\",\"defaultRule\":\"Host(`{{ normalize .Name }}`)\",\"swarmModeRefreshSeconds\":15000000000}"
traefik | time="2020-03-30T18:23:01Z" level=debug msg="Configuration received from provider internal: {\"http\":{\"routers\":{\"api\":{\"entryPoints\":[\"traefik\"],\"service\":\"api@internal\",\"rule\":\"PathPrefix(`/api`)\",\"priority\":2147483646},\"dashboard\":{\"entryPoints\":[\"traefik\"],\"middlewares\":[\"dashboard_redirect@internal\",\"dashboard_stripprefix@internal\"],\"service\":\"dashboard@internal\",\"rule\":\"PathPrefix(`/`)\",\"priority\":2147483645}},\"services\":{\"api\":{},\"dashboard\":{},\"noop\":{}},\"middlewares\":{\"dashboard_redirect\":{\"redirectRegex\":{\"regex\":\"^(http:\\\\/\\\\/[^:\\\\/]+(:\\\\d+)?)\\\\/$\",\"replacement\":\"${1}/dashboard/\",\"permanent\":true}},\"dashboard_stripprefix\":{\"stripPrefix\":{\"prefixes\":[\"/dashboard/\",\"/dashboard\"]}}}},\"tcp\":{},\"tls\":{}}" providerName=internal
traefik | time="2020-03-30T18:23:01Z" level=debug msg="Added outgoing tracing middleware api@internal" middlewareType=TracingForwarder entryPointName=traefik routerName=api@internal middlewareName=tracing
traefik | time="2020-03-30T18:23:01Z" level=debug msg="Added outgoing tracing middleware dashboard@internal" middlewareName=tracing routerName=dashboard@internal entryPointName=traefik middlewareType=TracingForwarder
traefik | time="2020-03-30T18:23:01Z" level=debug msg="Creating middleware" entryPointName=traefik routerName=dashboard@internal middlewareName=dashboard_stripprefix@internal middlewareType=StripPrefix
traefik | time="2020-03-30T18:23:01Z" level=debug msg="Adding tracing to middleware" entryPointName=traefik routerName=dashboard@internal middlewareName=dashboard_stripprefix@internal
traefik | time="2020-03-30T18:23:01Z" level=debug msg="Creating middleware" routerName=dashboard@internal middlewareName=dashboard_redirect@internal middlewareType=RedirectRegex entryPointName=traefik
traefik | time="2020-03-30T18:23:01Z" level=debug msg="Setting up redirection from ^(http:\\/\\/[^:\\/]+(:\\d+)?)\\/$ to ${1}/dashboard/" middlewareName=dashboard_redirect@internal middlewareType=RedirectRegex entryPointName=traefik routerName=dashboard@internal
traefik | time="2020-03-30T18:23:01Z" level=debug msg="Adding tracing to middleware" entryPointName=traefik routerName=dashboard@internal middlewareName=dashboard_redirect@internal
traefik | time="2020-03-30T18:23:01Z" level=debug msg="Creating middleware" middlewareType=Recovery entryPointName=traefik middlewareName=traefik-internal-recovery
traefik | time="2020-03-30T18:23:01Z" level=debug msg="No default certificate, generating one"
traefik | time="2020-03-30T18:23:01Z" level=debug msg="Provider connection established with docker 19.03.5 (API 1.40)" providerName=docker
traefik | time="2020-03-30T18:23:01Z" level=debug msg="Filtering disabled container" providerName=docker container=traefik-https-5938fdf71fdf85924ca6d9fc41534f18e9ed20d01f6f5257894838dbe7437ab4
traefik | time="2020-03-30T18:23:01Z" level=debug msg="Configuration received from provider docker: {\"http\":{\"routers\":{\"whoami\":{\"entryPoints\":[\"websecure\"],\"service\":\"whoami-https\",\"rule\":\"Host(`test.XXX.com`)\",\"tls\":{\"certResolver\":\"myresolver\"}}},\"services\":{\"whoami-https\":{\"loadBalancer\":{\"servers\":[{\"url\":\"http://172.18.0.2:80\"}],\"passHostHeader\":true}}}},\"tcp\":{},\"udp\":{}}" providerName=docker
traefik | time="2020-03-30T18:23:01Z" level=debug msg="Added outgoing tracing middleware dashboard@internal" middlewareName=tracing middlewareType=TracingForwarder entryPointName=traefik routerName=dashboard@internal
traefik | time="2020-03-30T18:23:01Z" level=debug msg="Creating middleware" middlewareType=StripPrefix entryPointName=traefik routerName=dashboard@internal middlewareName=dashboard_stripprefix@internal
traefik | time="2020-03-30T18:23:01Z" level=debug msg="Adding tracing to middleware" entryPointName=traefik routerName=dashboard@internal middlewareName=dashboard_stripprefix@internal
traefik | time="2020-03-30T18:23:01Z" level=debug msg="Creating middleware" entryPointName=traefik routerName=dashboard@internal middlewareName=dashboard_redirect@internal middlewareType=RedirectRegex
traefik | time="2020-03-30T18:23:01Z" level=debug msg="Setting up redirection from ^(http:\\/\\/[^:\\/]+(:\\d+)?)\\/$ to ${1}/dashboard/" routerName=dashboard@internal middlewareName=dashboard_redirect@internal middlewareType=RedirectRegex entryPointName=traefik
traefik | time="2020-03-30T18:23:01Z" level=debug msg="Adding tracing to middleware" middlewareName=dashboard_redirect@internal entryPointName=traefik routerName=dashboard@internal
traefik | time="2020-03-30T18:23:01Z" level=debug msg="Added outgoing tracing middleware api@internal" entryPointName=traefik routerName=api@internal middlewareName=tracing middlewareType=TracingForwarder
traefik | time="2020-03-30T18:23:01Z" level=debug msg="Creating middleware" entryPointName=traefik middlewareType=Recovery middlewareName=traefik-internal-recovery
traefik | time="2020-03-30T18:23:01Z" level=debug msg="Creating middleware" entryPointName=websecure routerName=whoami@docker serviceName=whoami-https middlewareName=pipelining middlewareType=Pipelining
traefik | time="2020-03-30T18:23:01Z" level=debug msg="Creating load-balancer" entryPointName=websecure routerName=whoami@docker serviceName=whoami-https
traefik | time="2020-03-30T18:23:01Z" level=debug msg="Creating server 0 http://172.18.0.2:80" routerName=whoami@docker serviceName=whoami-https serverName=0 entryPointName=websecure
traefik | time="2020-03-30T18:23:01Z" level=debug msg="Added outgoing tracing middleware whoami-https" routerName=whoami@docker middlewareName=tracing middlewareType=TracingForwarder entryPointName=websecure
traefik | time="2020-03-30T18:23:01Z" level=debug msg="Creating middleware" middlewareType=Recovery entryPointName=websecure middlewareName=traefik-internal-recovery
traefik | time="2020-03-30T18:23:01Z" level=debug msg="No default certificate, generating one"
traefik | time="2020-03-30T18:23:01Z" level=error msg="the router whoami@docker uses a non-existent resolver: myresolver"