You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mesos.apache.org by zhou weitao <zh...@gmail.com> on 2015/11/26 10:47:20 UTC
why I have to set LIBPROCESS_IP for my framework?
Hi, list:
as the subject. Whatever Marathon, chronos, Spark and so on, I have to set
the ENV LIBPROCESS_IP for registering them to mesos-master. But I doesn't
figure out why I have to do that yet. If possible, please shoot me some
info.
thanks in advance.
Re: why I have to set LIBPROCESS_IP for my framework?
Posted by zhou weitao <zh...@gmail.com>.
Chengwei, Thanks a lot. which is the exactly answer I am looking for.
2015-11-26 22:28 GMT+08:00 Chengwei Yang <ch...@gmail.com>:
> Yes, both mesos-master/slave, scheduler use libprocess so far and you can
> set
> LIBPROCESS_IP by set mesos-master/slave opton(--ip).
>
> For scheduler which doesn't export an option to configure LIBPROCESS_IP
> then you
> have to configure the environment yourself.
>
> BUT only when your host not configured correclty.
>
> `not configured correctly` means the local ip that libprocess got from
> hostname
> is incorrect.
>
> See code 3rdparty/libprocess/src/process.cpp:929-935, like below
>
> ```
> $ sed -ne '929,935p' 3rdparty/libprocess/src/process.cpp
> if (gethostname(hostname, sizeof(hostname)) < 0) {
> LOG(FATAL) << "Failed to initialize, gethostname: "
> << hstrerror(h_errno);
> }
>
> // Lookup IP address of local hostname.
> Try<net::IP> ip = net::getIP(hostname, __address__.ip.family());
> ```
>
> Ensure you have your host configured correctly. You may have to add a line
> to
> `/etc/hosts` like
>
> <external_IP_which_can_be_used_by_libprocess> <the_hostname>
>
> --
> Thanks,
> Chengwei
>
> On Thu, Nov 26, 2015 at 05:58:28PM +0800, haosdent wrote:
> > Hi, Mesos use libprocess, which need set LIBPROCESS_IP and
> LIBPROCESS_PORT
> > to communicate with.
> > https://github.com/apache/mesos/tree/master/3rdparty/libprocess
> >
> > On Thu, Nov 26, 2015 at 5:47 PM, zhou weitao <zh...@gmail.com>
> wrote:
> >
> > > Hi, list:
> > >
> > > as the subject. Whatever Marathon, chronos, Spark and so on, I have to
> set
> > > the ENV LIBPROCESS_IP for registering them to mesos-master. But I
> doesn't
> > > figure out why I have to do that yet. If possible, please shoot me some
> > > info.
> > >
> > > thanks in advance.
> > >
> >
> >
> >
> > --
> > Best Regards,
> > Haosdent Huang
>
Re: why I have to set LIBPROCESS_IP for my framework?
Posted by Chengwei Yang <ch...@gmail.com>.
Yes, both mesos-master/slave, scheduler use libprocess so far and you can set
LIBPROCESS_IP by set mesos-master/slave opton(--ip).
For scheduler which doesn't export an option to configure LIBPROCESS_IP then you
have to configure the environment yourself.
BUT only when your host not configured correclty.
`not configured correctly` means the local ip that libprocess got from hostname
is incorrect.
See code 3rdparty/libprocess/src/process.cpp:929-935, like below
```
$ sed -ne '929,935p' 3rdparty/libprocess/src/process.cpp
if (gethostname(hostname, sizeof(hostname)) < 0) {
LOG(FATAL) << "Failed to initialize, gethostname: "
<< hstrerror(h_errno);
}
// Lookup IP address of local hostname.
Try<net::IP> ip = net::getIP(hostname, __address__.ip.family());
```
Ensure you have your host configured correctly. You may have to add a line to
`/etc/hosts` like
<external_IP_which_can_be_used_by_libprocess> <the_hostname>
--
Thanks,
Chengwei
On Thu, Nov 26, 2015 at 05:58:28PM +0800, haosdent wrote:
> Hi, Mesos use libprocess, which need set LIBPROCESS_IP and LIBPROCESS_PORT
> to communicate with.
> https://github.com/apache/mesos/tree/master/3rdparty/libprocess
>
> On Thu, Nov 26, 2015 at 5:47 PM, zhou weitao <zh...@gmail.com> wrote:
>
> > Hi, list:
> >
> > as the subject. Whatever Marathon, chronos, Spark and so on, I have to set
> > the ENV LIBPROCESS_IP for registering them to mesos-master. But I doesn't
> > figure out why I have to do that yet. If possible, please shoot me some
> > info.
> >
> > thanks in advance.
> >
>
>
>
> --
> Best Regards,
> Haosdent Huang
Re: why I have to set LIBPROCESS_IP for my framework?
Posted by haosdent <ha...@gmail.com>.
Hi, Mesos use libprocess, which need set LIBPROCESS_IP and LIBPROCESS_PORT
to communicate with.
https://github.com/apache/mesos/tree/master/3rdparty/libprocess
On Thu, Nov 26, 2015 at 5:47 PM, zhou weitao <zh...@gmail.com> wrote:
> Hi, list:
>
> as the subject. Whatever Marathon, chronos, Spark and so on, I have to set
> the ENV LIBPROCESS_IP for registering them to mesos-master. But I doesn't
> figure out why I have to do that yet. If possible, please shoot me some
> info.
>
> thanks in advance.
>
--
Best Regards,
Haosdent Huang
Re: why I have to set LIBPROCESS_IP for my framework?
Posted by tommy xiao <xi...@gmail.com>.
Hi weitao,
mesos use libprocess to communicate each other, that all.
2015-11-26 17:47 GMT+08:00 zhou weitao <zh...@gmail.com>:
> Hi, list:
>
> as the subject. Whatever Marathon, chronos, Spark and so on, I have to set
> the ENV LIBPROCESS_IP for registering them to mesos-master. But I doesn't
> figure out why I have to do that yet. If possible, please shoot me some
> info.
>
> thanks in advance.
>
--
Deshi Xiao
Twitter: xds2000
E-mail: xiaods(AT)gmail.com