No dashboard with 2.0.0-rc3

Hello all,

First of all thank you for this amazing peace of software, especially now with tcp support! Recently i moved to Traefik for my Docker Swam and I am very happy about it :slight_smile:

Currently I am running 2.0.0-rc2 but when i try to run 2.0.0-rc3 no dashboard is accessible, an " This site can’t be reached" is displayed.

Find below the docker compose I use:

################################################################################
# Traefik Stack
################################################################################
#$ docker stack deploy proxy -c docker-compose-traefik_v2.yml
################################################################################
version: "3.7"
services:
  traefik:
    image: traefik:v2.0.0-rc3-alpine
    networks:
      - traefik-net
    ports:
      - "80:80"
      - "8082:8080"
      - "1883:1883"
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - /mnt/docker-cluster/traefik/traefik.yml:/etc/traefik/traefik.yml
    deploy:
      placement:
        constraints:
          - node.role == manager
      labels:
        - traefik.enable=true
        - traefik.docker.network=proxy_traefik-net
        - traefik.http.routers.traefik.rule=Host(`traefik.indonesia`)
        - traefik.http.services.traefik.loadbalancer.server.port=8082

networks:
  traefik-net:

And this traefik.yml:

global:
  sendAnonymousUsage: true

entryPoints:
  web:
    address: ":80"
  web-secure:
    address: ":443"
  rabbit-mq:
    address: ":1883"

api:
  dashboard: true
  debug: true

################################################################
# Ping configuration
################################################################

# Enable ping
ping: {}

  # Name of the related entry point
  #
  # Optional
  # Default: "traefik"
  #
  # entryPoint = "traefik"  


################################################################
# Docker configuration backend
################################################################

# Enable Docker configuration backend
providers:
  docker:
    #endpoint: "unix:///var/run/docker.sock"
    endpoint: "tcp://cluster.indonesia:2375"
    watch: true
    exposedByDefault: false
    # useBindPortIP: true
    swarmMode: true

Docker service logs don't show anything usefull:

docker service logs siudtaknvcia
proxy_traefik.1.upxi9bmav13b@mac-mini-1    | time="2019-09-12T08:31:19+02:00" level=info msg="Configuration loaded from file: /etc/traefik/traefik.yml"

What I am doing wrong here?

Regards,
Ray

Hello,

We introduce a new security system for the API in the RC3.

So you have two solution.

Solution 1:

api:
  dashboard: true
  insecure: true

Solution 2 (recommended):

api:
  dashboard: true
  # insecure: false
services:
  traefik:
    image: traefik:v2.0.0-rc3-alpine
    networks:
      - traefik-net
    ports:
      - "80:80"
      - "1883:1883"
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - /mnt/docker-cluster/traefik/traefik.yml:/etc/traefik/traefik.yml
    deploy:
      placement:
        constraints:
          - node.role == manager
      labels:
        - traefik.enable=true
        - traefik.docker.network=proxy_traefik-net
        - traefik.http.routers.traefik.rule=Host(`traefik.indonesia`)
        - traefik.http.routers.traefik.service=api@internal
1 Like

Thanks for your quick reply Idez! It works perfectly now :ok_hand:t4:.

The new dashboard pages look great!

Thank you :sunglasses:

Sorry to disturb you again, i've tried solution 2, but it does'nt work for me.

the error i get is:

proxy_traefik.1.24qjo0x445dv@mac-mini-1    | time="2019-09-12T20:22:00+02:00" level=error msg="port is missing" providerName=docker container=proxy_traefik-24qjo0x445dv71wpukd3ebkgh

Used Docker stack:

version: "3.7"
services:
  traefik:
    image: traefik:v2.0.0-rc3-alpine
    environment:
      - TZ=Europe/Amsterdam
    networks:
      - traefik-net
    ports:
      - "80:80"
      - "1883:1883"
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - /mnt/docker-cluster/traefik/traefik.yml:/etc/traefik/traefik.yml
    deploy:
      placement:
        constraints:
          - node.role == manager
      labels:
        - traefik.enable=true
        - traefik.docker.network=proxy_traefik-net
        - traefik.http.routers.traefik.rule=Host(`traefik.indonesia`)
        - traefik.http.routers.traefik.service=api@internal

networks:
  traefik-net:

And the used traefik.yml:

global:
  sendAnonymousUsage: true

entryPoints:
  web:
    address: ":80"
  web-secure:
    address: ":443"
  rabbit-mq:
    address: ":1883"

api:
  dashboard: true
  debug: true
  #insecure: true

################################################################
# Ping configuration
################################################################

# Enable ping
ping: {}

  # Name of the related entry point
  #
  # Optional
  # Default: "traefik"
  #
  # entryPoint = "traefik"  


################################################################
# Docker configuration backend
################################################################

# Enable Docker configuration backend
providers:
  docker:
    #endpoint: "unix:///var/run/docker.sock"
    endpoint: "tcp://cluster.indonesia:2375"
    watch: true
    exposedByDefault: false
    # useBindPortIP: true
    swarmMode: true

Got it working now with the following config:

docker stack

################################################################################
# Traefik Stack
################################################################################
#$ docker stack deploy proxy -c docker-compose-traefik_v2.yml
################################################################################
version: "3.7"
services:
  traefik:
    image: traefik:v2.0.0-rc3-alpine
    environment:
      - TZ=Europe/Amsterdam
    networks:
      - traefik-net
    ports:
      - "80:80"
      - "8082:8080"
      - "1883:1883"
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - /mnt/docker-cluster/traefik/traefik.yml:/etc/traefik/traefik.yml
    deploy:
      placement:
        constraints:
          - node.role == manager
      labels:
        - traefik.enable=true
        - traefik.docker.network=proxy_traefik-net
        - traefik.http.routers.traefik.rule=Host(`traefik.indonesia`)
        - traefik.http.routers.traefik.service=api@internal
        - traefik.http.services.traefik.loadbalancer.server.port=8082
networks:
  traefik-net:

traefik.yml

global:
  sendAnonymousUsage: true

entryPoints:
  web:
    address: ":80"
  web-secure:
    address: ":443"
  rabbit-mq:
    address: ":1883"

api:
  dashboard: true
  debug: true
  #insecure: true

################################################################
# Ping configuration
################################################################

# Enable ping
ping: {}

  # Name of the related entry point
  #
  # Optional
  # Default: "traefik"
  #
  # entryPoint = "traefik"  


################################################################
# Docker configuration backend
################################################################

# Enable Docker configuration backend
providers:
  docker:
    #endpoint: "unix:///var/run/docker.sock"
    endpoint: "tcp://cluster.indonesia:2375"
    watch: true
    exposedByDefault: false
    # useBindPortIP: true
    swarmMode: true

It's related to Docker Swarm, because Traefik cannot detect port.

I recommend that:

version: "3.7"
services:
  traefik:
    image: traefik:v2.0.0-rc3-alpine
    environment:
      - TZ=Europe/Amsterdam
    networks:
      - traefik-net
    ports:
      - "80:80"
      - "1883:1883"
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - /mnt/docker-cluster/traefik/traefik.yml:/etc/traefik/traefik.yml
    deploy:
      placement:
        constraints:
          - node.role == manager
      labels:
        - traefik.enable=true
        - traefik.docker.network=proxy_traefik-net
        - traefik.http.routers.traefik.rule=Host(`traefik.indonesia`)
        - traefik.http.routers.traefik.service=api@internal
        - traefik.http.services.traefik.loadbalancer.server.port=8080
networks:
  traefik-net:

Note: I remove the port mapping "8082:8080" because it's not needed.

1 Like