Operation category READ is not supported in state standby

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Operation category READ is not supported in state standby相关的知识,希望对你有一定的参考价值。

参考技术A https://www.cnblogs.com/wqbin/p/11635175.html

由于两台namenode都是备节点,需要开启zk初始化,
hdfs zkfc -formatZK,hadoop对zk进行创建,谁创建成功谁为主

hdfs zkfc -formatZK

hdfs zkfc -formatZK
hdfs haadmin -transitionToActive --forcemanual nn1
hdfs haadmin -getServiceState namenode1

https://blog.csdn.net/u012599988/article/details/46926851?utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-1.nonecase&depth_1-utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-1.nonecase

https://blog.csdn.net/sdauzyh/article/details/52237965

https://blog.csdn.net/Kohang/article/details/79029688?utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-2.nonecase&depth_1-utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-2.nonecase

hadoop错误Operation category READ is not supported in state standby

报如下错误

 

解决方法:

        方法一:(结果不起作用)

        通过Shell命令方式,hadoop/bin/hdfs haadmin -failover --forceactive hadoop2 hadoop1(注意,这种方式本来是在手动故障恢复中进行强制切换NameNode的做法)

返回结果,不支持,并且诚恳的提示,这种方式是在手动故障转移的情况下,该命令才会起作用

        方法二:(奏效)

       我使用JPS检查了一下ZooKeeper集群的状态,发现没有任何征兆的失效了两个,原来是ZK的原因,于是重新启动ZK集群,然后重新启动ZKFailoverController,没有这个角色存在,自然不会自动切换NameNode了

 

如果,您认为阅读这篇博客让您有些收获,不妨点击一下右下角的【推荐】。
如果,您希望更容易地发现我的新博客,不妨点击一下左下角的【关注我】。
如果,您对我的博客所讲述的内容有兴趣,请继续关注我的后续博客,我是【刘超★ljc】。

本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。

以上是关于Operation category READ is not supported in state standby的主要内容,如果未能解决你的问题,请参考以下文章

Operation category READ is not supported in state standby

hadoop错误Operation category READ is not supported in state standby

hadoophadoop 报错 Operation category READ is not supported in state standby

Operation category READ is not supported in state standby

Namenode启动报错Operation category JOURNAL is not supported in state standby

错误处理: socket.timeout: The read operation timed out