Reply
New Contributor
Posts: 3
Registered: ‎07-22-2015
Accepted Solution

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

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.

 

Posts: 1,894
Kudos: 433
Solutions: 303
Registered: ‎07-31-2013

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

Is the HBase service up and running? Could you check with the 'service' commands, and by visiting the HMaster and HRegionServer web UIs?
New Contributor
Posts: 3
Registered: ‎07-22-2015

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

[ Edited ]

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? 

Posts: 1,894
Kudos: 433
Solutions: 303
Registered: ‎07-31-2013

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

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.
New Contributor
Posts: 1
Registered: ‎12-12-2015

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

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

New Contributor
Posts: 3
Registered: ‎06-07-2016

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

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

New Contributor
Posts: 3
Registered: ‎06-07-2016

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

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?

Posts: 1,894
Kudos: 433
Solutions: 303
Registered: ‎07-31-2013

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

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.
New Contributor
Posts: 3
Registered: ‎09-08-2016

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

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

Announcements