问题描述:在启动hbase时,刚启动时,通过jps命令可以查看到HMaster服务已被启动,但是过一会儿HMaster服务便自动停止了,错误信息如下:
2015-07-15 20:30:24,360 INFO org.apache.zookeeper.ClientCnxn: Opening socket connection to server sdw2/192.168.10.202:2181. Will not attempt to authenticate using SASL
 (Unable to locate a login configuration)
2015-07-15 20:30:24,364 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:599)
        at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:350)
        at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1068)



解决方法:
1、同步hbase集群和ZooKeeper集群主机的时间,确保误差在30秒以内。
2、关闭ipv6,并修改/etc/hosts,注释掉以"::1"开头的那行代码

Linux关闭ipv6的方法可以参考: linux 关闭停用ipv6方法






Logo

权威|前沿|技术|干货|国内首个API全生命周期开发者社区

更多推荐