You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by yavuz gokirmak <yg...@gmail.com> on 2012/04/29 16:36:01 UTC
Hbase RegionServer could not resolve DNS name of master
Hi,
I have a problem while building a hbase setup for two computers.
I have two computers which are:
-----------------------------------
hostname: master
ip: 10.10.10.1
domainName: master.bigdata.com
-----------------------------------
hostname: slave1
ip: 10.10.10.2
domainName: slave1.bigdata.com
----------------------------------
(a dns server is installed on master so forward and reverse queries are
working well both on master and slave)
My hbase version is cloudera's "hbase-0.90.4+49.137" and OperatingSystem is
ubuntu lst 12.04
*1. Problem - RegionServer tries to connect localhost:60000*
Master:/etc/hosts
127.0.0.1 localhost
127.0.0.1 master
Slave1:/etc/hosts
127.0.0.1 localhost
127.0.0.1 slave1
When I started hbase from master, region server on slave1 tries to connect
localhost:60000
"Attempting connect to Master server at localhost:60000"
But it should connect to 10.10.10.1:60000,
What I know that regionserver's learn master ip from zookeeper, somehow
zookeeper says wrong master ip to slaves.
When I change master's hosts file as below, this regionserver tries to
connect right master ( but I get a different error which will be detailed
in 2. Problem) .
Master:/etc/hosts
127.0.0.1 localhost
#127.0.0.1 master
10.10.10.1 master
So I think zookeeper resolves get ip address from master machine's hostname
and set it as master's IP address.
Is it true?
*2. Problem - RegionServer Could not resolve the DNS name of master*
*
*
When I changed master's host file as said above, I get a different error
again from regionserver (slave1)
*"org.apache.hadoop.hbase.HServerAddress: Could not resolve the DNS name of
master*
*org.apache.zookeeper.ClientCnxn: Error while calling watcher*
*java.lang.IllegalArgumentException: hostname can't be null*
*
*
*...*
*..**"*
*
*
*I don't really understand why regionserver tries to resolve ip address of
"master". *
*"master" is just the hostname of master computer.*
*
*
*
*
*--------------------------------------------------------*
*
*
*Contents of hbase-site.xml, both master and slave1 uses same file*
*
*
name: hbase.rootdir
value: hdfs://master.bigdata.com:54310/hbase
name: hbase.cluster.distributed
value: true
name: hbase.zookeeper.quorum
value: master.bigdata.com
name: hbase.zookeeper.dns.interface
value: eth0
name: hbase.zookeeper.dns.nameserver
value: 10.10.10.1
*
*
-
*
*
Re: Hbase RegionServer could not resolve DNS name of master
Posted by yavuz gokirmak <yg...@gmail.com>.
Hi
On 30 April 2012 05:23, Yifeng Jiang <up...@gmail.com> wrote:
> Hi,
>
> > Master:/etc/hosts
> > 127.0.0.1 localhost
> > 127.0.0.1 master
> >
> > Slave1:/etc/hosts
> > 127.0.0.1 localhost
> > 127.0.0.1 slave1
> If you DNS works well, you should not need to use hosts file.
> Can you remove master and slave1 record from your /etc/hosts file and then
> try a clean setup again?
>
>
master and slave1 are hostname's, dns resolves the domain names (i.e
master.bigdata.com, slave1.bigdata.com)
I put the line about master and slave to hosts file because of an ubuntu bug
http://ubuntuguide.net/fix-ubuntu-sudo-errorunable-to-resolve-host
Do you think the problem is originated from these hosts file entries? Why?
thank you
Re: Hbase RegionServer could not resolve DNS name of master
Posted by Yifeng Jiang <up...@gmail.com>.
Hi,
> Master:/etc/hosts
> 127.0.0.1 localhost
> 127.0.0.1 master
>
> Slave1:/etc/hosts
> 127.0.0.1 localhost
> 127.0.0.1 slave1
If you DNS works well, you should not need to use hosts file.
Can you remove master and slave1 record from your /etc/hosts file and then try a clean setup again?
-Yifeng
On Apr 29, 2012, at 11:36 PM, yavuz gokirmak wrote:
> Hi,
>
> I have a problem while building a hbase setup for two computers.
>
> I have two computers which are:
> -----------------------------------
> hostname: master
> ip: 10.10.10.1
> domainName: master.bigdata.com
> -----------------------------------
> hostname: slave1
> ip: 10.10.10.2
> domainName: slave1.bigdata.com
> ----------------------------------
>
> (a dns server is installed on master so forward and reverse queries are
> working well both on master and slave)
>
>
> My hbase version is cloudera's "hbase-0.90.4+49.137" and OperatingSystem is
> ubuntu lst 12.04
>
>
> *1. Problem - RegionServer tries to connect localhost:60000*
>
>
> Master:/etc/hosts
> 127.0.0.1 localhost
> 127.0.0.1 master
>
> Slave1:/etc/hosts
> 127.0.0.1 localhost
> 127.0.0.1 slave1
>
> When I started hbase from master, region server on slave1 tries to connect
> localhost:60000
> "Attempting connect to Master server at localhost:60000"
> But it should connect to 10.10.10.1:60000,
> What I know that regionserver's learn master ip from zookeeper, somehow
> zookeeper says wrong master ip to slaves.
> When I change master's hosts file as below, this regionserver tries to
> connect right master ( but I get a different error which will be detailed
> in 2. Problem) .
>
> Master:/etc/hosts
> 127.0.0.1 localhost
> #127.0.0.1 master
> 10.10.10.1 master
>
> So I think zookeeper resolves get ip address from master machine's hostname
> and set it as master's IP address.
> Is it true?
>
> *2. Problem - RegionServer Could not resolve the DNS name of master*
> *
> *
> When I changed master's host file as said above, I get a different error
> again from regionserver (slave1)
> *"org.apache.hadoop.hbase.HServerAddress: Could not resolve the DNS name of
> master*
> *org.apache.zookeeper.ClientCnxn: Error while calling watcher*
> *java.lang.IllegalArgumentException: hostname can't be null*
> *
> *
> *...*
> *..**"*
> *
> *
> *I don't really understand why regionserver tries to resolve ip address of
> "master". *
> *"master" is just the hostname of master computer.*
> *
> *
> *
> *
> *--------------------------------------------------------*
> *
> *
> *Contents of hbase-site.xml, both master and slave1 uses same file*
> *
> *
> name: hbase.rootdir
> value: hdfs://master.bigdata.com:54310/hbase
>
> name: hbase.cluster.distributed
> value: true
>
> name: hbase.zookeeper.quorum
> value: master.bigdata.com
>
> name: hbase.zookeeper.dns.interface
> value: eth0
>
> name: hbase.zookeeper.dns.nameserver
> value: 10.10.10.1
> *
> *
>
> -
> *
> *
Re: Hbase RegionServer could not resolve DNS name of master
Posted by yavuz gokirmak <yg...@gmail.com>.
Changing my hostnames to domain names solves all my problems.
computer1
> cat /etc/hostname
> master.bigdata.com
> cat /etc/hosts
> 127.0.0.1 localhost
computer2
> cat /etc/hostname
> slave1.bigdata.com
> cat /etc/hosts
> 127.0.0.1 localhost
On 29 April 2012 17:36, yavuz gokirmak <yg...@gmail.com> wrote:
> Hi,
>
> I have a problem while building a hbase setup for two computers.
>
> I have two computers which are:
> -----------------------------------
> hostname: master
> ip: 10.10.10.1
> domainName: master.bigdata.com
> -----------------------------------
> hostname: slave1
> ip: 10.10.10.2
> domainName: slave1.bigdata.com
> ----------------------------------
>
> (a dns server is installed on master so forward and reverse queries are
> working well both on master and slave)
>
>
> My hbase version is cloudera's "hbase-0.90.4+49.137" and OperatingSystem
> is ubuntu lst 12.04
>
>
> *1. Problem - RegionServer tries to connect localhost:60000*
>
>
> Master:/etc/hosts
> 127.0.0.1 localhost
> 127.0.0.1 master
>
> Slave1:/etc/hosts
> 127.0.0.1 localhost
> 127.0.0.1 slave1
>
> When I started hbase from master, region server on slave1 tries to connect
> localhost:60000
> "Attempting connect to Master server at localhost:60000"
> But it should connect to 10.10.10.1:60000,
> What I know that regionserver's learn master ip from zookeeper, somehow
> zookeeper says wrong master ip to slaves.
> When I change master's hosts file as below, this regionserver tries to
> connect right master ( but I get a different error which will be detailed
> in 2. Problem) .
>
> Master:/etc/hosts
> 127.0.0.1 localhost
> #127.0.0.1 master
> 10.10.10.1 master
>
> So I think zookeeper resolves get ip address from master machine's
> hostname and set it as master's IP address.
> Is it true?
>
> *2. Problem - RegionServer Could not resolve the DNS name of master*
> *
> *
> When I changed master's host file as said above, I get a different error
> again from regionserver (slave1)
> *"org.apache.hadoop.hbase.HServerAddress: Could not resolve the DNS name
> of master*
> *org.apache.zookeeper.ClientCnxn: Error while calling watcher*
> *java.lang.IllegalArgumentException: hostname can't be null*
> *
> *
> *...*
> *..**"*
> *
> *
> *I don't really understand why regionserver tries to resolve ip address
> of "master". *
> *"master" is just the hostname of master computer.*
> *
> *
> *
> *
> *--------------------------------------------------------*
> *
> *
> *Contents of hbase-site.xml, both master and slave1 uses same file*
> *
> *
> name: hbase.rootdir
> value: hdfs://master.bigdata.com:54310/hbase
>
> name: hbase.cluster.distributed
> value: true
>
> name: hbase.zookeeper.quorum
> value: master.bigdata.com
>
> name: hbase.zookeeper.dns.interface
> value: eth0
>
> name: hbase.zookeeper.dns.nameserver
> value: 10.10.10.1
> *
> *
>
> -
> *
> *
>
>
>
>
>
>