【问题标题】:Installation issues in hadoop,hbase,zookerper in single node in debianDebian单节点hadoop、hbase、zokerper的安装问题
【发布时间】:2013-07-22 05:49:41
【问题描述】:

我正在尝试在我的本地机器上安装 hadoop、habse、zookeeper。但是我在 zookeeper 连接中遇到了问题。

以下是hbase主日志:

2013-07-21 22:01:24,603 INFO org.apache.zookeeper.ZooKeeper: Client environment:java.io.tmpdir=/tmp
2013-07-21 22:01:24,603 INFO org.apache.zookeeper.ZooKeeper: Client environment:java.compiler=<NA>
2013-07-21 22:01:24,603 INFO org.apache.zookeeper.ZooKeeper: Client environment:os.name=Linux
2013-07-21 22:01:24,603 INFO org.apache.zookeeper.ZooKeeper: Client environment:os.arch=amd64
2013-07-21 22:01:24,603 INFO org.apache.zookeeper.ZooKeeper: Client environment:os.version=3.2.0-4-amd64
2013-07-21 22:01:24,603 INFO org.apache.zookeeper.ZooKeeper: Client environment:user.name=gaurav
2013-07-21 22:01:24,604 INFO org.apache.zookeeper.ZooKeeper: Client environment:user.home=/home/gaurav
2013-07-21 22:01:24,604 INFO org.apache.zookeeper.ZooKeeper: Client environment:user.dir=/home/hbase/hbase-0.94.6.1/bin
2013-07-21 22:01:24,605 INFO org.apache.zookeeper.ZooKeeper: Initiating client connection, connectString=localhost:2181 sessionTimeout=180000 watcher=master:60000
2013-07-21 22:01:24,636 INFO org.apache.zookeeper.ClientCnxn: Opening socket connection to server localhost/127.0.0.1:2181. Will not attempt to authenticate using SASL (unknown error)
2013-07-21 22:01:24,637 INFO org.apache.hadoop.hbase.zookeeper.RecoverableZooKeeper: The identifier of this process is 22559@gaurav
2013-07-21 22:01:24,643 WARN org.apache.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:708)
    at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:350)
    at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1068)

有人可以帮我解决这个问题吗?

我从这个链接配置 hadoop http://www.michael-noll.com/tutorials/running-hadoop-on-ubuntu-linux-single-node-cluster/?

hbase配置hbase-site.xml

<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<!--
/**
 * Copyright 2010 The Apache Software Foundation
 *
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
-->
<configuration>
<property>
<name>hbase.rootdir</name>
<value>hdfs://localhost:9000/hbase</value>
<description>The directory shared by RegionServers</description>
</property>
<property>
<name>hbase.zookeeper.quorum</name>
<value>localhost</value>
<description>Comma separated list of servers in the ZooKeeper Quorum.
For example,
"host1.mydomain.com,host2.mydomain.com,host3.mydomain.com".
By default this is set to localhost for local and pseudo-distributed modes of operation. For a fully-distributed setup, this should be set to a full list of ZooKeeper quorum servers. If HBASE_MANAGES_ZK is set in hbase-env.shthis is the list of servers which we will start/stop ZooKeeper on.
</description>
</property>
<property>
<name>hbase.cluster.distributed</name>
<value>true</value>
</property>
<property>
<name>hbase.zookeeper.quorum</name>
<value>localhost</value>
</property>
<property>
<name>dfs.replication</name>
<value>1</value>
</property>
<property>
<name>hbase.master.port</name>
<value>60000</value>
</property>
<property>
<name>hbase.zookeeper.property.clientPort</name>
<value>2222</value>
</property>
<property>
<name>hbase.zookeeper.property.dataDir</name>
<value>/home/hbase/zookeeper</value>
</property>
 <property>
<name>zookeeper.znode.parent</name>
<value>/home/hbase/hbase-0.94.6.1</value>
</property>
<property>
<name>hbase.zookeeper.property.maxClientCnxns</name>
<value>1000</value>
</property>
</configuration>

hbase-env.sh

导出 JAVA_HOME=/usr/local/jdk1.7.0_25 导出 HBASE_MANAGES_ZK=true 这个文件中只有这个设置

我只有两个文件夹 hadoop 和 hbase ,一个用于 hadoop 包,一个用于 hbase 包

hbase 主日志 http://pastebin.com/TUvx4BgX?

【问题讨论】:

    标签: java hadoop hbase apache-zookeeper


    【解决方案1】:

    您的 hbase master 没有正常启动,这就是它无法连接到 60000 端口的原因。在您的 hadoop 和 hbase conf 中检查以下内容。

    1. 在 hbase/conf/hbase-site.xml 中检查 hbase.master 属性的值。它应该是 60000。
    2. 检查hbase conf中的端口是否正确配置了hadoop端口。
    3. 检查 zookeeper conf 是否具有相同的 hbase master 端口。

    同样做netstat,检查hadoop和hbase端口是否可用。

    如果你能附上 conf 文件,我可以给你更多细节

    【讨论】:

    • 我不知道。如果我需要单独安装 Zookeeper。我只是在hbase中配置hbase-site.xml,在core-site.xml中配置hadoop,是否足以启动zookeeper或者我需要单独安装zookeeper
    • 请检查我已附加 conf 文件并记录 hbase 的新更新问题。
    • 嗨 Gaurav,您不必单独安装 zookeeper。在您指定的链接中michael-noll.com/tutorials/…,端口 54310 用于 fs.default.name。但在您的 hbase conf 中它是 9000。请制作确保这两个端口相同。同样在上述配置中,hbase.zookeeper.quorum 属性定义了两次,不需要 dfs.replication。
    • 我能够配置所有东西..并且一切运行良好。我会给一个博客的链接..我会告诉我面临的问题以及解决方案是什么。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2013-06-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多