I have ports open and a new shiny docker-compose.yml with only one other container, still I get this error:
time="2020-02-24T21:21:05Z" level=error msg="Unable to obtain ACME certificate for domains \"whoami.palmhierta.se\": unable to generate a certificate for the domains [whoami.palmhierta.se]: acme: Error -> One or more domains had a problem:\n[whoami.palmhierta.se] acme: error: 400 :: urn:ietf:params:acme:error:connection :: Fetching http://whoami.palmhierta.se/.well-known/acme-challenge/jSzcww8-vPDf4IJ2CAde1k0V2a8RqiKG_jmP3X_aVqs: Timeout during connect (likely firewall problem), url: \n" providerName=le.acme routerName=whoami@docker rule="Host(`whoami.palmhierta.se`)"
this is my configs:
version: "3"
services:
traefik:
image: "traefik:latest"
ports:
- "80:80"
- "443:443"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /D/docker/traefikintro/traefik.yml:/etc/traefik/traefik.yaml:ro
- "/traefik2/acme.json:/acme.json"
labels:
- "traefik.enable=true"
#
# HTTP to HTTPS redirection
- "traefik.http.routers.http_catchall.rule=HostRegexp(`{any:.+}`)"
- "traefik.http.routers.http_catchall.entrypoints=unsecure"
- "traefik.http.routers.http_catchall.middlewares=https_redirect"
- "traefik.http.middlewares.https_redirect.redirectscheme.scheme=https"
- "traefik.http.middlewares.https_redirect.redirectscheme.permanent=true"
#
# Docker labels for enabling Traefik dashboard
- "traefik.http.routers.traefik.rule=Host(`traefik.palmhierta.se`)"
- "traefik.http.routers.traefik.entrypoints=secure"
- "traefik.http.routers.traefik.service=api@internal"
- "traefik.http.routers.traefik.tls.certresolver=le"
#
whoami:
image: containous/whoami
labels:
- traefik.enable=true
- traefik.http.routers.whoami.rule=Host(`whoami.palmhierta.se`)
- traefik.http.routers.whoami.tls.certresolver=le
- traefik.http.routers.whoami.service=whoami
- traefik.http.services.whoami.loadbalancer.server.port=80
#
networks:
default:
external:
name: "traefik-network"
#Traefik.yml
#Define HTTP and HTTPS entrypoints
entryPoints:
unsecure:
address: ":80"
secure:
address: ":443"
#Dynamic configuration will come from docker labels
providers:
docker:
endpoint: "unix:///var/run/docker.sock"
network: "traefik-network"
exposedByDefault: false
#Enable acme with http file challenge
certificatesResolvers:
le:
acme:
email: mymail@mail.com
storage: /acme.json
httpChallenge:
# used during the challenge
entryPoint: unsecure
#Add this somewhere in file
api:
dashboard: true