访问主节点IP出现错误或连接失败## 标题
在检验hadoop集群搭建成功时,访问主节点IP出现错误或连接失败
一、第一个首先检查防火墙状态,以下是操作防火墙的命令
1:查看防火状态
systemctl status firewalld
service iptables status
2:暂时关闭防火墙
systemctl stop firewalld
service iptables stop
3:永久关闭防火墙
systemctl disable firewalld
chkconfig iptables off
4:重启防火墙
systemctl enable firewalld
service iptables restart
5:永久关闭后重启
//暂时还没有试过
chkconfig iptables on
二、首先要查看配置文件中是否启用了50070的端口访问。如果没有那当然不能访问了哦
编辑配置文件hdfs-site.xml
没有就增加如图所示
![在这里插入图片描述](https://img-blog.csdnimg.cn/2021041314551819.png)
三、可能是自己翻墙上网的原因。
关闭就可以了