traefik: Marathon backend with CNI Plugin doesn't work
What version of Traefik are you using (v1.2.1 built on 2017-03-27_03:19:40PM)?
What is your environment & configuration (arguments, toml…)?
We run an marathon/mesos Cluster and try to use Traefik as LB solution. Unfortunately both the mesos and the marathon backend didn’t work as aspected. Maybe i use it wrong.
The Environment:
- CentOS Linux release 7.3.1611 (Core)
- docker-engine.x86_64 1.11.2-1.el7.centos
- mesos 1.1.0
- marathon-1.4.1
- Traefik version v1.2.1 built on 2017-03-27_03:19:40PM
- CNI Calico (version v1.1.0, build 882dd008)
traefik.toml
debug = true
################################################################
# Web configuration backend
################################################################
[web]
address = ":8080"
[mesos]
endpoint = "zk://mesos3.domain.xyz:2181,mesos4.domain.xyz:2181,mesos5.domain.xyz:2181/mesos"
domain = "mesos.localhost"
ExposedByDefault = true
# IPSources = "docker"
IPSources = "mesos"
[marathon]
endpoint = "http://mesos3.domain.xyz:8080,mesos4.domain.xyz:8080,mesos5.domain.xyz:8080"
domain = "marathon.localhost"
marathonLBCompatibility = true
exposedByDefault = true
groupsAsSubDomains = true
What did you do?
We run two tasks / Services to test this setup. One as docker container and a second one as Universal containerizer.
docker:
{
"container": {
"type": "DOCKER",
"docker": {
"forcePullImage": true,
"image": "hub.binky.domain.xyz/trashcan/fixed:0.1",
"privileged": false,
"network": "USER",
"portMappings": [
{
"containerPort": 80,
"protocol": "tcp",
"name": null,
"labels": null
}
]
}
},
"cpus": 0.1,
"id": "/traefik/docker-1",
"instances": 1,
"minimumHealthCapacity": 1,
"acceptedResourceRoles": ["*"],
"mem": 128,
"labels": {
"HAPROXY_0_VHOST": "docker-1.traefik.binky.domain.xyz",
"HAPROXY_GROUP": "internal"
},
"ipAddress": {
"networkName": "my-calico-net",
"labels": {
"app": "test",
"group": "development"
}
}
}
universal containerizer:
{
"container": {
"type": "MESOS",
"docker": {
"forcePullImage": true,
"image": "hub.binky.domain.xyz/trashcan/fixed:0.1",
"privileged": false
}
},
"cpus": 0.1,
"id": "/traefik/mesos-1",
"instances": 1,
"minimumHealthCapacity": 1,
"acceptedResourceRoles": ["*"],
"mem": 128,
"labels": {
"HAPROXY_0_VHOST": "mesos-1.traefik.binky.domain.xyz",
"HAPROXY_GROUP": "internal"
},
"ipAddress": {
"networkName": "calico-net-1",
"labels": {
"app": "test",
"group": "development"
}
}
}
What did you expect to see?
both containers registered in Traefik
What did you see instead?
As result Traefik shows an empty marathon tab and the mesos tap contains at least the docker Task. if i change the IPSources = "mesos" to IPSources = "docker" i geth the ip of the docker task, but the universal containerizer is still not present.
If applicable, please paste the log output in debug mode (--debug switch)
debug:
time="2017-04-05T10:07:33Z" level=info msg="Traefik version v1.2.1 built on 2017-03-27_03:19:40PM"
time="2017-04-05T10:07:33Z" level=info msg="Using TOML configuration file /etc/traefik/traefik.toml"
time="2017-04-05T10:07:33Z" level=debug msg="Global configuration loaded {\"GraceTimeOut\":10,\"Debug\":true,\"CheckNewVersion\":true,\"AccessLogsFile\":\"\",\"TraefikLogsFile\":\"\",\"LogLevel\":\"DEBUG\",\"EntryPoints\":{\"http\":{\"Network\":\"\",\"Address\":\":80\",\"TLS\":null,\"Redirect\":null,\"Auth\":null,\"Compress\":false}},\"Cluster\":null,\"Constraints\":[],\"ACME\":null,\"DefaultEntryPoints\":[\"http\"],\"ProvidersThrottleDuration\":2000000000,\"MaxIdleConnsPerHost\":200,\"InsecureSkipVerify\":false,\"Retry\":null,\"Docker\":null,\"File\":null,\"Web\":{\"Address\":\":8080\",\"CertFile\":\"\",\"KeyFile\":\"\",\"ReadOnly\":false,\"Statistics\":null,\"Metrics\":null,\"Auth\":null},\"Marathon\":{\"Watch\":true,\"Filename\":\"\",\"Constraints\":[],\"Endpoint\":\"http://mesos3.domain.xyz:8080,mesos4.domain.xyz:8080,mesos5.domain.xyz:8080\",\"Domain\":\"marathon.localhost\",\"ExposedByDefault\":true,\"GroupsAsSubDomains\":true,\"DCOSToken\":\"\",\"MarathonLBCompatibility\":true,\"TLS\":null,\"DialerTimeout\":60,\"KeepAlive\":10,\"Basic\":null},\"Consul\":null,\"ConsulCatalog\":null,\"Etcd\":null,\"Zookeeper\":null,\"Boltdb\":null,\"Kubernetes\":null,\"Mesos\":{\"Watch\":true,\"Filename\":\"\",\"Constraints\":[],\"Endpoint\":\"zk://mesos3.domain.xyz:2181,mesos4.domain.xyz:2181,mesos5.domain.xyz:2181/mesos\",\"Domain\":\"mesos.localhost\",\"ExposedByDefault\":true,\"GroupsAsSubDomains\":false,\"ZkDetectionTimeout\":30,\"RefreshSeconds\":30,\"IPSources\":\"mesos\",\"StateTimeoutSecond\":30,\"Masters\":null},\"Eureka\":null,\"ECS\":null,\"Rancher\":null}"
time="2017-04-05T10:07:33Z" level=info msg="Preparing server http &{Network: Address::80 TLS:<nil> Redirect:<nil> Auth:<nil> Compress:false}"
time="2017-04-05T10:07:33Z" level=info msg="Starting provider *provider.Marathon {\"Watch\":true,\"Filename\":\"\",\"Constraints\":[],\"Endpoint\":\"http://mesos3.domain.xyz:8080,mesos4.domain.xyz:8080,mesos5.domain.xyz:8080\",\"Domain\":\"marathon.localhost\",\"ExposedByDefault\":true,\"GroupsAsSubDomains\":true,\"DCOSToken\":\"\",\"MarathonLBCompatibility\":true,\"TLS\":null,\"DialerTimeout\":60,\"KeepAlive\":10,\"Basic\":null}"
time="2017-04-05T10:07:33Z" level=info msg="Starting provider *main.WebProvider {\"Address\":\":8080\",\"CertFile\":\"\",\"KeyFile\":\"\",\"ReadOnly\":false,\"Statistics\":null,\"Metrics\":null,\"Auth\":null}"
time="2017-04-05T10:07:33Z" level=info msg="Starting provider *provider.Mesos {\"Watch\":true,\"Filename\":\"\",\"Constraints\":[],\"Endpoint\":\"zk://mesos3.domain.xyz:2181,mesos4.domain.xyz:2181,mesos5.domain.xyz:2181/mesos\",\"Domain\":\"mesos.localhost\",\"ExposedByDefault\":true,\"GroupsAsSubDomains\":false,\"ZkDetectionTimeout\":30,\"RefreshSeconds\":30,\"IPSources\":\"mesos\",\"StateTimeoutSecond\":30,\"Masters\":null}"
time="2017-04-05T10:07:33Z" level=info msg="Starting server on :80"
time="2017-04-05T10:07:33Z" level=warning msg="clientTLS is nil"
time="2017-04-05T10:07:33Z" level=debug msg=mesos
time="2017-04-05T10:07:33Z" level=debug msg="Starting master detector for ZK %!(EXTRA string=zk://mesos3.domain.xyz:2181,mesos4.domain.xyz:2181,mesos5.domain.xyz:2181/mesos)"
2017/04/05 10:07:33 structs.go:21: Connected to 10.107.19.21:2181
2017/04/05 10:07:33 structs.go:21: Authenticated: id=97688275774341178, timeout=40000
time="2017-04-05T10:07:33Z" level=debug msg="new masters detected: [10.107.19.21:5050]"
time="2017-04-05T10:07:33Z" level=debug msg="Filtering marathon task without port %s/traefik/docker-1"
time="2017-04-05T10:07:33Z" level=debug msg="Filtering marathon task without port %s/traefik/mesos-1"
time="2017-04-05T10:07:33Z" level=debug msg="Configuration received from provider marathon: {}"
time="2017-04-05T10:07:33Z" level=debug msg="Last marathon config received more than 2s, OK"
time="2017-04-05T10:07:33Z" level=info msg="Server configuration reloaded on :80"
time="2017-04-05T10:07:33Z" level=debug msg="Filtering mesos task without port mesos-1.traefik"
time="2017-04-05T10:07:33Z" level=debug msg="new masters detected: [10.107.19.21:5050 10.107.19.23:5050 10.107.19.22:5050]"
time="2017-04-05T10:07:33Z" level=debug msg="Load balancer method '<nil>' for backend backend-docker-1-traefik: Invalid method, using default. Using default wrr."
time="2017-04-05T10:07:33Z" level=debug msg="Configuration received from provider mesos: {\"backends\":{\"backend-docker-1-traefik\":{\"servers\":{\"server-traefik-docker-1-bf60da40-19e5-11e7-8fb4-02427ff3bac1\":{\"url\":\"http://:80\",\"weight\":0}},\"loadBalancer\":{\"method\":\"wrr\"}}},\"frontends\":{\"frontend-traefik-docker-1-bf60da40-19e5-11e7-8fb4-02427ff3bac1\":{\"entryPoints\":[\"http\"],\"backend\":\"backend-docker-1-traefik\",\"routes\":{\"route-hosttraefik-docker-1-bf60da40-19e5-11e7-8fb4-02427ff3bac1\":{\"rule\":\"Host:docker-1.traefik.mesos.localhost\"}},\"priority\":0}}}"
time="2017-04-05T10:07:33Z" level=debug msg="Last mesos config received less than 2s, waiting..."
time="2017-04-05T10:07:33Z" level=debug msg="Filtering mesos task without port mesos-1.traefik"
time="2017-04-05T10:07:33Z" level=debug msg="Load balancer method '<nil>' for backend backend-docker-1-traefik: Invalid method, using default. Using default wrr."
time="2017-04-05T10:07:33Z" level=debug msg="Configuration received from provider mesos: {\"backends\":{\"backend-docker-1-traefik\":{\"servers\":{\"server-traefik-docker-1-bf60da40-19e5-11e7-8fb4-02427ff3bac1\":{\"url\":\"http://:80\",\"weight\":0}},\"loadBalancer\":{\"method\":\"wrr\"}}},\"frontends\":{\"frontend-traefik-docker-1-bf60da40-19e5-11e7-8fb4-02427ff3bac1\":{\"entryPoints\":[\"http\"],\"backend\":\"backend-docker-1-traefik\",\"routes\":{\"route-hosttraefik-docker-1-bf60da40-19e5-11e7-8fb4-02427ff3bac1\":{\"rule\":\"Host:docker-1.traefik.mesos.localhost\"}},\"priority\":0}}}"
time="2017-04-05T10:07:33Z" level=debug msg="Last mesos config received less than 2s, waiting..."
time="2017-04-05T10:07:35Z" level=debug msg="Waited for mesos config, OK"
time="2017-04-05T10:07:35Z" level=debug msg="Creating frontend frontend-traefik-docker-1-bf60da40-19e5-11e7-8fb4-02427ff3bac1"
time="2017-04-05T10:07:35Z" level=debug msg="Wiring frontend frontend-traefik-docker-1-bf60da40-19e5-11e7-8fb4-02427ff3bac1 to entryPoint http"
time="2017-04-05T10:07:35Z" level=debug msg="Creating route route-hosttraefik-docker-1-bf60da40-19e5-11e7-8fb4-02427ff3bac1 Host:docker-1.traefik.mesos.localhost"
time="2017-04-05T10:07:35Z" level=debug msg="Creating backend backend-docker-1-traefik"
time="2017-04-05T10:07:35Z" level=debug msg="Creating load-balancer wrr"
time="2017-04-05T10:07:35Z" level=debug msg="Creating server server-traefik-docker-1-bf60da40-19e5-11e7-8fb4-02427ff3bac1 at http://:80 with weight 0"
time="2017-04-05T10:07:35Z" level=info msg="Server configuration reloaded on :80"
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 27
sounds great, thanks a lot for your patient work!
@lusche Ausgezeichnet!
Thanks for testing. I’ll make sure the fix (along with some other Marathon goodies) ends up in the upcoming 1.3.0 release (due around the end of the month).
@lusche I opened another PR that hopefully fixes things.
Could you try out a Docker image I created from the PR? I pushed it to my Docker Hub Traefik repo, the image name is
timoreimann/traefik:a537647.@lusche some regression has happened; I’ll be git-bisecting for the cause.
Stay tuned. 😃