Websockets don't work in docker swarm with scale > 1, now with Traefik 2

Hi there,

I upgraded to Traefik2 to see if my websocket problem could be solved. But no. I am running into the same issue.
The original post for traeffik1 is here: Websockets don't work in docker swarm with scale > 1

We added a container that requires websocket connections. When only one container is running, everything works as expected. When we scale the container up, the websocket cannot connect anymore.
As soon as we scale down to one container it works.

Here is the Labels section of our container:

        traefik2.enable: "true"
        traefik.http.routers.chatexample.rule: Host(`chatexample.xxx`)
        traefik.http.routers.chatexample.entrypoints: websecure
        traefik.http.routers.chatexample.tls: "true"
        traefik.http.services.chatexample.loadbalancer.server.port: 3000
        traefik.http.services.chatexample.loadbalancer.sticky: "true"
        traefik.http.middlewares.sslheader.headers.customrequestheaders.X-Forwarded-Proto: "https"

This is the traefik config

  checkNewVersion: true
  sendAnonymousUsage: true
## Static configuration
    address: ":80"

    address: ":443"

  providersThrottleDuration: 42
    constraints: "Label(`traefik2.enable`, `true`)"
    watch: true
    endpoint: tcp://socat:2375
    useBindPortIP: true
    swarmMode: true
    network: se-net
    swarmModeRefreshSeconds: 10
    directory: "/etc/traefik/dynamic" <= just contains the TLS cert
    watch: true    
  insecure: true
  dashboard: true
  debug: true
  level: INFO

It seems that over people had similar issues but it was never quite the same and I tried all of those solutions. Maybe someone else knows what's going here.


After doing some more analysing, i found that the requests from one client do bounce between the backends. Even tho I set stickyness to true. I am at a loss here. Any ideas.