配置了namenode故障自动切换,但kill掉active后,standby并不能切换,只有当复活kill掉的namenode后,standby才会切换为active。
经过查看zkfc日志和journode日志,发现是不能创建ssh连接。
判断原因可能是:centos8 高版本的OpenSSH 解析不了当前版的密钥,所以配置修改如下:
<property>
<name>dfs.ha.fencing.methods</name>
<value>shell(/bin/true)</value>
</property>