get "ERROR: Can't get master address from ZooKeeper; znode data == null" when using Hbase shell

get thesaurus
how to pronounce get
get abbreviation
out to get you synonym
get past tense
to get'' in spanish
to get word
replace get

I installed Hadoop2.2.0 and Hbase0.98.0 and here is what I do :

$ ./bin/start-hbase.sh 

$ ./bin/hbase shell

2.0.0-p353 :001 > list

then I got this:

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

Why am I getting this error ? Another question: do I need to run ./sbin/start-dfs.sh and ./sbin/start-yarn.sh before I run base ?

Also, what are used ./sbin/start-dfs.sh and ./sbin/start-yarn.sh for ?

Here is some of my conf doc :

hbase-sites.xml
<configuration>
    <property>
        <name>hbase.rootdir</name>
        <value>hdfs://127.0.0.1:9000/hbase</value>
    </property>
    <property>
        <name>hbase.cluster.distributed</name>
        <value>true</value>
    </property>

    <property>
        <name>hbase.tmp.dir</name>
        <value>/Users/apple/Documents/tools/hbase-tmpdir/hbase-data</value>
    </property>
    <property>
        <name>hbase.zookeeper.quorum</name>
        <value>localhost</value>
    </property>
    <property>
        <name>hbase.zookeeper.property.dataDir</name>
        <value>/Users/apple/Documents/tools/hbase-zookeeper/zookeeper</value>
    </property>
</configuration>
core-sites.xml
<configuration>

  <property>
      <name>fs.defaultFS</name>
      <value>hdfs://localhost:9000</value>
      <description>The name of the default file system.</description>
  </property>

  <property>
      <name>hadoop.tmp.dir</name>
      <value>/Users/micmiu/tmp/hadoop</value>
      <description>A base for other temporary directories.</description>
  </property>

  <property>
      <name>io.native.lib.available</name>
      <value>false</value>
  </property>

</configuration>
yarn-sites.xml
<configuration>

    <property>
        <name>yarn.nodemanager.aux-services</name>
        <value>mapreduce_shuffle</value>
    </property>

    <property>
        <name>yarn.nodemanager.aux-services.mapreduce.shuffle.class</name>
        <value>org.apache.hadoop.mapred.ShuffleHandler</value>
    </property>

</configuration>

If you just want to run HBase without going into Zookeeper management for standalone HBase, then remove all the property blocks from hbase-site.xml except the property block named hbase.rootdir.

Now run /bin/start-hbase.sh. HBase comes with its own Zookeeper, which gets started when you run /bin/start-hbase.sh, which will suffice if you are trying to get around things for the first time. Later you can put distributed mode configurations for Zookeeper.

You only need to run /sbin/start-dfs.sh for running HBase since the value of hbase.rootdir is set to hdfs://127.0.0.1:9000/hbase in your hbase-site.xml. If you change it to some location on local the filesystem using file:///some_location_on_local_filesystem, then you don't even need to run /sbin/start-dfs.sh.

hdfs://127.0.0.1:9000/hbase says it's a place on HDFS and /sbin/start-dfs.sh starts namenode and datanode which provides underlying API to access the HDFS file system. For knowing about Yarn, please look at http://hadoop.apache.org/docs/r2.3.0/hadoop-yarn/hadoop-yarn-site/YARN.html.

Get, synonyms: become, grow, turn, go, come to be, get to be, wax Get definition, to receive or come to have possession, use, or enjoyment of: to get a birthday present; to get a pension. See more.

This could also happen if the vm or the host machine is put to sleep ,Zookeeper will not stay live. Restarting the VM should solve the problem.

Get My Payment, come, go, or make progress eventually or with some difficulty. Synonyms for get at Thesaurus.com with free online thesaurus, antonyms, and definitions. Find descriptive alternatives for get.

You need to start zookeeper and then run Hbase-shell

{HBASE_HOME}/bin/hbase-daemons.sh {start,stop} zookeeper

and you may want to check this property in hbase-env.sh

# Tell HBase whether it should manage its own instance of Zookeeper or not.
export HBASE_MANAGES_ZK=false

Refer to Source - Zookeeper

get, synonyms: arrive, reach, come, make it, turn up, appear, put in an appearance, make an appearance, come on the scene, come up, approach, enter, present oneself, be along, come along, materialize, show up, show, roll in, roll up, blow in, show one's face, return, come home, come back, arrive home, arrive back, come again 269 synonyms of get from the Merriam-Webster Thesaurus, plus 376 related words, definitions, and antonyms. Find another word for get. Get: to acquire complete knowledge, understanding, or skill in. Synonyms: learn, master, pick up…

One quick solution could be to Restart hbase:

1) Stop-hbase.sh
2) Start-hbase.sh

GET (verb) definition and synonyms, synonyms: apprehend, catch, arrest, capture, seize, take, take prisoner, take captive, take into custody, detain, put in jail, throw in jail, put behind bars, imprison, incarcerate, collar, grab, nab, nail, run in, pinch, bust, pick up, pull in, haul in, do, feel someone's collar, nick Give the Gift of a GET Account Tell a Friend about GET Due to COVID-19 restrictions, our office is currently closed to walk-in visitors. If you have questions, please email us at getinfo@wsac.wa.gov or send a support ticket from your online account.

I had the exact same error. The Linux firewall was blocking connectivity. One can test ports via telnet. A quick fix is to turn off the firewall and see if it fixes it:

Completely disable the firewall on all of your nodes. Note: this command will not survive a reboot of your machines.

systemctl stop firewalld

Long term fix is that you must configure the firewall to allow the hbase ports.

Note, your version of hbase may use different ports: https://issues.apache.org/jira/browse/HBASE-10123

Get Synonyms, Get Antonyms, synonyms: hear, recognize, discern, distinguish, make out, pick out, perceive, follow, keep up with, take in, understand, comprehend, grasp, see, fathom, puzzle out, work out, apprehend, get to the bottom of, unravel, decipher, get the drift of, catch onto, latch onto, make head or tail of, figure out, get the picture, get the message, twig, suss out, suss The two most common HTTP methods are: GET and POST. The Hypertext Transfer Protocol (HTTP) is designed to enable communications between clients and servers. HTTP works as a request-response protocol between a client and server. A web browser may be the client, and an application on a computer that hosts a web site may be the server.

GET, Examples of get in a Sentence. Verb He got a new bicycle for his birthday. I never did get an answer to my question. GET is a personalized web page with services and information tailored to you; it is available to Cal State LA applicants and continuing students. Within GET you can see: Personal Information. Update your addresses, phone numbers and personal email address. View your campus assigned email address. View your Holds.

jQuery.get(), VerbEdit. get (third-person singular simple present gets, present participle getting​, simple past got or (archaic)  Get more information about Economic Impact Payments. Visit our Economic Impact Payments Information Center to answer your questions about eligibility, payment amounts, what to expect, when to expect it and more. Provide Anonymous Feedback for Get My Payment. Please give us feedback to help us continue to improve this application. Please DO NOT

IRS To Speed Up Stimulus Payments: Act Now To Get Your Check , get £20/£100 etc for something: I bet you could get at least £50 for the painting. Synonyms and related words. Savings for everyone. Save $100 on the Shark IQ R100 Robot Vacuum * Save $100 on the Shark IQ R100 Robot Vacuum * + more floor care deals. + more floor care deals. Sale on jeans for the family starting at $8 * Sale on jeans for the family starting at $8 * Save up to $35 on TurboTax software * Save up to $35 on TurboTax software *

Comments
  • thanks for your patient answer which is really helpful to me, and I was also wondering if I want to connect Hbase with java api and do some 'CRUD' operation in java code locally, can standalone mode satisfy my requirement? How could I do that? I have already have some code here but just don't know how to configure. I google it but seems no example online.
  • Can you put your code here so that I can see if there is anything wrong? Or better make a new question ,where i could give you code feedback.
  • thanks again, and here is the new question where I attach my code : stackoverflow.com/questions/22680433/…
  • Thanks, it was facing this issue because the machine was put to sleep. A simple vagrant halt; vagrant up solved the problem :)
  • Exactly. Restarting hbase is a simple way to solve the issue.