hadoop集群搭建中遇到的问题及解决方法

1、zookeeper启动报错,JMX enabled by default Using config: /home/hadoop/app/zookeeper/bin/…/conf/zoo.cfg Error contacting service. It is probably not running.
问题解决:时钟不一致,没有创建zkdatalog目录
2、zookeeper启动报错如下:
2019-09-04 16:07:11,236 [myid:1] - ERROR [main:QuorumPeer@497] - Unable to load database on disk
java.io.IOException: The current epoch, 38, is older than the last zxid, 244813135875
at org.apache.zookeeper.server.quorum.QuorumPeer.loadDataBase(QuorumPeer.java:479)
at org.apache.zookeeper.server.quorum.QuorumPeer.start(QuorumPeer.java:440)
at org.apache.zookeeper.server.quorum.QuorumPeerMain.runFromConfig(QuorumPeerMain.java:153)
at org.apache.zookeeper.server.quorum.QuorumPeerMain.initializeAndRun(QuorumPeerMain.java:111)
at org.apache.zookeeper.server.quorum.QuorumPeerMain.main(QuorumPeerMain.java:78)
2019-09-04 16:07:11,238 [myid:1] - ERROR [main:QuorumPeerMain@89] - Unexpected exception, exiting abnormally
java.lang.RuntimeException: Unable to run quorum server
at org.apache.zookeeper.server.quorum.QuorumPeer.loadDataBase(QuorumPeer.java:498)
at org.apache.zookeeper.server.quorum.QuorumPeer.start(QuorumPeer.java:440)
at org.apache.zookeeper.server.quorum.QuorumPeerMain.runFromConfig(QuorumPeerMain.java:153)
at org.apache.zookeeper.server.quorum.QuorumPeerMain.initializeAndRun(QuorumPeerMain.java:111)
at org.apache.zookeeper.server.quorum.QuorumPeerMain.main(QuorumPeerMain.java:78)
Caused by: java.io.IOException: The current epoch, 38, is older than the last zxid, 244813135875
at org.apache.zookeeper.server.quorum.QuorumPeer.loadDataBase(QuorumPeer.java:479)
… 4 more
问题解决:将zookeeper的version-2目录备份一份,再重新创建一个新的version-2目录,然后重新启动zookeeper
3、集群中的一个datanode节点(扩展的)没有启动,报错java.net.UnknownHostException
问题解决:查看/etc/hosts文件,看ip和主机名是否配置正确

你可能感兴趣的:(hadoop集群)