marathon-lb
marathon-lb copied to clipboard
marathon-lb only first marathon
Marathon-LB v1.11.2 marathon-lb ignores the second marathon
defindes multiple marathons via -m http://example1.marathon.com:8080 http://example2.marathon.com:8080
no matter which i put second is getting ignored
Marathon-LB does not currently support multiple Marathon instances. Are these distinct Marathon instances or are they multiple identical Marathon instances?
Typically, users use multiple Marathon-LB instance if they have multiple Marathon instances.
I use distinct Marathon instances
The help page said it is possible
--marathon MARATHON [MARATHON ...], -m MARATHON [MARATHON ...] [required] Marathon endpoint, eg. -m http://marathon1:8080 http://marathon2:8080
Hi @SergejFrank,
Yes, we could probably clarify that a little bit. That's used for connecting to multiple instances of Marathon in a marathon cluster, and is intended to help with HA - if one Marathon instance stops responding, it'll use the next.
You can see the code for this here: https://github.com/mesosphere/marathon-lb/blob/master/marathon_lb.py#L167-L198
I'm curious about your use case. You have multiple distinct Marathon instances, and you want them all exposed by a single Marathon-LB instance? Just off the top of my head, I think a default setup of that would cause a lot of port conflicts, cause there's no guarantee of unique ports across different Marathon instances. You could probably work around this but it's not something that's been heavily investigated, I believe.
Thanks, Justin
I have the same problem for marathon-lb v1.12 。 That marathon cluster have Three nodes : 10.0.0.1 10.0.0.3 10.0.0.5 then leader is 10.0.0.1 marathon-lb config : "args": ["sse", "-m", "http://10.0.0.1:8081", "-m", "http://10.0.0.3:8081", "-m", "http://10.0.0.5:8081", "--group", "web" ]
error:
2018-04-17 07:03:48,464 marathon_lb: SSE Active, trying fetch events from http://10.0.0.5:8081/v2/events?plan-format=light&event_type=status_update_event&event_type=health_status_changed_event&event_type=api_post_event
2018-04-17 07:03:48,471 marathon_lb: Caught exception
Traceback (most recent call last):
File "/marathon-lb/marathon_lb.py", line 2079, in
thinks
Hello all
@justinrlee I have this use case too. I use multiple instances of marathon to separate the scope of devops team. Each app is published with the http frontend and the LABEL : HAPROXY_{n}_VHOST on my public slaves Service port conflict is not a matter in this case.
Having a dedicated public slave for each teams is not usefull and i would love if all this app could be served by the same joker name in DNS *.elb.mydomain
Is something strange on my use case?