You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@bookkeeper.apache.org by ChenWei <sp...@gmail.com> on 2012/09/19 09:23:03 UTC
Why the Bookie name on ZooKeeper is always 127.0.0.1:3181?
I have a ZooKeeper cluster on three nodes and create /ledgers,
/ledgers/available
Then I start a Bookie on 10.11.151.91, Then a node named 127.0.0.1:3181 is
created on /ledgers/available/.
How should I configure it to make the node name correct?
I tried to manually create a node '/ledgers/available/10.11.151.91:3181'
but it didn't work.
--
Wei Chen, Graduate Student
LIGO Scientific Collaboration Research Group
Tsinghua University, Beijing, P. R. China
http://ligo.org.cn
Re: Why the Bookie name on ZooKeeper is always 127.0.0.1:3181?
Posted by ChenWei <sp...@gmail.com>.
OK, thank you very much.
2012/9/19 Ivan Kelly <iv...@apache.org>
> Not without modifying the code. If you want to hack in a change, have
> a look at
>
> bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/Bookie.java#registerBookie(int)
>
> -Ivan
>
> On Wed, Sep 19, 2012 at 04:35:20PM +0800, ChenWei wrote:
> > Yes, it is localhost now.
> > I don't have the privilege to set the host name. Is there a way to
> > configure an IP address for Bookie only?
> >
> > 2012/9/19 Sijie Guo <gu...@gmail.com>
> >
> > > What is your hostname of your machine?
> > >
> > > from InetAddress's implementation, it would check hostname first. if
> the
> > > hostname is 'localhost', it would return the loopback address.
> > >
> > >
> > >
> http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/6-b14/java/net/InetAddress.java#1403
> > >
> > > On Wed, Sep 19, 2012 at 3:23 PM, ChenWei <sp...@gmail.com> wrote:
> > >
> > >> I have a ZooKeeper cluster on three nodes and create /ledgers,
> > >> /ledgers/available
> > >> Then I start a Bookie on 10.11.151.91, Then a node named
> 127.0.0.1:3181is created on /ledgers/available/.
> > >> How should I configure it to make the node name correct?
> > >> I tried to manually create a node '/ledgers/available/
> 10.11.151.91:3181'
> > >> but it didn't work.
> > >>
> > >> --
> > >>
> > >> Wei Chen, Graduate Student
> > >> LIGO Scientific Collaboration Research Group
> > >> Tsinghua University, Beijing, P. R. China
> > >> http://ligo.org.cn
> > >>
> > >
> > >
>
--
Wei Chen, Graduate Student
LIGO Scientific Collaboration Research Group
Tsinghua University, Beijing, P. R. China
http://ligo.org.cn
Re: Why the Bookie name on ZooKeeper is always 127.0.0.1:3181?
Posted by Ivan Kelly <iv...@apache.org>.
Not without modifying the code. If you want to hack in a change, have
a look at
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/Bookie.java#registerBookie(int)
-Ivan
On Wed, Sep 19, 2012 at 04:35:20PM +0800, ChenWei wrote:
> Yes, it is localhost now.
> I don't have the privilege to set the host name. Is there a way to
> configure an IP address for Bookie only?
>
> 2012/9/19 Sijie Guo <gu...@gmail.com>
>
> > What is your hostname of your machine?
> >
> > from InetAddress's implementation, it would check hostname first. if the
> > hostname is 'localhost', it would return the loopback address.
> >
> >
> > http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/6-b14/java/net/InetAddress.java#1403
> >
> > On Wed, Sep 19, 2012 at 3:23 PM, ChenWei <sp...@gmail.com> wrote:
> >
> >> I have a ZooKeeper cluster on three nodes and create /ledgers,
> >> /ledgers/available
> >> Then I start a Bookie on 10.11.151.91, Then a node named 127.0.0.1:3181is created on /ledgers/available/.
> >> How should I configure it to make the node name correct?
> >> I tried to manually create a node '/ledgers/available/10.11.151.91:3181'
> >> but it didn't work.
> >>
> >> --
> >>
> >> Wei Chen, Graduate Student
> >> LIGO Scientific Collaboration Research Group
> >> Tsinghua University, Beijing, P. R. China
> >> http://ligo.org.cn
> >>
> >
> >
Re: Why the Bookie name on ZooKeeper is always 127.0.0.1:3181?
Posted by ChenWei <sp...@gmail.com>.
Yes, it is localhost now.
I don't have the privilege to set the host name. Is there a way to
configure an IP address for Bookie only?
2012/9/19 Sijie Guo <gu...@gmail.com>
> What is your hostname of your machine?
>
> from InetAddress's implementation, it would check hostname first. if the
> hostname is 'localhost', it would return the loopback address.
>
>
> http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/6-b14/java/net/InetAddress.java#1403
>
> On Wed, Sep 19, 2012 at 3:23 PM, ChenWei <sp...@gmail.com> wrote:
>
>> I have a ZooKeeper cluster on three nodes and create /ledgers,
>> /ledgers/available
>> Then I start a Bookie on 10.11.151.91, Then a node named 127.0.0.1:3181is created on /ledgers/available/.
>> How should I configure it to make the node name correct?
>> I tried to manually create a node '/ledgers/available/10.11.151.91:3181'
>> but it didn't work.
>>
>> --
>>
>> Wei Chen, Graduate Student
>> LIGO Scientific Collaboration Research Group
>> Tsinghua University, Beijing, P. R. China
>> http://ligo.org.cn
>>
>
>
--
Wei Chen, Graduate Student
LIGO Scientific Collaboration Research Group
Tsinghua University, Beijing, P. R. China
http://ligo.org.cn
Re: Why the Bookie name on ZooKeeper is always 127.0.0.1:3181?
Posted by Sijie Guo <gu...@gmail.com>.
What is your hostname of your machine?
from InetAddress's implementation, it would check hostname first. if the
hostname is 'localhost', it would return the loopback address.
http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/6-b14/java/net/InetAddress.java#1403
On Wed, Sep 19, 2012 at 3:23 PM, ChenWei <sp...@gmail.com> wrote:
> I have a ZooKeeper cluster on three nodes and create /ledgers,
> /ledgers/available
> Then I start a Bookie on 10.11.151.91, Then a node named 127.0.0.1:3181is created on /ledgers/available/.
> How should I configure it to make the node name correct?
> I tried to manually create a node '/ledgers/available/10.11.151.91:3181'
> but it didn't work.
>
> --
>
> Wei Chen, Graduate Student
> LIGO Scientific Collaboration Research Group
> Tsinghua University, Beijing, P. R. China
> http://ligo.org.cn
>