关闭防火墙解决Bad connect ack with firstBadLink错误

hadoop集群新添加一个节点后,启动程序报错
java.io.IOException: Bad connect ack with firstBadLink as 192.168.0.62:50010

报错代码如下:

21/07/14 14:02:01 INFO hdfs.DFSClient: Exception in createBlockOutputStream
java.io.IOException: Bad connect ack with firstBadLink as 192.168.0.62:50010
        at org.apache.hadoop.hdfs.DFSOutputStream$DataStreamer.createBlockOutputStream(DFSOutputStream.java:1768)
        at org.apache.hadoop.hdfs.DFSOutputStream$DataStreamer.nextBlockOutputStream(DFSOutputStream.java:1666)
        at org.apache.hadoop.hdfs.DFSOutputStream$DataStreamer.run(DFSOutputStream.java:788)
FAILED
Container launch failed for container_1625726548259_0002_01_000004 : java.net.NoRouteToHostException: No Route to Host from  192.168.0.65 to abc62:8041 failed on socket timeout exception: java.net.NoRouteToHostException: 没有到主机的
路由; For more details see:  http://wiki.apache.org/hadoop/NoRouteToHost
        at sun.reflect.GeneratedConstructorAccessor55.newInstance(Unknown Source)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
        at org.apache.hadoop.net.NetUtils.wrapWithMessage(NetUtils.java:791)
        at org.apache.hadoop.net.NetUtils.wrapException(NetUtils.java:757)
        at org.apache.hadoop.ipc.Client.call(Client.java:1508)
        at org.apache.hadoop.ipc.Client.call(Client.java:1441)
        at org.apache.hadoop.ipc.ProtobufRpcEngine$Invoker.invoke(Protobu

错误:62节点的50010连接不上
经查询是62节点防火墙未关闭

  1. 在62节点上关闭防火墙 service firewalld stop
  2. 并关闭SElinux,SELINUX=disabled 需要设置配置文件永久关闭,步骤如下

SElinux操作

查看selinux状态

[root@localhost ~] getenforce 
                                     Enforcing         表示启动

临时关闭

 [root@localhost ~] setenforce 
 usage:  setenforce [ Enforcing | Permissive | 1 | 0 ]     1表示启动,0表示关闭
 [root@localhost ~] setenforce 0                          临时关闭
 [root@localhost ~] getenforce                            查看状态
 Permissive                                                关闭状态

永久关闭(修改配置文件,即可永久关闭)

 [root@localhost ~] vi /etc/selinux/config
                 # This file controls the state of SELinux on the system.
                 # SELINUX= can take one of these three values:
                 #     enforcing - SELinux security policy is enforced.
                 #     permissive - SELinux prints warnings instead of enforcing.
                 #     disabled - No SELinux policy is loaded.
                 SELINUX=enforcing         修改为"SELINUX=disabled"
                 # SELINUXTYPE= can take one of three values:
                 #     targeted - Targeted processes are protected,
                 #     minimum - Modification of targeted policy. Only selected processes are protected.
                 #     mls - Multi Level Security protection.
                 SELINUXTYPE=targeted

防火墙的操作

1.查看firewall服务状态
systemctl status firewalld
说明:
出现Active: active (running)切高亮显示则表示是启动状态。
出现 Active: inactive (dead)灰色表示停止,看单词也行。
2.查看firewall的状态
firewall-cmd --state
3、开启、重启、关闭、firewalld.service服务
开启 service firewalld start
重启 service firewalld restart
关闭 service firewalld stop

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值