'Standalone mesos master behind load balancer EC2

I have a mesos master behind a load balancer and a mesos agent that tries to connect to the mesos master via the load balancer

Everything is good when the agent directly connects to the master by providing the --master flag but as soon as I change the --master to point to the load balancer (dns entry not the LB IP) I keep getting the following error repeatedly on my agent

I0223 11:16:55.776448  4945 slave.cpp:1416] Detecting new master
I0223 11:16:55.796245  4947 slave.cpp:6456] Got exited event for [email protected]:8082
W0223 11:16:55.796283  4947 slave.cpp:6461] Master disconnected! Waiting for a new master to be elected

I don't see any logs in master

mesos master port:8082
load balancer listener:8082->8082
mesos agent port:5052

We use the classic load balancer that does not preserve the IP

I then tried advertising the agent IP & Port but that didn't help either

I also tried setting --hostname, --advertise_ip & --advertise_port on master but that didn't help either

Has anyone faced this issue? What should be the right values for --advertise_ip, --advertise_port

I'm not using the standard mesos master/agent ports FYI

At this point I've tried all sorts of combinations



Solution 1:[1]

  • hostname = DNS name
  • advertise_ip = IP DNS resolves to
  • advertise_port = External port

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 janisz