traefik: Traefik on Swarm mode 1.13.rc3 seems broken

Hi,

I was trying to setup Traefik on last 1.13 RC but I got strange behavior.

$ docker info
Containers: 4
 Running: 4
 Paused: 0
 Stopped: 0
Images: 8
Server Version: 1.13.0-rc3
Storage Driver: overlay
 Backing Filesystem: extfs
 Supports d_type: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins: 
 Volume: local
 Network: bridge host macvlan null overlay
Swarm: active
 NodeID: lxdosuvx00h2n8g7k5y5xs5bp
 Is Manager: true
 ClusterID: 2diztlydkcdxiiwgphpo9vfph
 Managers: 1
 Nodes: 3
 Orchestration:
  Task History Retention Limit: 5
 Raft:
  Snapshot Interval: 10000
  Number of Old Snapshots to Retain: 0
  Heartbeat Tick: 1
  Election Tick: 3
 Dispatcher:
  Heartbeat Period: 5 seconds
 CA Configuration:
  Expiry Duration: 3 months
 Node Address: 10.90.250.46
 Manager Addresses:
  10.90.250.46:2377
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 03e5862ec0d8d3b3f750e19fca3ee367e13c090e
runc version: 51371867a01c467f08af739783b8beafc154c4d7
init version: 949e6fa
Security Options:
 seccomp
  Profile: default
Kernel Version: 3.10.0-229.el7.x86_64
Operating System: CentOS Linux 7 (Core)
OSType: linux
Architecture: x86_64

Here is the steps i go throught:

docker network create traefik-net

docker service create   --name traefik   --constraint=node.role==manager   --publish 80:80   --publish 8080:8080   --mount type=bind,source=/var/run/docker.sock,target=/var/run/docker.sock   --network traefik-net   traefik   --docker   --docker.swarmmode   --docker.domain=traefik   --docker.watch   --web

docker service create --name whoami --label traefik.port=80 --network traefik-net emilevauge/whoami

Traefik is running, it detect the whoami service.

The curl -H Host:whoami.traefik http://127.0.0.1 answer Bad Gateway

If I scale whoami (=3) then nothing change in the GUI (I cannot see 3 backends) but since I am running a 3 node swarm, one whoami is running on the master node (next to traefik).

Then I can reach the app (but no round robin - an issue is open on that)

I am wrong somewhere or is there an issue?

BTW, thanks for your great job 😃

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Reactions: 3
  • Comments: 19 (6 by maintainers)

Most upvoted comments

Hi!

I don’t experiment “bad gateway” any more!

However the GUI is still not updated when a service scale. Same GUI problem if I start a service with 2 replicas (I only get one)

(Consequence? ) The load balancing is not working.

BR

Loïc

@vdemeester It’s not only on browsers. I also get the same behavior when curl whoami.haembi.de. Can I somehow log the requests which arrive on the traefik-container and how does traefik resolve them? Does the traefik-container cache the result maybe?

root@297ad9085804:/# curl whoami.haembi.de
#Hostname: b26f538e5670
IP: 127.0.0.1
IP: ::1
IP: 10.0.1.6
IP: 10.0.1.4
IP: fe80::42:aff:fe00:106
IP: 172.18.0.5
IP: fe80::42:acff:fe12:5
GET / HTTP/1.1
Host: whoami.haembi.de
User-Agent: curl/7.38.0
Accept: */*
Accept-Encoding: gzip
X-Forwarded-For: 10.255.0.3
X-Forwarded-Host: whoami.haembi.de
X-Forwarded-Proto: http
X-Forwarded-Server: 3223cccdc7af

root@297ad9085804:/# curl whoami.haembi.de
Hostname: b26f538e5670
IP: 127.0.0.1
IP: ::1
IP: 10.0.1.6
IP: 10.0.1.4
IP: fe80::42:aff:fe00:106
IP: 172.18.0.5
IP: fe80::42:acff:fe12:5
GET / HTTP/1.1
Host: whoami.haembi.de
User-Agent: curl/7.38.0
Accept: */*
Accept-Encoding: gzip
X-Forwarded-For: 10.255.0.3
X-Forwarded-Host: whoami.haembi.de
X-Forwarded-Proto: http
X-Forwarded-Server: 3223cccdc7af

root@297ad9085804:/# curl whoami.haembi.de
Hostname: b26f538e5670
IP: 127.0.0.1
IP: ::1
IP: 10.0.1.6
IP: 10.0.1.4
IP: fe80::42:aff:fe00:106
IP: 172.18.0.5
IP: fe80::42:acff:fe12:5
GET / HTTP/1.1
Host: whoami.haembi.de
User-Agent: curl/7.38.0
Accept: */*
Accept-Encoding: gzip
X-Forwarded-For: 10.255.0.3
X-Forwarded-Host: whoami.haembi.de
X-Forwarded-Proto: http
X-Forwarded-Server: 3223cccdc7af