0
votes

Am trying to configure HBase in Fully distributed mode. (Using Ubuntu 12.04, Apache Hadoop 2.2 (running in a pseudo mode , HBase version 0.98) Below is my bashrc settings:

export HBASE_HOME=/usr/local/hbase
export PATH=$PATH:$HBASE_HOME/bin
export PATH=$PATH:$HBASE_HOME/sbin
export HADOOP_HOME=$HADOOP_HOME:$HBASE_HOME/conf

Below is my /etc/host

192.168.72.12 namenode
192.168.72.12 master
192.168.72.12 regionserver1

hbase-site.xml is

<name>hbase.rootdir</name>
<value>hdfs://namenode:8020/hbase</value>
</property>
<property>
<name>hbase.defaults.for.version.skip</name>
<value>true</value>
</property>
<property>
<name>hbase.cluster.distributed</name>
<value>true</value>
</property>
<property>
<name>hbase.master</name>
<value>192.168.72.128:60000</value>
</property>

JAVA_HOME is set in HBase-env.sh also HBase_Manages_ZK = true

file regionservers in hbase/conf contains

regionserver1

when hadoop cluster is running, and when i write the command start-hbase.sh, am getting the below error..

localhost: starting zookeeper, logging to /usr/local/hbase/bin/../logs/hbase-hduser-zookeeper-ubuntu.out
starting master, logging to /usr/local/hbase/logs/hbase-hduser-master-ubuntu.out
localhost: starting regionserver, logging to /usr/local/hbase/bin/../logs/hbase-hduser-regionserver-ubuntu.out
regionserver1: ssh: Could not resolve hostname regionserver1: Name or service not known
#: ssh: Could not resolve hostname #: Name or service not known

Also my ssh service is running. Please help me find the solution. Thanks in advance.

Edited: (Added the snapshot of regionserver log file

2014-12-13 18:49:12,080 INFO  [regionserver60020-SendThread(localhost:2181)] zookeeper.ClientCnxn: Opening socket connection to server localhost/127.0.0.1:2181. Will not attempt to authenticate using SASL (unknown error)
2014-12-13 18:49:12,081 WARN  [regionserver60020-SendThread(localhost:2181)] zookeeper.ClientCnxn: Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: Connection refused
    at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
    at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:739)
    at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:350)
    at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1068)
2014-12-13 18:49:13,183 INFO  [regionserver60020-SendThread(localhost:2181)] zookeeper.ClientCnxn: Opening socket connection to server localhost/127.0.0.1:2181. Will not attempt to authenticate using SASL (unknown error)
2014-12-13 18:49:13,184 WARN  [regionserver60020-SendThread(localhost:2181)] zookeeper.ClientCnxn: Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: Connection refused
    at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
    at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:739)
    at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:350)
    at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1068)
2014-12-13 18:49:14,114 INFO  [regionserver60020] ipc.RpcServer: Stopping server on 60020
2014-12-13 18:49:14,132 FATAL [regionserver60020] regionserver.HRegionServer: ABORTING region server ubuntu,60020,1418476720081: Initialization of RS failed.  Hence aborting RS.
java.io.IOException: Received the shutdown message while waiting.
    at org.apache.hadoop.hbase.regionserver.HRegionServer.blockAndCheckIfStopped(HRegionServer.java:776)
    at org.apache.hadoop.hbase.regionserver.HRegionServer.initializeZooKeeper(HRegionServer.java:725)
    at org.apache.hadoop.hbase.regionserver.HRegionServer.preRegistrationInitialization(HRegionServer.java:697)
    at org.apache.hadoop.hbase.regionserver.HRegionServer.run(HRegionServer.java:830)
    at java.lang.Thread.run(Thread.java:744)
2014-12-13 18:49:14,133 FATAL [regionserver60020] regionserver.HRegionServer: RegionServer abort: loaded coprocessors are: []
2014-12-13 18:49:14,133 INFO  [regionserver60020] regionserver.HRegionServer: STOPPED: Initialization of RS failed.  Hence aborting RS.
2014-12-13 18:49:14,152 INFO  [regionserver60020] ipc.RpcServer: Stopping server on 60020
2014-12-13 18:49:14,154 INFO  [regionserver60020] regionserver.HRegionServer: Stopping infoServer
2014-12-13 18:49:14,188 INFO  [regionserver60020] mortbay.log: Stopped [email protected]:60030
2014-12-13 18:49:14,203 ERROR [main] regionserver.HRegionServerCommandLine: Region server exiting
java.lang.RuntimeException: HRegionServer Aborted
    at org.apache.hadoop.hbase.regionserver.HRegionServerCommandLine.start(HRegionServerCommandLine.java:66)
    at org.apache.hadoop.hbase.regionserver.HRegionServerCommandLine.run(HRegionServerCommandLine.java:85)
    at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
    at org.apache.hadoop.hbase.util.ServerCommandLine.doMain(ServerCommandLine.java:126)
    at org.apache.hadoop.hbase.regionserver.HRegionServer.main(HRegionServer.java:2383)
2014-12-13 18:49:14,215 INFO  [Thread-9] regionserver.ShutdownHook: Shutdown hook starting; hbase.shutdown.hook=true; fsShutdownHook=org.apache.hadoop.fs.FileSystem$Cache$ClientFinalizer@61bdbb58
2014-12-13 18:49:14,220 INFO  [Thread-9] regionserver.HRegionServer: STOPPED: Shutdown hook
2014-12-13 18:49:14,224 INFO  [Thread-9] regionserver.ShutdownHook: Starting fs shutdown hook thread.
2014-12-13 18:49:14,229 INFO  [Thread-9] regionserver.ShutdownHook: Shutdown hook finished.
2

2 Answers

0
votes

Try to use Cloudera CDH5 and Express Manager distribution. It is free and saves lots of time. It fully supports Ubuntu/Debian system.

I've found that ZooKeeper/HDFS/HBase configuration for distributed cluster is very tricky. For example you have to restart cluster by restarting services in correct order. For example, start order is kind of the following: ZooKeeper > HDFS/YARN > HBase.

Here is my success story: I've tried to prepare Hadoop environment with not only HBase, but with Impala, Spark, Ozzie, Hive and Hue. In addition in my case HBase must be with Phoenix module which is not a part of CHD5. I've succeed with single node cluster, make manually. But I've got lost in cluster configuration... I've stuck in xmls, hostnames and so on.

After I decided to spent some time on learning Cloudera's distribution, I've installed CM5 packages, these are Cloudera Manager (i.e. CM5). Next I've started web interface and installed all required deb-packages via web interface(yes, it install full set of packages which is big overhead if you don't need them). That is it! It was fast and confident.

Next is configuration. All was made via web interface as well. You just selecting hosts involved in cluster, an that choose services you need i.e. HBase and so on. After you assign roles, Cloudera Manager just starts cluster. Finished. That is all.

This software also has good collection of best practices such as monitoring, config versioning, tips and tricks, software updates and etc. More important it allow you to get working cluster very quickly, after that you can continue research how to optimize installation procedure.

Good luck!

0
votes

Along with adding entry for host name in to /etc/hosts you need to add entry in to /etc/hostname.

Add the entry to /etc/hostname and then try if you can ping regionserver1