HBase - 运行start-hbase.sh时完全分布式HBase错误

时间:2014-12-13 14:33:18

标签: ubuntu hadoop ssh configuration hbase

尝试在完全分布式模式下配置HBase。 (使用Ubuntu 12.04,Apache Hadoop 2.2(以伪模式运行,HBase版本0.98) 以下是我的bashrc设置:

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

下面是我的/ etc / host

192.168.72.12 namenode
192.168.72.12 master
192.168.72.12 regionserver1

hbase-site.xml是

<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在HBase-env.sh中设置也HBase_Manages_ZK = true

hbase / conf中的文件regionservers包含

regionserver1

当hadoop集群正在运行时,当我编写命令start-hbase.sh时,我收到以下错误..

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

我的ssh服务也正在运行。 请帮我找到解决方案。 提前谢谢。

编辑:(添加了regionserver日志文件的快照

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 SelectChannelConnector@0.0.0.0: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 个答案:

答案 0 :(得分:0)

尝试使用Cloudera CDH5Express Manager分发。它是免费的,节省了大量时间。它完全支持Ubuntu / Debian系统。

我发现分布式集群的ZooKeeper / HDFS / HBase配置非常棘手。例如,您必须通过以正确的顺序重新启动服务来重新启动集群。例如,开始订单类似于以下内容:ZooKeeper&gt; HDFS / YARN&gt; HBase

这是我的成功故事:我不仅尝试使用HBase,还使用Impala,Spark,Ozzie,Hive和Hue来准备Hadoop环境。另外在我的情况下,HBase必须与Phoenix模块一起使用,而该模块不是CHD5的一部分。我已成功使用单节点群集,手动制作。但是我在群集配置方面迷失了......我已经陷入了xmls,主机名等等。

在我决定花一些时间学习Cloudera的发行版之后,我已经安装了CM5软件包,这些是Cloudera Manager(即CM5)。接下来,我已经启动了Web界面并通过Web界面安装了所有必需的deb-package(是的,如果您不需要它,它会安装全套软件包,这是一个很大的开销)。这就对了!它快速而自信。

接下来是配置。所有这些都是通过网络界面制作的。您只需选择群集中涉及的主机,即选择所需的服务,即HBase等。分配角色后,Cloudera Manager只会启动群集。成品。就是这样。

该软件还具有良好的最佳实践集合,例如监控,配置版本控制,提示和技巧,软件更新等。更重要的是,它可以让您快速获得工作集群,之后您可以继续研究如何优化安装过程

祝你好运!

答案 1 :(得分:0)

除了在/ etc / hosts中添加主机名条目外,您还需要在/ etc / hostname中添加条目。

将条目添加到/ etc / hostname,然后尝试ping domainserver1