[v.2.3.2] error: port is missing" providerName=docker container=container-name

Hi,

I am trying to config traefik in my swarm cluster.
I install traefik and put all my containers in one node this work.
When I try to separate (traefik in manager and container in workers) I got the error:

error: port is missing" providerName=docker container=app-xbbcgupxwrqu3iv9j7u9wtjfc

I already add the port in service label like:

labels:
        - "traefik.port=80"
        - "traefik.http.services.app.loadbalancer.server.port=80"

but this don't fix.

Anyone with the same problem?

Hello,

with Swarm the labels must be defined in the deploy section: https://doc.traefik.io/traefik/v2.3/providers/docker/#routing-configuration-with-labels_1

services:

  traefik:
    image: traefik:v2.3.1
    deploy:
        labels:
          - "traefik.http.services.app.loadbalancer.server.port=80"

Hi @ldez

Thanks for you reply. this work!

Now I have error 404 when I try to access my URL for application

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