retry.RetryInvocationHandler (RetryInvocationHandler.java:invoke(140)) - Exception while invoking getFileInfo of class ClientNamenodeProtocolTranslatorPB over bdata236/192.168.1.236:9000 after 3 fail
报错信息如下
2017-12-20 12:29:09,161 INFO [main]: retry.RetryInvocationHandler (RetryInvocationHandler.java:invoke(140))
- Exception while invoking getFileInfo of class ClientNamenodeProtocolTranslatorPB over bdata236/192.168.1.236:9000
after 3 fail over attempts. Trying to fail over after sleeping for 5584ms. org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.ipc.StandbyException): Operation category READ is not supported in state standby at org.apache.hadoop.hdfs.server.namenode.ha.StandbyState.checkOperation(StandbyState.java:87) at org.apache.hadoop.hdfs.server.namenode.NameNode$NameNodeHAContext.checkOperation(NameNode.java:1719)
- 我出现这个问题的原因是两个namenode都是standby状态,发现是因为zkfc没有起来,启动zkfc就OK了。
进入hadoop/bin目录下
./hadoop-daemon.sh start zkfc
- 还有可能是因为防火墙问题,关闭即可
service iptables stop (centos6)
systemctl stop firewalld(centos7)