hbase 启动zookeeper失败,请各位大牛帮忙看看

lubber__land 2014-01-16 02:03:46
hbase启动,datanode节点上的日志:
hbase-hadoop-regionserver-datatestnode.log
2014-01-16 19:11:11,875 INFO org.apache.zookeeper.ClientCnxn: Opening socket connection to server nametestnode/192.168.31.92:2181. Will not attempt to authenticate using SASL (unknown error)
2014-01-16 19:11:11,876 WARN org.apache.zookeeper.ClientCnxn: Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: 拒绝连接
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:735)
at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:350)
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1068)
2014-01-16 19:25:18,481 INFO org.apache.zookeeper.ClientCnxn: Opening socket connection to server datatestnode/192.168.31.67:2181. Will not attempt to authenticate using SASL (unknown error)
2014-01-16 19:25:18,481 WARN org.apache.zookeeper.ClientCnxn: Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: 拒绝连接


如果我手动使用hbase-daemon.sh start zookeeper 启动namenode和datanode上的zookeeper没问题
用zkServer.sh status 可以看到一个是leader一个是follower
但是用start-hbase.sh 就会报上面那个错误
防火墙已关,ssh没问题,hadoop已启动,namenode和datanode的hdfs都ok
datanode服务器上文件都是从namenode上scp过去的,不存在版本不一致的问题

我的配置:
/etc/hosts:
192.168.31.92 nametestnode
192.168.31.67 datatestnode
hostname也没有问题
hbase-env.sh :
export HBASE_MANAGES_ZK=false

hbase-site.xml
<configuration>
<property>
<name>hbase.rootdir</name>
<value>hdfs://nametestnode:9000/data01/hadoop/data/dfs.data.dir</value>
</property>
<property>
<name>hbase.cluster.distributed</name>
<value>true</value>
</property>
<property>
<name>hbase.master</name>
<value>hdfs://nametestnode:9002</value>
</property>
<property>
<name>hbase.zookeeper.quorum</name>
<value>nametestnode</value>
</property>
<property>
<name>hbase.zookeeper.property.dataDir</name>
<value>/data01/hadoop/runtimes/zookeeper/data</value>
</property>

</configuration>


zoo.cfg
# The number of milliseconds of each tick
tickTime=2000
# The number of ticks that the initial
# synchronization phase can take
initLimit=10
# The number of ticks that can pass between
# sending a request and getting an acknowledgement
syncLimit=5
# the directory where the snapshot is stored.
# do not use /tmp for storage, /tmp here is just
# example sakes.
dataDir=/data01/hadoop/runtimes/zookeeper/data
# the port at which the clients will connect
clientPort=2181
#
# Be sure to read the maintenance section of the
# administrator guide before turning on autopurge.
#
# http://zookeeper.apache.org/doc/current/zookeeperAdmin.html#sc_maintenance
#
# The number of snapshots to retain in dataDir
#autopurge.snapRetainCount=3
# Purge task interval in hours
# Set to "0" to disable auto purge feature
#autopurge.purgeInterval=1
dataLogDir=/data01/hadoop/runtimes/zookeeper/logs
server.1=nametestnode:2888:3888
server.2=datatestnode:2888:3888


myid也没填错,namenode是1,datanode是2

请给位看看到底咋整啊
...全文
11356 6 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
lubber__land 2014-10-22
  • 打赏
  • 举报
回复
最终发现是因为两个节点时间不一致导致的 唉 用了ntpdate 把时间调整一致 就ok了 多谢了各位
撸大湿 2014-01-17
  • 打赏
  • 举报
回复
记得start-hbase.sh调用的就是hbase-daemon.sh脚本 应该不是脚本BUG <name>hbase.zookeeper.quorum</name> <value>nametestnode</value> 你的配置只链接了nametestnode节点,把datatestnode也配到链接上去 或者修改zoo.cfg server.2=datatestnode:2888:3888 把这个去掉,只启动单节点ZK
lubber__land 2014-01-16
  • 打赏
  • 举报
回复
regionservers : nametestnode datatestnode
lubber__land 2014-01-16
  • 打赏
  • 举报
回复
引用 1 楼 u013352393 的回复:
export HBASE_MANAGES_ZK=true 改成让hbase托管启动试试
试过了,报的错一样的 同样,使用hbase-daemon.sh start zookeeper 启动namenode和datanode上的zookeeper没问题 用zkServer.sh status 可以看到一个是leader一个是follower 但是用start-hbase.sh 还是会报一样的错误 。。。。。
zippooooo 2014-01-16
  • 打赏
  • 举报
回复
export HBASE_MANAGES_ZK=true 改成让hbase托管启动试试

20,848

社区成员

发帖
与我相关
我的任务
社区描述
Hadoop生态大数据交流社区,致力于有Hadoop,hive,Spark,Hbase,Flink,ClickHouse,Kafka,数据仓库,大数据集群运维技术分享和交流等。致力于收集优质的博客
社区管理员
  • 分布式计算/Hadoop社区
  • 涤生大数据
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧