404 on dashboard or other ressources

Hello guys, I am currently facing an error, which always shows me an 404 page when i try to access the dashboard through "manage.example.com". I am using Docker Swarm with the Following Setup.

Docker Compose
version: "3.3"
services:

  traefik:
    image: "traefik:v2.4"
    container_name: traefik
    restart: always
    command:
      - "--api.dashboard=true"
    
      - "--providers.docker=true"
      - "--providers.docker.exposedbydefault=false"
      - "--providers.docker.endpoint=unix:///var/run/docker.sock"
      - "--providers.docker.swarmmode"
      - "--providers.docker.network=traefik-default"
      
      - "--entrypoints.websecure.address=:443"
      - "--entrypoints.web.address=:80"
      
      # Global HTTP -> HTTPS
      #- "--entrypoints.web.http.redirections.entryPoint.to=websecure"
      #- "--entrypoints.web.http.redirections.entryPoint.scheme=https"
      
      - "--accesslog"
      - "--log.level=DEBUG"
    ports:
      - target: 80
        published: 80
        mode: host
      - target: 443
        published: 443
        mode: host
    expose:
      - "8080:8080"
    volumes:
      - "/etc/localtime:/etc/localtime:ro"
      - "/etc/timezone:/etc/timezone:ro"
      - "/var/run/docker.sock:/var/run/docker.sock:ro"
    deploy:
      labels:
      - "traefik.enable=true"
      - "traefik.http.routers.dashboard.rule=Host(`manage.example.com`)"
      - "traefik.http.routers.dashboard.entrypoints=websecure"
      - "traefik.http.routers.dashboard.service=api@internal"
      - "traefik.http.services.dashboard.loadbalancer.server.port=8080"
      - "traefik.http.routers.dashboard.middlewares=traefik-auth"
      - "traefik.http.middlewares.traefik-auth.basicauth.users=admin:xxxxxxxxxxxxxxxxx"
      placement:
        constraints:
          - "node.labels.NODE_DEV==yes"
    networks:
     - traefik-default
     
networks:
 traefik-default:
    external: true
Debug Log
time="2021-03-28T18:18:30+02:00" level=info msg="Configuration loaded from flags.",
time="2021-03-28T18:18:30+02:00" level=info msg="Traefik version 2.4.8 built on 2021-03-23T15:48:39Z",
time="2021-03-28T18:18:30+02: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 }}`)\",\"swarmMode\":true,\"network\":\"traefik-default\",\"swarmModeRefreshSeconds\":15000000000}},\"api\":{\"dashboard\":true},\"log\":{\"level\":\"DEBUG\",\"format\":\"common\"},\"accessLog\":{\"format\":\"common\",\"filters\":{},\"fields\":{\"defaultMode\":\"keep\",\"headers\":{\"defaultMode\":\"drop\"}}},\"pilot\":{\"dashboard\":true}}",
time="2021-03-28T18:18:30+02: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="2021-03-28T18:18:30+02:00" level=info msg="Starting provider aggregator.ProviderAggregator {}",
time="2021-03-28T18:18:30+02:00" level=debug msg="Start TCP Server" entryPointName=websecure,
time="2021-03-28T18:18:30+02:00" level=info msg="Starting provider *acme.ChallengeTLSALPN {\"Timeout\":4000000000}",
time="2021-03-28T18:18:30+02:00" level=info msg="Starting provider *traefik.Provider {}",
time="2021-03-28T18:18:30+02:00" level=debug msg="Start TCP Server" entryPointName=web,
time="2021-03-28T18:18:30+02:00" level=info msg="Starting provider *docker.Provider {\"watch\":true,\"endpoint\":\"unix:///var/run/docker.sock\",\"defaultRule\":\"Host(`{{ normalize .Name }}`)\",\"swarmMode\":true,\"network\":\"traefik-default\",\"swarmModeRefreshSeconds\":15000000000}",
time="2021-03-28T18:18:30+02:00" level=debug msg="Configuration received from provider internal: {\"http\":{\"services\":{\"api\":{},\"dashboard\":{},\"noop\":{}},\"serversTransports\":{\"default\":{\"maxIdleConnsPerHost\":200}}},\"tcp\":{},\"tls\":{}}" providerName=internal,
time="2021-03-28T18:18:30+02:00" level=debug msg="No default certificate, generating one",
time="2021-03-28T18:18:30+02:00" level=debug msg="Provider connection established with docker 20.10.5 (API 1.41)" providerName=docker,
time="2021-03-28T18:18:30+02:00" level=debug msg="Filtering disabled container" providerName=docker container=dev-maven-repo-dc0oflaexwrqpauskfubbsufi,
time="2021-03-28T18:18:30+02:00" level=debug msg="Filtering disabled container" container=portainer-agent-e7cl5ws0duhbdbyjbwrwyvd74 providerName=docker,
time="2021-03-28T18:18:30+02:00" level=debug msg="Filtering disabled container" container=portainer-agent-vzmw0hsgtjx4yvm2oggctta6v providerName=docker,
time="2021-03-28T18:18:30+02:00" level=debug msg="Filtering disabled container" providerName=docker container=database-redis-fqaio99q601bf0ztjq7uy8fp1,
time="2021-03-28T18:18:30+02:00" level=debug msg="Filtering disabled container" container=database-arangodb-c1r7c5lzrco97t1w186kmucec providerName=docker,
time="2021-03-28T18:18:30+02:00" level=debug msg="Filtering disabled container" providerName=docker container=dolphin-rabbitmq-l2umg5f0v617ks8jks24g5my0,
time="2021-03-28T18:18:30+02:00" level=debug msg="Filtering disabled container" providerName=docker container=dev-jenkins-6wbmrzb1y76xgufs3ijjj83qx,
time="2021-03-28T18:18:30+02:00" level=debug msg="Filtering disabled container" providerName=docker container=dev-grafana-634dslfnoxl4wgeoewyalwpg5,
time="2021-03-28T18:18:30+02:00" level=debug msg="Filtering disabled container" providerName=docker container=database-influxdb-x4pl3pj5jslga0yo8uy3kudsn,
time="2021-03-28T18:18:30+02:00" level=debug msg="Filtering disabled container" providerName=docker container=database-mongdb-rw5bd1onyino4qs7sjb4ndek2,
time="2021-03-28T18:18:30+02:00" level=debug msg="Filtering disabled container" container=dev-docker-reg-t4gfz4r8g4u6l27acqx2ckqbk providerName=docker,
time="2021-03-28T18:18:30+02:00" level=debug msg="Filtering disabled container" container=dolphin-ci-mpwe2v8fbxxe61gy1219ylop8 providerName=docker,
time="2021-03-28T18:18:30+02:00" level=debug msg="Configuration received from provider docker: {\"http\":{\"routers\":{\"dashboard\":{\"entryPoints\":[\"websecure\"],\"middlewares\":[\"traefik-auth\"],\"service\":\"api@internal\",\"rule\":\"Host(`manage.example.com`)\"}},\"services\":{\"dashboard\":{\"loadBalancer\":{\"servers\":[{\"url\":\"http://10.0.6.4:8080\"}],\"passHostHeader\":true}}},\"middlewares\":{\"traefik-auth\":{\"basicAuth\":{\"users\":[\"admin:$1xxxxxxxxxxxxxxxx\"]}}}},\"tcp\":{},\"udp\":{}}" providerName=docker,
time="2021-03-28T18:18:30+02:00" level=debug msg="No default certificate, generating one",
time="2021-03-28T18:18:30+02:00" level=debug msg="Added outgoing tracing middleware api@internal" entryPointName=websecure routerName=dashboard@docker middlewareName=tracing middlewareType=TracingForwarder,
time="2021-03-28T18:18:30+02:00" level=debug msg="Creating middleware" middlewareName=traefik-auth@docker middlewareType=BasicAuth entryPointName=websecure routerName=dashboard@docker,
time="2021-03-28T18:18:30+02:00" level=debug msg="Adding tracing to middleware" routerName=dashboard@docker middlewareName=traefik-auth@docker entryPointName=websecure,
time="2021-03-28T18:18:30+02:00" level=debug msg="Creating middleware" middlewareType=Recovery entryPointName=websecure middlewareName=traefik-internal-recovery,
time="2021-03-28T18:18:30+02:00" level=debug msg="No default certificate, generating one",
time="2021-03-28T18:18:31+02:00" level=debug msg="No default certificate, generating one",
time="2021-03-28T18:18:45+02:00" level=debug msg="Filtering disabled container" providerName=docker container=dev-maven-repo-dc0oflaexwrqpauskfubbsufi,
time="2021-03-28T18:18:45+02:00" level=debug msg="Filtering disabled container" providerName=docker container=portainer-agent-e7cl5ws0duhbdbyjbwrwyvd74,
time="2021-03-28T18:18:45+02:00" level=debug msg="Filtering disabled container" providerName=docker container=portainer-agent-vzmw0hsgtjx4yvm2oggctta6v,
time="2021-03-28T18:18:45+02:00" level=debug msg="Filtering disabled container" container=database-redis-fqaio99q601bf0ztjq7uy8fp1 providerName=docker,
time="2021-03-28T18:18:45+02:00" level=debug msg="Filtering disabled container" providerName=docker container=database-arangodb-c1r7c5lzrco97t1w186kmucec,
time="2021-03-28T18:18:45+02:00" level=debug msg="Filtering disabled container" container=dolphin-rabbitmq-l2umg5f0v617ks8jks24g5my0 providerName=docker,
time="2021-03-28T18:18:45+02:00" level=debug msg="Filtering disabled container" container=dev-jenkins-6wbmrzb1y76xgufs3ijjj83qx providerName=docker,
time="2021-03-28T18:18:45+02:00" level=debug msg="Filtering disabled container" providerName=docker container=dev-grafana-634dslfnoxl4wgeoewyalwpg5,
time="2021-03-28T18:18:45+02:00" level=debug msg="Filtering disabled container" container=database-influxdb-x4pl3pj5jslga0yo8uy3kudsn providerName=docker,
time="2021-03-28T18:18:45+02:00" level=debug msg="Filtering disabled container" providerName=docker container=database-mongdb-rw5bd1onyino4qs7sjb4ndek2,
time="2021-03-28T18:18:45+02:00" level=debug msg="Filtering disabled container" providerName=docker container=dev-docker-reg-t4gfz4r8g4u6l27acqx2ckqbk,
time="2021-03-28T18:18:45+02:00" level=debug msg="Filtering disabled container" providerName=docker container=dolphin-ci-mpwe2v8fbxxe61gy1219ylop8,
time="2021-03-28T18:18:45+02:00" level=debug msg="Configuration received from provider docker: {\"http\":{\"routers\":{\"dashboard\":{\"entryPoints\":[\"websecure\"],\"middlewares\":[\"traefik-auth\"],\"service\":\"api@internal\",\"rule\":\"Host(`manage.example.com`)\"}},\"services\":{\"dashboard\":{\"loadBalancer\":{\"servers\":[{\"url\":\"http://10.0.6.4:8080\"}],\"passHostHeader\":true}}},\"middlewares\":{\"traefik-auth\":{\"basicAuth\":{\"users\":[\"admin:$1$xxxxxxxxxxxxxMEVTabY.\"]}}}},\"tcp\":{},\"udp\":{}}" providerName=docker,
time="2021-03-28T18:18:45+02:00" level=info msg="Skipping same configuration" providerName=docker,
time="2021-03-28T18:18:49+02:00" level=debug msg="Serving default certificate for request: \"manage.example.com\"",
time="2021-03-28T18:18:49+02:00" level=debug msg="Serving default certificate for request: \"manage.example.com\"",
time="2021-03-28T18:18:49+02:00" level=debug msg="Serving default certificate for request: \"manage.example.com\"",
time="2021-03-28T18:18:52+02:00" level=debug msg="Serving default certificate for request: \"manage.example.com\"",
89.xxx.xxx.xxx - - [28/Mar/2021:16:18:52 +0000] "GET / HTTP/2.0" - - "-" "-" 1 "-" "-" 0ms,
time="2021-03-28T18:18:52+02:00" level=debug msg="Serving default certificate for request: \"manage.example.com\"",

Hi @Likqez

Your router/entrypoint is not tls enabled. So the router is actually on http.

Adding - --entrypoints.websecure.http.tls=true to the traefik commands should result in expected outcome.

3 Likes

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.