Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here. Want to know more about what has changed? Check out the Community News blog.

[HBase] - Can't get master address from ZooKeeper. I am getting this error on Creating Hbase table

SOLVED Go to solution

[HBase] - Can't get master address from ZooKeeper. I am getting this error on Creating Hbase table

New Contributor

I am not able to create a table in HBase with cloudera VM, version is 5.x.

 

following is what I get

 

hbase(main):004:0> create 'htest', 'cf'

ERROR: Can't get master address from ZooKeeper; znode data == null

Here is some help for this command:
Creates a table. Pass a table name, and a set of column family
specifications (at least one), and, optionally, table configuration.
Column specification can be a simple string (name), or a dictionary
(dictionaries are described below in main help output), necessarily 
including NAME attribute. 
Examples:

Create a table with namespace=ns1 and table qualifier=t1
  hbase> create 'ns1:t1', {NAME => 'f1', VERSIONS => 5}

Create a table with namespace=default and table qualifier=t1
  hbase> create 't1', {NAME => 'f1'}, {NAME => 'f2'}, {NAME => 'f3'}
  hbase> # The above in shorthand would be the following:
  hbase> create 't1', 'f1', 'f2', 'f3'
  hbase> create 't1', {NAME => 'f1', VERSIONS => 1, TTL => 2592000, BLOCKCACHE => true}
  hbase> create 't1', {NAME => 'f1', CONFIGURATION => {'hbase.hstore.blockingStoreFiles' => '10'}}
  
Table configuration options can be put at the end.
Examples:

  hbase> create 'ns1:t1', 'f1', SPLITS => ['10', '20', '30', '40']
  hbase> create 't1', 'f1', SPLITS => ['10', '20', '30', '40']
  hbase> create 't1', 'f1', SPLITS_FILE => 'splits.txt', OWNER => 'johndoe'
  hbase> create 't1', {NAME => 'f1', VERSIONS => 5}, METADATA => { 'mykey' => 'myvalue' }
  hbase> # Optionally pre-split the table into NUMREGIONS, using
  hbase> # SPLITALGO ("HexStringSplit", "UniformSplit" or classname)
  hbase> create 't1', 'f1', {NUMREGIONS => 15, SPLITALGO => 'HexStringSplit'}
  hbase> create 't1', 'f1', {NUMREGIONS => 15, SPLITALGO => 'HexStringSplit', REGION_REPLICATION => 2, CONFIGURATION => {'hbase.hregion.scan.loadColumnFamiliesOnDemand' => 'true'}}

You can also keep around a reference to the created table:

  hbase> t1 = create 't1', 'f1'

Which gives you a reference to the table named 't1', on which you can then
call methods.

 

1 ACCEPTED SOLUTION

Accepted Solutions

Re: [HBase] - Can't get master address from ZooKeeper. I am getting this error on Creating Hbase tab

Master Guru
Please restart the failed services. Note that HBase, being dependent on ZK
timeouts for liveliness, may sometimes not survive VM pauses (such as when
you hibernate your machine, etc.), and would need to be restarted before
use again.

This isn't a problem on actual clusters that don't experience such
pauses/gaps in machine availability.
8 REPLIES 8

Re: [HBase] - Can't get master address from ZooKeeper. I am getting this error on Creating Hbase tab

Master Guru
Is the HBase service up and running? Could you check with the 'service' commands, and by visiting the HMaster and HRegionServer web UIs?

Re: [HBase] - Can't get master address from ZooKeeper. I am getting this error on Creating Hbase tab

New Contributor

I did service --status-all and got below 

 

HBase master daemon is dead and pid file exists            [FAILED]
hbase-regionserver is not running.
HBase rest daemon is running                               [  OK  ]
HBase Solr Indexer is not running                          [FAILED]
HBase thrift daemon is running                             [  OK  ]

 

It looks not running.... How do I start it? 

Re: [HBase] - Can't get master address from ZooKeeper. I am getting this error on Creating Hbase tab

Master Guru
Please restart the failed services. Note that HBase, being dependent on ZK
timeouts for liveliness, may sometimes not survive VM pauses (such as when
you hibernate your machine, etc.), and would need to be restarted before
use again.

This isn't a problem on actual clusters that don't experience such
pauses/gaps in machine availability.

Re: [HBase] - Can't get master address from ZooKeeper. I am getting this error on Creating Hbase tab

New Contributor

also have the same problem when trying to create a database on hbase shell. what i have noticed is that hbase master is always down even if i use a different node as hbase master. i have four nodes with cdh5.5.0 install and ubuntu server 14. everything is running except for the master node. help please

Re: [HBase] - Can't get master address from ZooKeeper. I am getting this error on Creating Hbase tab

New Contributor

can you please let me know how to restart the failed services?

Re: [HBase] - Can't get master address from ZooKeeper. I am getting this error on Creating Hbase tab

New Contributor

I am also facing the same issue..Being a beginner I dont know how to restart the failed services... can you please let me know how to restart the services?

Re: [HBase] - Can't get master address from ZooKeeper. I am getting this error on Creating Hbase tab

Master Guru
If you use manually managed CDH with packages, it'd involve restarting the HBase Master and RegionServer services:

~> service hbase-master restart # On Master host
~> service hbase-regionserver restart # On all RS hosts

If you use Cloudera Manager instead, simply hit Restart on the HBase service on its homepage.

Re: [HBase] - Can't get master address from ZooKeeper. I am getting this error on Creating Hbase tab

New Contributor

can you tell me how to connect through java api to hbase cluster ( 4 node cluster running in VM's). from windows to Distribution running in server vm/s