You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by Geoff Hendrey <gh...@decarta.com> on 2010/03/22 19:51:33 UTC
Master binds only to loopback
Any help would be greatly appreciated:
How can I get the HBase master to bind to an externally visible IP
address? It only seems to bind to 127.0.0.1.
I have reviewed this thread:
http://old.nabble.com/Set-hbase-configuration-when-client-is-on-differen
t-machine-td23535721.html#a23595819
And I have followed the instructions,by modifying /etc/hosts so that
localhost.localdomain corresponds to the externally-visible IP for the
box, rather than 127.0.0.1
My hbase-site looks like as follows. Nevertheless, netstat shows that I
am bound only to port 127.0.0.1 on port 60000:
<configuration>
<property>
<name>hbase.rootdir</name>
<value>hdfs://localhost/hbase</value>
<description>The directory shared by region servers.
</description>
</property>
<property>
<name>hbase.master</name>
<value>localhost.localdomain</value>
</property>
<property>
<name>hbase.master.port</name>
<value>60000</value>
<description>The port master should bind to.</description>
</property>
<property>
<name>hbase.zookeeper.quorum</name>
<value>localhost.localdomain</value>
<description>The host and port that the HBase master runs at.
A value of 'local' runs the master and a regionserver in
a single process.
</description>
</property>
</configuration>
Re: Master binds only to loopback
Posted by Ryan Rawson <ry...@gmail.com>.
People run hbase on ec2 which are dual homed, I'll ask someone who is
more familiar with ec2 setup to pipe up and answer this one in detail.
On Mon, Mar 22, 2010 at 1:26 PM, Michael Segel
<mi...@hotmail.com> wrote:
>
>
>
>> Date: Mon, 22 Mar 2010 12:02:17 -0700
>> Subject: Re: Master binds only to loopback
>> From: ryanobjc@gmail.com
>> To: hbase-user@hadoop.apache.org
>>
>> The way the HBase master binds is this generalized algorithm:
>>
>> - get the host name (on posix systems this is generally reported by hostname)
>> - do DNS lookup on hostname
>> - use that IP as 'my ip' and bind to that IP:60000
>>
>> good luck!
>> -ryan
>
> Ok, so HBase like Hadoop uses the hostname then goes to DNS to resolve the hostname.
> If DNS is set up, does it skip /etc/hosts altogether, or depending on how DNS is set up, will it eventually get to /etc/hosts?
>
> And how often does the HBase master bind? Just once?
>
> Sorry to jump in on this conversation, but I'm curious if there's any work to fix it so if a machine is dual nic'd (two nics, each pointing to a different network) that you can specify which nic you want to use for connectivity for a resource. (Imagine if you have a private lan for the cloud and then an external interface.)
>
> Thx
>
> -Mike
>
>
> _________________________________________________________________
> The New Busy is not the old busy. Search, chat and e-mail from your inbox.
> http://www.windowslive.com/campaign/thenewbusy?ocid=PID27925::T:WLMTAGL:ON:WL:en-US:WM_HMP:032010_3
RE: Master binds only to loopback
Posted by Michael Segel <mi...@hotmail.com>.
> Date: Mon, 22 Mar 2010 12:02:17 -0700
> Subject: Re: Master binds only to loopback
> From: ryanobjc@gmail.com
> To: hbase-user@hadoop.apache.org
>
> The way the HBase master binds is this generalized algorithm:
>
> - get the host name (on posix systems this is generally reported by hostname)
> - do DNS lookup on hostname
> - use that IP as 'my ip' and bind to that IP:60000
>
> good luck!
> -ryan
Ok, so HBase like Hadoop uses the hostname then goes to DNS to resolve the hostname.
If DNS is set up, does it skip /etc/hosts altogether, or depending on how DNS is set up, will it eventually get to /etc/hosts?
And how often does the HBase master bind? Just once?
Sorry to jump in on this conversation, but I'm curious if there's any work to fix it so if a machine is dual nic'd (two nics, each pointing to a different network) that you can specify which nic you want to use for connectivity for a resource. (Imagine if you have a private lan for the cloud and then an external interface.)
Thx
-Mike
_________________________________________________________________
The New Busy is not the old busy. Search, chat and e-mail from your inbox.
http://www.windowslive.com/campaign/thenewbusy?ocid=PID27925::T:WLMTAGL:ON:WL:en-US:WM_HMP:032010_3
RE: Master binds only to loopback
Posted by Geoff Hendrey <gh...@decarta.com>.
Thanks,
To get it to work, the host needs to recognize the name you want to use
as a fully qualified domain name. Use the unix 'hostname' command as
follows:
"hostname <name>"
"hostname -f <name>"
Add <name> to /etc/hosts
Seems to be working now. Netstat shows it bound to the host's IP, not to
loopback.
-geoff
-----Original Message-----
From: Ryan Rawson [mailto:ryanobjc@gmail.com]
Sent: Monday, March 22, 2010 12:02 PM
To: hbase-user@hadoop.apache.org
Subject: Re: Master binds only to loopback
The way the HBase master binds is this generalized algorithm:
- get the host name (on posix systems this is generally reported by
hostname)
- do DNS lookup on hostname
- use that IP as 'my ip' and bind to that IP:60000
good luck!
-ryan
On Mon, Mar 22, 2010 at 11:51 AM, Geoff Hendrey <gh...@decarta.com>
wrote:
> Any help would be greatly appreciated:
>
> How can I get the HBase master to bind to an externally visible IP
> address? It only seems to bind to 127.0.0.1.
>
> I have reviewed this thread:
> http://old.nabble.com/Set-hbase-configuration-when-client-is-on-differ
> en
> t-machine-td23535721.html#a23595819
>
> And I have followed the instructions,by modifying /etc/hosts so that
> localhost.localdomain corresponds to the externally-visible IP for the
> box, rather than 127.0.0.1
>
> My hbase-site looks like as follows. Nevertheless, netstat shows that
> I am bound only to port 127.0.0.1 on port 60000:
>
> <configuration>
>
> <property>
>
> <name>hbase.rootdir</name>
>
> <value>hdfs://localhost/hbase</value>
>
> <description>The directory shared by region servers.
>
> </description>
>
> </property>
>
> <property>
>
> <name>hbase.master</name>
>
> <value>localhost.localdomain</value>
>
> </property>
>
> <property>
>
> <name>hbase.master.port</name>
>
> <value>60000</value>
>
> <description>The port master should bind to.</description>
>
> </property>
>
> <property>
>
> <name>hbase.zookeeper.quorum</name>
>
> <value>localhost.localdomain</value>
>
> <description>The host and port that the HBase master runs at.
>
> A value of 'local' runs the master and a regionserver in
>
> a single process.
>
> </description>
>
> </property>
>
> </configuration>
>
>
Re: Master binds only to loopback
Posted by Ryan Rawson <ry...@gmail.com>.
The way the HBase master binds is this generalized algorithm:
- get the host name (on posix systems this is generally reported by hostname)
- do DNS lookup on hostname
- use that IP as 'my ip' and bind to that IP:60000
good luck!
-ryan
On Mon, Mar 22, 2010 at 11:51 AM, Geoff Hendrey <gh...@decarta.com> wrote:
> Any help would be greatly appreciated:
>
> How can I get the HBase master to bind to an externally visible IP
> address? It only seems to bind to 127.0.0.1.
>
> I have reviewed this thread:
> http://old.nabble.com/Set-hbase-configuration-when-client-is-on-differen
> t-machine-td23535721.html#a23595819
>
> And I have followed the instructions,by modifying /etc/hosts so that
> localhost.localdomain corresponds to the externally-visible IP for the
> box, rather than 127.0.0.1
>
> My hbase-site looks like as follows. Nevertheless, netstat shows that I
> am bound only to port 127.0.0.1 on port 60000:
>
> <configuration>
>
> <property>
>
> <name>hbase.rootdir</name>
>
> <value>hdfs://localhost/hbase</value>
>
> <description>The directory shared by region servers.
>
> </description>
>
> </property>
>
> <property>
>
> <name>hbase.master</name>
>
> <value>localhost.localdomain</value>
>
> </property>
>
> <property>
>
> <name>hbase.master.port</name>
>
> <value>60000</value>
>
> <description>The port master should bind to.</description>
>
> </property>
>
> <property>
>
> <name>hbase.zookeeper.quorum</name>
>
> <value>localhost.localdomain</value>
>
> <description>The host and port that the HBase master runs at.
>
> A value of 'local' runs the master and a regionserver in
>
> a single process.
>
> </description>
>
> </property>
>
> </configuration>
>
>