解决FATAL ha.BootstrapStandby: Unable to fetch namespace information from active NN at node1/ip.....
2023-04-18 12:59:19 时间
目录
1. 报错详细描述
在搭建 HDFS 高可用集群的过程中,执行 hdfs namenode -bootstrapStandby
进行同步的时候出现报错:
FATAL ha.BootstrapStandby: Unable to fetch namespace information from active NN at node1/192.168.146.111:8020: Call From node2/192.168.146.112 to node1:8020 failed on connection excep
tion: java.net.ConnectException: Connection refused; For more details see: http://wiki.apache.org/hadoop/ConnectionRefused
2. 解决步骤(详细剖析)
20/11/21 01:34:16 INFO ipc.Client: Retrying connect to server: node1/192.168.146.111:8020. Already tried 0 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MIL
LISECONDS)20/11/21 01:34:17 INFO ipc.Client: Retrying connect to server: node1/192.168.146.111:8020. Already tried 1 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MIL
LISECONDS)20/11/21 01:34:18 INFO ipc.Client: Retrying connect to server: node1/192.168.146.111:8020. Already tried 2 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MIL
LISECONDS)20/11/21 01:34:19 INFO ipc.Client: Retrying connect to server: node1/192.168.146.111:8020. Already tried 3 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MIL
LISECONDS)20/11/21 01:34:20 INFO ipc.Client: Retrying connect to server: node1/192.168.146.111:8020. Already tried 4 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MIL
LISECONDS)20/11/21 01:34:21 INFO ipc.Client: Retrying connect to server: node1/192.168.146.111:8020. Already tried 5 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MIL
LISECONDS)20/11/21 01:34:22 INFO ipc.Client: Retrying connect to server: node1/192.168.146.111:8020. Already tried 6 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MIL
LISECONDS)20/11/21 01:34:23 INFO ipc.Client: Retrying connect to server: node1/192.168.146.111:8020. Already tried 7 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MIL
LISECONDS)20/11/21 01:34:24 INFO ipc.Client: Retrying connect to server: node1/192.168.146.111:8020. Already tried 8 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MIL
LISECONDS)20/11/21 01:34:25 INFO ipc.Client: Retrying connect to server: node1/192.168.146.111:8020. Already tried 9 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MIL
LISECONDS
可以看到尝试了多次,node2 依旧无法感受到 node1 已经启动 NameNode 并处于 active 状态——Unable to fetch namespace information from active NN at node1/192.168.146.111:8020
怎么办呢,网上也没几个可以用的方法
最后发现是自己之前图方便,修改了 /etc/hosts
文件导致的
我之前把 hosts 文件前两行中的 localhost.localdomain 换成了主机名:
127.0.0.1 localhost node2 localhost4 localhost4.localdomain4
::1 localhost node2 localhost6 localhost6.localdomain6
把它换回来 >>
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
# 换完之后,ip映射别忘了再搞一个,不然又多了个问题
ip 主机名
最后把 主NameNode 所在节点(我这里是node1)重启一下,在备NameNode节点(我这里是node2)再次执行 hdfs namenode -bootstrapStandby
即可。
Look~~我的阔以了:
相关文章
- 【技术种草】cdn+轻量服务器+hugo=让博客“云原生”一下
- CLB运维&运营最佳实践 ---访问日志大洞察
- vnc方式登陆服务器
- 轻松学排序算法:眼睛直观感受几种常用排序算法
- 十二个经典的大数据项目
- 为什么使用 CDN 内容分发网络?
- 大数据——大数据默认端口号列表
- Weld 1.1.5.Final,JSR-299 的框架
- JavaFX 2012:彻底开源
- 提升as3程序性能的十大要点
- 通过凸面几何学进行独立于边际的在线多类学习
- 利用行动影响的规律性和部分已知的模型进行离线强化学习
- ModelLight:基于模型的交通信号控制的元强化学习
- 浅谈Visual Source Safe项目分支
- 基于先验知识的递归卡尔曼滤波的代理人联合状态和输入估计
- 结合网络结构和非线性恢复来提高声誉评估的性能
- 最佳实践丨云开发CloudBase多环境管理实践
- TimeVAE:用于生成多变量时间序列的变异自动编码器
- 具有线性阈值激活的神经网络:结构和算法
- 内网渗透之横向移动 -- 从域外向域内进行密码喷洒攻击