Problem with routing traffic to container with non :80 port

Hi, Traefik is amazing pice of software. I stuck with routing traffic to container with non :80 port inside.
Fo example:

  • $MY_DOMAIN/whoami
  • $MY_DOMAIN/hello (nginx)

are working fine, but those not

  • $MY_DOMAIN/jaeger (jaegertracing/all-in-one)
  • $MY_DOMAIN/hot (jaegertracing/example-hotrod)
docker-compose file:
version: "3.7"

services:
   whoami:
    image: containous/whoami
    container_name: "whoami"
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.whoami.entrypoints=web"
      - "traefik.http.routers.whoami.rule=Host(`$MY_DOMAIN`) && PathPrefix(`/whoami`)"
    networks:
      - web

   nginx:
    image: nginx:latest
    container_name: "nginx"
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.nginx.entrypoints=web"
      - "traefik.http.routers.nginx.rule=Host(`$MY_DOMAIN`) && PathPrefix(`/hello`)"
    volumes:
      - "./index.html:/usr/share/nginx/html/hello/index.html:ro"
    networks:
      - web

   traefik:
    image: traefik:v2.2.1
    hostname: traefik
    container_name: traefik
    ports:
    - "8081:8080"
    - "80:80"
    - "443:443"
    volumes:
      - "/var/run/docker.sock:/var/run/docker.sock:ro"
      - "./traefik.yml:/traefik.yml:ro"
    networks:
      - web
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.api.rule=Host(`$MY_DOMAIN`) && PathPrefix(`/traefik`)"
      - "traefik.http.routers.api.service=api@internal"

   jaeger:
    image: jaegertracing/all-in-one:latest
    container_name: jaeger
    ports:
      - "5775:5775/udp"
      - "6831:6831/udp"
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.jaeger.rule=Host(`$MY_DOMAIN`) && PathPrefix(`/jaeger`)"
      - "traefik.http.routers.jaeger.service=jaeger@docker"
      - "traefik.http.services.jaeger.loadbalancer.server.port=16686"
      - "traefik.http.routers.jaeger.service=jaeger"
    networks:
      - web

   hotrod:
    image: jaegertracing/example-hotrod:1.17
    command: all
    container_name: hotrod
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.hotrod.service=hotrod@docker"
      - "traefik.http.routers.hotrod.rule=Host(`$MY_DOMAIN`) && PathPrefix(`/hot`)"
      - "traefik.http.routers.hotrod.service=hotrod"
      - "traefik.http.services.hotrod.loadbalancer.server.port=8080"
    environment:
      JAEGER_AGENT_HOST: "IP"
      JAEGER_AGENT_PORT: "6831"
    networks:
      - web

networks:
   web:
    external: true
traefik.yml
## STATIC CONFIGURATION
log:
  level: DEBUG

api:
  insecure: true
  dashboard: true

entryPoints:
  web:
    address: ":80"
  secure:
    address: ":443"

providers:
  docker:
    endpoint: "unix:///var/run/docker.sock"
    exposedByDefault: false

# DYNAMIC CONFIGURATION
services:
  jaeger:
    loadBalancer:
      servers:
        - url: "IP:16686"
  hotrod:
    loadBalancer:
      servers:
        - url: "IP:8080"

http:
  routers:
    hotrod:
      rule: "PathPrefix(`/hot`)"
      service: hotrod

tracing:
  jaeger:
    samplingServerURL: IP:5778/sampling
    localAgentHostPort: IP:6831
    samplingType: const

What i'm doing wrong here? Thanks ( :wink:

I don't think that

- "traefik.http.routers.jaeger.service=jaeger"

and

- "traefik.http.routers.hotrod.service=hotrod"

are necessary since you pass traefik commands into labels from these services.
for example, this works fine:

services:
    whoami:
        image: "containous/whoami"
        container_name: "whoami"
        command: --port 8888
        labels:
          - "traefik.enable=true"
          - "traefik.http.routers.whoami.rule=Host(`whoami.domain.org`)"
          - "traefik.http.routers.whoami.entrypoints=websecure"
          - "traefik.http.routers.whoami.tls.certresolver=OVH"
          - "traefik.http.services.whoami.loadbalancer.server.port=8888"

also, you don't have entrypoints for these two.