Hadoop NameNode 高可用 无法自动切换
2019-11-12 本文已影响0人
IT_小白
在不考虑自己配置错误的前提下,常见的问题为下面两种
第一种:
没有 fuser 命令,NameNode 节点 执行: yum -y install psmisc 解决 没有 fuser 问题
2016-10-16 00:09:32,465 WARN org.apache.hadoop.ha.SshFenceByTcpPort: PATH=$PATH:/sbin:/usr/sbin fuser -v -k -n tcp 53310 via ssh: bash: fuser: command not found
2016-10-16 00:09:32,465 WARN org.apache.hadoop.ha.NodeFencer: Fencing method org.apache.hadoop.ha.SshFenceByTcpPort(null) was unsuccessful.
2016-10-16 00:09:32,465 WARN org.apache.hadoop.ha.ActiveStandbyElector: Exception handling the winning of election
2016-10-16 00:09:34,552 WARN org.apache.hadoop.ha.FailoverController: Unable to gracefully make NameNode at server101.hadoop.com/192.168.1.101:53310 standby (unable to connect)
2016-10-16 00:09:34,592 WARN org.apache.hadoop.ha.SshFenceByTcpPort.jsch: Permanently added 'server101.hadoop.com' (RSA) to the list of known hosts.
如果第一种无法解决你的问题,在尝试第二种方式解决。。。。。。。。。
第二种 :
因为是客户生产环境所以没有日志
修改hdfs-site.xml中的配置文件
1.亲测成功
<property>
<name>dfs.ha.fencing.methods</name>
<value>sshfence
shell(/bin/true)</value>
</property>
2.还未测试
<property>
<name>dfs.ha.fencing.methods</name>
<value>sshfence</value>
<value>shell(/bin/true)</value>
</property>