Docker Label for Entrypoint not honored

Hello Everyone!

Traefik version 2.9.6.

The issue I'm having is I have a docker label that doesn't appear to be getting honored, and I'm not 100% sure why.

I have this occurring to three different docker compose files for three different services, so I'll share one of them here.

version: '3.5'
services:
  jellyfin:
    image: jellyfin/jellyfin:latest
    container_name: jellyfin
    networks:
      - proxy
    volumes:
      - "$APP_HOME/config:/config"
      - "$APP_HOME/cache:/cache"
      - "/media/media:/media"
    restart: 'unless-stopped'
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.$APP_NAME.entrypoints=http"
      - "traefik.http.routers.$APP_NAME.rule=Host(`$APP_NAME.local.domain.com`)"
      - "traefik.http.middlewares.$APP_NAME-https-redirect.redirectscheme.scheme=https"
      - "traefik.http.routers.$APP_NAME.middlewares=$APP_NAME-https-redirect"
      - "traefik.http.routers.$APP_NAME-secure.entrypoints=https"
      - "traefik.http.routers.$APP_NAME-secure.rule=Host(`$APP_NAME.local.domain.com`)"
      - "traefik.http.routers.$APP_NAME-secure.tls=true"
      - "traefik.http.routers.$APP_NAME-secure.service=$APP_NAME"
      - "traefik.http.services.$APP_NAME.loadbalancer.server.port=8096"
      - "traefik.http.routers.$APP_NAME-external.entrypoints=http"
      - "traefik.http.routers.$APP_NAME-external.rule=Host(`$APP_NAME.domain.com`)"
      - "traefik.http.middlewares.$APP_NAME-external-https-redirect.redirectscheme.scheme=https"
      - "traefik.http.routers.$APP_NAME-external.middlewares=$APP_NAME-external-https-redirect"
      - "traefik.http.routers.$APP_NAME-external-secure.entrypoints=https"
      - "traefik.http.routers.$APP_NAME-external-secure.rule=Host(`$APP_NAME.domain.com`)"
      - "traefik.http.routers.$APP_NAME-external-secure.tls=true"
      - "traefik.http.routers.$APP_NAME-external-secure.service=$APP_NAME-external"
      - "traefik.http.services.$APP_NAME-external.loadbalancer.server.port=8096"
      - "traefik.docker.network=proxy"

      
networks:
  proxy:
    external: true

This is what the Traefik dashboard shows for routers:

This is what the Traefik dashboard shows for middlewares:

As you can see, both HTTP entry points are not active.

Is there something I am misusing that is causing this?

Thank you for any responses!

I am running this out of portainer, so I am subbing the EnvVar in this docker compose for a different value.
These are the labels that portainer sees (domain obscured.)

(Sorry for the second post, however as I am a new user, limited to two screenshots to a post.)

Can you share your full Traefik static and dynamic config, and docker-compose.yml if used?

Furthermore, enable Traefik debug log and check for "error".

Unfortunately my post was flagged for an admin review when I tried to post what was asked for, hopefully that will be approved in the next 24 hours or so. Thank you for your assistance.

Debug log does have an error that appears to be related: "Could not define the service name for the router: too many services"

The above error occurs because of two services being defined for the same target port. By changing the above labels to the following it will correct the issue.

labels:
      - "traefik.enable=true"
      - "traefik.http.routers.$APP_NAME.entrypoints=http"
      - "traefik.http.routers.$APP_NAME.rule=Host(`$APP_NAME.local.domain.com`)"
      - "traefik.http.middlewares.$APP_NAME-https-redirect.redirectscheme.scheme=https"
      - "traefik.http.routers.$APP_NAME.middlewares=$APP_NAME-https-redirect"
      - "traefik.http.routers.$APP_NAME-secure.entrypoints=https"
      - "traefik.http.routers.$APP_NAME-secure.rule=Host(`$APP_NAME.local.domain.com`)"
      - "traefik.http.routers.$APP_NAME-secure.tls=true"
      - "traefik.http.routers.$APP_NAME-secure.service=$APP_NAME"
      - "traefik.http.services.$APP_NAME.loadbalancer.server.port=8096"
      - "traefik.http.routers.$APP_NAME-external.entrypoints=http"
      - "traefik.http.routers.$APP_NAME-external.rule=Host(`$APP_NAME.domain.com`)"
      - "traefik.http.middlewares.$APP_NAME-external-https-redirect.redirectscheme.scheme=https"
      - "traefik.http.routers.$APP_NAME-external.middlewares=$APP_NAME-external-https-redirect"
      - "traefik.http.routers.$APP_NAME-external-secure.entrypoints=https"
      - "traefik.http.routers.$APP_NAME-external-secure.rule=Host(`$APP_NAME.domain.com`)"
      - "traefik.http.routers.$APP_NAME-external-secure.tls=true"
      - "traefik.http.routers.$APP_NAME-external-secure.service=$APP_NAME"
      - "traefik.docker.network=proxy"

This can be closed. Thank you!

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