Traefik: Traefik ignoring container listening in more than one TCP port

Created on 14 Oct 2016  路  3Comments  路  Source: traefik/traefik

Hi,

I'm using Traefik with a Marathon backend. Some containers, are using more than one TCP port (1 for production access and another one for healthcheck, for example). Why traefik can't use portIndex "0" as default port? When traefik read more than one port, It ignores application and doesn't include in frontend and backend.

statu5-frozen-due-to-age

All 3 comments

@rogeriollacerda you have to specify the port with the label traefik.port=80.

That's not a good decision, Marathon assumes port0 as default option for health checks and Marathon always assumes that you have 1 port available, so PORT0 is always a default option.

"Each host port value is exposed to the running application instance via environment variables $PORT0, $PORT1, etc. Each Marathon application is given a single port by default, so $PORT0 is always available. "
https://mesosphere.github.io/marathon/docs/ports.html

So you have to assume a default when you have two or more options.

@gomes make a PR

Was this page helpful?
0 / 5 - 0 ratings

Related issues

f3l1x picture f3l1x  路  3Comments

bitsofinfo picture bitsofinfo  路  3Comments

saschagrunert picture saschagrunert  路  3Comments

pichouk picture pichouk  路  3Comments

Yggdrasil picture Yggdrasil  路  3Comments