Michael, you are right currently "--hostname" is only used for webui redirection.
For what you are looking for, currently both the slaves and the frameworks know the public hostname of the master (via MasterInfo.hostname that is published by the master in ZK). But it requires some changes in libprocess to be able to use a hostname instead of an IP for send()ing messages. On Thu, May 29, 2014 at 6:10 AM, Michael Babineau < [email protected]> wrote: > That's good to know, thanks. > > I still think being able to reference by hostname is an important > capability. On EC2, using the public IP limits your ability to use security > groups and results in extra network charges. If we could use the public > hostname for an EC2 instance, however, then clients in the same region will > resolve the local IP, but all others will resolve the public IP. Best of > both worlds, and I'm sure this approach is not unique to AWS. > > > On Thu, May 29, 2014 at 12:17 AM, Antonin Kral <[email protected]> wrote: > >> Hi all, >> >> I believe, that you can trick mesos master to publish a public IP >> address. It pushes to ZK IP address which local hostname is resolved to. >> So you just need to put your public IP into /etc/hosts on the host >> behind the NAT. >> >> Antonin >> >> * Michael Babineau <[email protected]> [2014-05-23 20:45] wrote: >> > I thought --hostname only worked for web UI redirection, and that the >> > private IP is still used for internal coordination. >> > >> > Tomas, I believe you'll have to wait until >> > https://issues.apache.org/jira/browse/MESOS-809 is resolved. >> > >> > >> > On Fri, May 23, 2014 at 9:11 AM, Tomas Barton <[email protected] >> >wrote: >> > >> > > ok, I was using zookeer URL with zk01.example.com when I replaced it >> by >> > > an IP address it started to work. Thanks >> > > >> > > >> > > On 23 May 2014 17:58, Vinod Kone <[email protected]> wrote: >> > > >> > >> That error indicates that master is unable to resolve the ZK server >> > >> address. What is your full command line? >> > >> >> > >> >> > >> On Fri, May 23, 2014 at 8:51 AM, Tomas Barton < >> [email protected]>wrote: >> > >> >> > >>> I've set up the --hostname mesos-m1.example.com but it crashes the >> > >>> master >> > >>> >> > >>> I0523 17:46:22.166190 18203 contender.cpp:127] Joining the ZK group >> > >>> I0523 17:46:30.253983 18197 http.cpp:391] HTTP request for >> > >>> '/master/state.json' >> > >>> I0523 17:46:40.302247 18196 http.cpp:391] HTTP request for >> > >>> '/master/state.json' >> > >>> 2014-05-23 17:46:42,169:18193(0x7fdb584b2700):ZOO_ERROR@getaddrs >> @599: >> > >>> getaddrinfo: Invalid argument >> > >>> >> > >>> F0523 17:46:42.169214 18201 zookeeper.cpp:74] Failed to create >> > >>> ZooKeeper, zookeeper_init: Invalid argument [22] >> > >>> *** Check failure stack trace: *** >> > >>> 2014-05-23 17:46:42,169:18193(0x7fdb57cb1700):ZOO_ERROR@getaddrs >> @599: >> > >>> getaddrinfo: Invalid argument >> > >>> >> > >>> F0523 17:46:42.169800 18202 zookeeper.cpp:74] Failed to create >> > >>> ZooKeeper, zookeeper_init: Invalid argument [22] >> > >>> *** Check failure stack trace: *** >> > >>> @ 0x7fdb6115ea5d google::LogMessage::Fail() >> > >>> @ 0x7fdb61160813 google::LogMessage::SendToLog() >> > >>> @ 0x7fdb6115e678 google::LogMessage::Flush() >> > >>> @ 0x7fdb6115ea5d google::LogMessage::Fail() >> > >>> @ 0x7fdb61160813 google::LogMessage::SendToLog() >> > >>> @ 0x7fdb6115e678 google::LogMessage::Flush() >> > >>> @ 0x7fdb6115e859 google::LogMessage::~LogMessage() >> > >>> @ 0x7fdb6115f73f >> google::ErrnoLogMessage::~ErrnoLogMessage() >> > >>> @ 0x7fdb60f0b0ca ZooKeeper::ZooKeeper() >> > >>> @ 0x7fdb60f0cce0 zookeeper::GroupProcess::initialize() >> > >>> @ 0x7fdb61094dce process::ProcessManager::resume() >> > >>> @ 0x7fdb610955fc process::schedule() >> > >>> @ 0x7fdb5f394b50 start_thread >> > >>> @ 0x7fdb5f0df0ed (unknown) >> > >>> >> > >>> I guess I have to use directly IP address, right? >> > >>> >> > >>> >> > >>> On 23 May 2014 17:38, Vinod Kone <[email protected]> wrote: >> > >>> >> > >>>> 0.18.0 https://issues.apache.org/jira/browse/MESOS-672 >> > >>>> >> > >>>> >> > >>>> On Fri, May 23, 2014 at 8:11 AM, Tomas Barton < >> [email protected]>wrote: >> > >>>> >> > >>>>> Hey Vinod, >> > >>>>> >> > >>>>> thanks! That's exactly what I was looking for. I haven't noticed >> that >> > >>>>> flag, since which version is it available? >> > >>>>> >> > >>>>> Tomas >> > >>>>> >> > >>>>> >> > >>>>> On 23 May 2014 17:03, Vinod Kone <[email protected]> wrote: >> > >>>>> >> > >>>>>> You can use --hostname to tell master to publish a different >> address >> > >>>>>> in zk. >> > >>>>>> >> > >>>>>> @vinodkone >> > >>>>>> Sent from my mobile >> > >>>>>> >> > >>>>>> > On May 23, 2014, at 12:40 AM, Tomas Barton < >> [email protected]> >> > >>>>>> wrote: >> > >>>>>> > >> > >>>>>> > Hi, >> > >>>>>> > >> > >>>>>> > is it possible to run a Mesos master behind NAT? With the --ip >> flag >> > >>>>>> I can set IP address of an actual interface. When master gets >> elected to >> > >>>>>> Zookeeper goes an IP address which is in this case a private >> one. If I >> > >>>>>> could override which IP is in Zookeeper, than I could easily >> forward port >> > >>>>>> 5050 to the master. >> > >>>>>> > >> > >>>>>> > Is there a way how to do this? >> > >>>>>> > >> > >>>>>> > Thanks, >> > >>>>>> > Tomas >> > >>>>>> >> > >>>>> >> > >>>>> >> > >>>> >> > >>> >> > >> >> > > >> > >

