Bug
What did you do?
I have deployed the following app on marathon:
{
"id": "/whoami",
"cpus": 0.1,
"mem": 256.0,
"instances": 3,
"labels": {
"traefik.enable": "true",
"traefik.http.routers.whoami.rule": "Host(`traefik-testing.mydomain.com`)",
"traefik.http.routers.whoami.entrypoints": "web-secure",
"traefik.http.routers.whoami.tls.certresolver": "letsencryptStaging",
"traefik.http.routers.whoami.tls.domains[0].main": "traefik-testing.mydomain.com",
"traefik.http.middlewares.redirect-to-https.redirectscheme.scheme": "https",
"traefik.http.routers.redirs.rule": "hostregexp(`{host:.+}`)",
"traefik.http.routers.redirs.entrypoints": "web",
"traefik.http.routers.redirs.middlewares": "redirect-to-https"
},
"container": {
"type": "DOCKER",
"docker": {
"image": "containous/whoami",
"network": "BRIDGE",
"portMappings": [
{
"containerPort": 80,
"hostPort": 0,
"name": "http-api",
"protocol": "tcp"
}
]
},
"volumes": [
]
},
"readinessChecks": [
{
"name": "readinessCheck",
"protocol": "HTTP",
"path": "/",
"portName": "http-api",
"intervalSeconds": 30,
"timeoutSeconds": 10,
"httpStatusCodesForReady": [200],
"preserveLastResponse": false
}
],
"healthChecks": [
{
"portIndex": 0,
"protocol": "TCP",
"gracePeriodSeconds": 30,
"intervalSeconds": 10,
"timeoutSeconds": 30,
"maxConsecutiveFailures": 3
},
{
"path": "/",
"portIndex": 0,
"protocol": "HTTP",
"gracePeriodSeconds": 30,
"intervalSeconds": 10,
"timeoutSeconds": 30,
"maxConsecutiveFailures": 3
}
]
}
This is the docker-compose.yml
used to start the traefik container on localhost
, that can reach marathon on the LAN through http://192.168.0.22:8080
:
version: '3'
services:
reverse-proxy:
image: traefik:v2.1
network_mode: "host"
ports:
- "80:80"
- "443:443"
- "8080:8080"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
- "./traefik.yaml:/etc/traefik/traefik.yaml"
- "./letsencrypt:/letsencrypt"
- "./staging/fakelerootx1.pem:/etc/ssl/certs/fakelerootx1.pem"
What did you expect to see?
I expect to be able to succeed this command:
curl -H 'Host: traefik-testing.mydomain.com' -L https://localhost --insecure
What did you see instead?
Curl response:
Gateway Timeout
traefik debug log:
Output of traefik version
: (What version of Traefik are you using?)
v2.1
What is your environment & configuration (arguments, toml, provider, platform, ...)?
This is my traefik.yaml
## Static configuration
global:
checkNewVersion: true
sendAnonymousUsage: false
serversTransport:
insecureSkipVerify: false
log:
level: "DEBUG"
entryPoints:
web:
address: ":80"
web-secure:
address: ":443"
api:
insecure: true # enable WEB UI
dashboard: true
debug: true
providers:
marathon:
endpoint: "http://192.168.0.22:8080"
watch: true
exposedByDefault: false
respectReadinessChecks: true
certificatesResolvers:
letsencrypt:
acme:
email: "me@mydomain.com"
storage: "/letsencrypt/acme.json"
caServer: "https://acme-v02.api.letsencrypt.org/directory"
dnsChallenge:
provider: ovh
delayBeforeCheck: 10
letsencryptStaging:
acme:
email: "me@mydomain.com"
storage: "/letsencrypt/acme-staging.json"
caServer: "https://acme-staging-v02.api.letsencrypt.org/directory"
dnsChallenge:
provider: ovh
delayBeforeCheck: 10
If applicable, please paste the log output in DEBUG level (--log.level=DEBUG
switch)
reverse-proxy_1 | time="2019-12-11T13:45:56Z" level=debug msg="'504 Gateway Timeout' caused by: dial tcp 212.95.74.75:31400: i/o timeout"
Note: the IP it dial as nothing to do with my LAN, it is owned by my ISP and it is not even my WAN address.
On the dashboard, IP are correctly guessed and all are reachable by telnet from traefik host.
I am out of idea, it simply does not work with marathon, any idea what is failing here?
Thanks and best!