当前位置:   article > 正文

ookeeper.ClientCnxn: Opening socket connection to server hadoop2/192.168.112.131:2181. Will not atte_hdfs zkfc -formatzk unable to read additional data

hdfs zkfc -formatzk unable to read additional data from server sessionid 0x2
2020-02-02 08:40:21,542 INFO zookeeper.ZooKeeper: Initiating client connection, connectString=hadoop1:2181,hadoop2:2181,hadoop3:2181 sessionTimeout=10000 watcher=org.apache.hadoop.ha.ActiveStandbyElector$WatcherWithClientRef@42e99e4a
2020-02-02 08:40:21,558 INFO zookeeper.ClientCnxn: Opening socket connection to server hadoop2/192.168.112.131:2181. Will not attempt to authenticate using SASL (unknown error)
2020-02-02 08:40:21,565 INFO zookeeper.ClientCnxn: Socket error occurred: hadoop2/192.168.112.131:2181: No route to host
2020-02-02 08:40:21,666 INFO zookeeper.ClientCnxn: Opening socket connection to server hadoop1/192.168.112.130:2181. Will not attempt to authenticate using SASL (unknown error)
2020-02-02 08:40:21,667 INFO zookeeper.ClientCnxn: Socket connection established to hadoop1/192.168.112.130:2181, initiating session
2020-02-02 08:40:21,672 INFO zookeeper.ClientCnxn: Unable to read additional data from server sessionid 0x0, likely server has closed socket, closing socket connection and attempting reconnect
2020-02-02 08:40:22,293 INFO zookeeper.ClientCnxn: Opening socket connection to server hadoop3/192.168.112.132:2181. Will not attempt to authenticate using SASL (unknown error)
2020-02-02 08:40:22,293 INFO zookeeper.ClientCnxn: Socket error occurred: hadoop3/192.168.112.132:2181: No route to host
2020-02-02 08:40:24,351 INFO zookeeper.ClientCnxn: Opening socket connection to server hadoop2/192.168.112.131:2181. Will not attempt to authenticate using SASL (unknown error)
2020-02-02 08:40:24,352 INFO zookeeper.ClientCnxn: Socket error occurred: hadoop2/192.168.112.131:2181: No route to host
2020-02-02 08:40:24,996 INFO zookeeper.ClientCnxn: Opening socket connection to server hadoop1/192.168.112.130:2181. Will not attempt to authenticate using SASL (unknown error)
2020-02-02 08:40:24,996 INFO zookeeper.ClientCnxn: Socket connection established to hadoop1/192.168.112.130:2181, initiating session
2020-02-02 08:40:24,998 INFO zookeeper.ClientCnxn: Unable to read additional data from server sessionid 0x0, likely server has closed socket, closing socket connection and attempting reconnect
2020-02-02 08:40:25,736 INFO zookeeper.ClientCnxn: Opening socket connection to server hadoop3/192.168.112.132:2181. Will not attempt to authenticate using SASL (unknown error)
2020-02-02 08:40:25,737 INFO zookeeper.ClientCnxn: Socket error occurred: hadoop3/192.168.112.132:2181: No route to host
2020-02-02 08:40:27,770 INFO zookeeper.ClientCnxn: Opening socket connection to server hadoop2/192.168.112.131:2181. Will not attempt to authenticate using SASL (unknown error)
2020-02-02 08:40:27,771 INFO zookeeper.ClientCnxn: Socket error occurred: hadoop2/192.168.112.131:2181: No route to host
2020-02-02 08:40:28,097 INFO zookeeper.ClientCnxn: Opening socket connection to server hadoop1/192.168.112.130:2181. Will not attempt to authenticate using SASL (unknown error)
2020-02-02 08:40:28,097 INFO zookeeper.ClientCnxn: Socket connection established to hadoop1/192.168.112.130:2181, initiating session
2020-02-02 08:40:28,098 INFO zookeeper.ClientCnxn: Unable to read additional data from server sessionid 0x0, likely server has closed socket, closing socket connection and attempting reconnect
2020-02-02 08:40:28,292 INFO zookeeper.ClientCnxn: Opening socket connection to server hadoop3/192.168.112.132:2181. Will not attempt to authenticate using SASL (unknown error)
2020-02-02 08:40:28,293 INFO zookeeper.ClientCnxn: Socket error occurred: hadoop3/192.168.112.132:2181: No route to host
2020-02-02 08:40:29,648 INFO zookeeper.ClientCnxn: Opening socket connection to server hadoop2/192.168.112.131:2181. Will not attempt to authenticate using SASL (unknown error)
2020-02-02 08:40:29,649 INFO zookeeper.ClientCnxn: Socket error occurred: hadoop2/192.168.112.131:2181: No route to host
2020-02-02 08:40:30,037 INFO zookeeper.ClientCnxn: Opening socket connection to server hadoop1/192.168.112.130:2181. Will not attempt to authenticate using SASL (unknown error)
2020-02-02 08:40:30,037 INFO zookeeper.ClientCnxn: Socket connection established to hadoop1/192.168.112.130:2181, initiating session
2020-02-02 08:40:30,039 INFO zookeeper.ClientCnxn: Unable to read additional data from server sessionid 0x0, likely server has closed socket, closing socket connection and attempting reconnect
2020-02-02 08:40:31,060 INFO zookeeper.ClientCnxn: Opening socket connection to server hadoop3/192.168.112.132:2181. Will not attempt to authenticate using SASL (unknown error)
2020-02-02 08:40:31,062 INFO zookeeper.ClientCnxn: Socket error occurred: hadoop3/192.168.112.132:2181: No route to host
2020-02-02 08:40:31,567 ERROR ha.ActiveStandbyElector: Connection timed out: couldn't connect to ZooKeeper in 10000 milliseconds
2020-02-02 08:40:31,798 INFO zookeeper.ZooKeeper: Session: 0x0 closed
2020-02-02 08:40:31,800 ERROR ha.ZKFailoverController: Unable to start failover controller. Unable to connect to ZooKeeper quorum at hadoop1:2181,hadoop2:2181,hadoop3:2181. Please check the configured value for ha.zookeeper.quorum and ensure that ZooKeeper is running.
org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss
	at org.apache.zookeeper.KeeperException.create(KeeperException.java:102)
	at org.apache.hadoop.ha.ActiveStandbyElector$WatcherWithClientRef.waitForZKConnectionEvent(ActiveStandbyElector.java:1165)
	at org.apache.hadoop.ha.ActiveStandbyElector$WatcherWithClientRef.access$400(ActiveStandbyElector.java:1136)
	at org.apache.hadoop.ha.ActiveStandbyElector.connectToZooKeeper(ActiveStandbyElector.java:699)
	at org.apache.hadoop.ha.ActiveStandbyElector.createConnection(ActiveStandbyElector.java:853)
	at org.apache.hadoop.ha.ActiveStandbyElector.<init>(ActiveStandbyElector.java:272)
	at org.apache.hadoop.ha.ActiveStandbyElector.<init>(ActiveStandbyElector.java:215)
	at org.apache.hadoop.ha.ZKFailoverController.initZK(ZKFailoverController.java:356)
	at org.apache.hadoop.ha.ZKFailoverController.doRun(ZKFailoverController.java:194)
	at org.apache.hadoop.ha.ZKFailoverController.access$000(ZKFailoverController.java:60)
	at org.apache.hadoop.ha.ZKFailoverController$1.run(ZKFailoverController.java:175)
	at org.apache.hadoop.ha.ZKFailoverController$1.run(ZKFailoverController.java:171)
	at org.apache.hadoop.security.SecurityUtil.doAsLoginUserOrFatal(SecurityUtil.java:484)
	at org.apache.hadoop.ha.ZKFailoverController.run(ZKFailoverController.java:171)
	at org.apache.hadoop.hdfs.tools.DFSZKFailoverController.main(DFSZKFailoverController.java:195)
2020-02-02 08:40:31,801 INFO zookeeper.ClientCnxn: EventThread shut down for session: 0x0
2020-02-02 08:40:31,806 INFO tools.DFSZKFailoverController: SHUTDOWN_MSG: 
/************************************************************

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52

原因是环境变量少配置了一个东西 ,再环境变量中配置

export JAVA_HOME=/home/jackray/jdk1.8.0_241
export MAVEN_HOME=/home/jackray/apache-maven-3.6.2
export HADOOP_HOME=/home/jackray/hadoop-3.2.1
export HADOOP_COMMON_LIB_NATIVE_DIR=$HADOOP_HOME/lib/native
export HADOOP_OPTS="-Djava.library.path=$HADOOP_HOME/lib"
export PATH=$PATH:$JAVA_HOME/bin:$JAVA_HOME/lib/tools.jar:$MAVEN_HOME/bin:$HADOOP_HOME/bin

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7

配置这两项

export HADOOP_COMMON_LIB_NATIVE_DIR=$HADOOP_HOME/lib/native
export HADOOP_OPTS="-Djava.library.path=$HADOOP_HOME/lib"
  • 1
  • 2

然后执行

hdfs --daemon start zkfc
  • 1

不再报错
查看java进程

2385 QuorumPeerMain
5506 Jps
5325 DFSZKFailoverController
2591 JournalNode

  • 1
  • 2
  • 3
  • 4
  • 5

DFSZKFailoverController已经启动 解决问题

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/Monodyee/article/detail/674423
推荐阅读
相关标签
  

闽ICP备14008679号