0

I was following a book Hadoop for Dummies. Book’s instruction to amend the file hbase-site.xml in HBase like this :

    <configuration>
      <property>
        <name>hbase.rootdir</name>
        <value>file:///home/biadmin/my-local-hbase/hbase-data</value>
      </property>
      <property>
        <name>hbase.cluster.distributed</name>
        <value>true</value>
      </property>
      <property>
        <name>hbase.zookeeper.property.clientPort</name>
        <value>2222</value>
        <description>Property from ZooKeeper's config zoo.cfg.
        The port at which the clients will connect.
        </description>
      </property>
      <property>
        <name>hbase.zookeeper.property.dataDir</name>
        <value>/home/biadmin/my-local-hbase/zookeeper</value>
      </property>
      <property>
        <name>hbase.zookeeper.quorum</name>
        <value>bivm</value>
      </property>
    </configuration>

It says :

Using the hbase.rootdir property, you specify a directory in the local file system to store the HBase data. In production environments, this property would point to the HDFS for the data store. You also set the hbase.cluster.distributed property to true which causes HBase to start up in a pseudodistributed mode. If you would choose not to set this property to true, HBase would run all of the necessary processes in a single Java Virtual Machine (JVM). However, for the sake of illustration, pseudo-distributed mode will cause HBase to start a RegionServer instance, a MasterServer instance, and a Zookeeper process. Additionally, you need to specify the hbase.zookeeper. property.clientPort, the directory where Zookeeper will store its data (hbase.zookeeper.property.dataDir) and a list of servers on which Zookeeper will run to form a quorum (hbase.zookeeper.quorum). For standalone, you specify only the single Zookeeper server bivm.

When I start hbase, I get this error :

Bivm: ssh: Could not resolve hostname bivm.

Could anyone please advise how to solve this problem? Thanks!!!

Mifeet
  • 12,949
  • 5
  • 60
  • 108
Nipponho
  • 91
  • 1
  • 5

1 Answers1

0

HBase depends on a service called Zookeeper to manage its state. By default, HBase manages the Zookeeper service for you (unless you change HBASE_MANAGES_ZK variable), but you need to configure it. One of the options is directly in hbase-site.xml - that's what hbase.zookeeper.* properties are for.

Because Zookeeper may run as a distributed service, hbase.zookeeper.quorum contains a comma-separated list of hosts on where Zookeeper is running. I assume you're running on just a single machine, therefore you should set its value to localhost:

<property>
  <name>hbase.zookeeper.quorum</name>
  <value>localhost</value>
</property>

You have previously set it to bivm, which is a hostname that doesn't exist on your network and you cannot resolve it.

I recommend you to read more about the topic at HBase documentation or at this question.

Community
  • 1
  • 1
Mifeet
  • 12,949
  • 5
  • 60
  • 108
  • Hi Mifeet, thanks for your reply. I changed it to localhost instead of bivm. This time the error message says local host: ssh: connect to host local host port 22: Connection refused. The documentation is also using client port 2222, but it says default is 2181. I tried to amend to 2181 but still connection refused. – Nipponho Apr 27 '16 at 20:40
  • Yeah, the `22` port is an interesting clue. Perhaps you should post more HBase logs to see what's happening. I can't think of any reason why HBase should run ssh. – Mifeet Apr 27 '16 at 20:46
  • Hi Mifeet, i can see 5 application log files : RegionServer, Thrit, Thrift2, Rest &, Master. Which one would you like to see? And do i copy and paste the whole log here? It's quite a lot. Sorry first time asking a question in stack overflow. – Nipponho Apr 28 '16 at 01:14
  • I'm not sure I can help you at the moment. If you've changed quorum to localhost, perhaps you could start tracing the root cause by finding out where does the `bivm` hostname come from? Is it anywhere in your configuration? – Mifeet Apr 28 '16 at 08:32
  • After u suggested i change the quorum to localhost instead of bivm, the error message no longer mentions bivm. It now says "local host: ssh: connect to host local host port 22: Connection refused". Seems like the problem is with port 2222. – Nipponho Apr 28 '16 at 08:38