I'm trying to run a Mesos cluster on 2 machines. One is a server that I rent (we'll call it S1), and the other one is a machine running in my house (S2). The Mesos slaves and masters are running inside Docker containers.
First, I ran into this error : https://github.com/mesos/chronos/issues/193.
I followed the advices in this post (by setting either LIBPROCESS_IP
or MESOS_IP
). Adding one of these environment variables causes this error :
F0512 08:48:55.437530 1 process.cpp:889] Failed to initialize: Failed to bind on <ip>:<port>: Cannot assign requested address: Cannot assign requested address [99]
I figured it was caused because the Docker container ip address was 172.17.0.1 and not S1 or S2's ip. I added --net=host
in the docker run command. It fixed the error on S1, but not on S2.
I think it is because S2 has a local IP inside my network (192.168.0.16), and mesos can't bind to my router IP.
Is there a way to make Mesos work with this configuration, or do I need a machine with its own IP address ?
Although this doesn't seem to be an ideal configuration, you might have success in adding a port forwarding on your router (e.g. port 5050 and 5051) and use the --advertise_ip
command line flag when starting the master/slave on the machine in your house.
IP address advertised to reach this Mesos master/slave. The master/slave does not bind to this IP address. However, this IP address may be used to access this master/slave.
See