一、今天提交Job任务时,报出下面的一个错误
8/12/26 22:18:45 INFO hdfs.DFSClient: Exception in createBlockOutputStream
java.io.IOException: Bad connect ack with firstBadLink as 192.168.123.152:1004
at org.apache.hadoop.hdfs.DFSOutputStream$DataStreamer.createBlockOutputStream(DFSOutputStream.java:1472)
at org.apache.hadoop.hdfs.DFSOutputStream$DataStreamer.nextBlockOutputStream(DFSOutputStream.java:1373)
at org.apache.hadoop.hdfs.DFSOutputStream$DataStreamer.run(DFSOutputStream.java:600)
18/12/26 22:18:45 INFO hdfs.DFSClient: Abandoning BP-1399089383-192.168.123.150-1544576034616:blk_1073742247_1435
18/12/26 22:18:45 INFO hdfs.DFSClient: Excluding datanode DatanodeInfoWithStorage[192.168.123.152:1004,DS-8247a7c2-ac07-4dc4-9449-0b79410fa4da,DISK]
二、经过排查,有一台datanode服务器的防火墙被打开。
1.确认下防火墙有没有打开。
service iptables status
2.在linux 守护进程中把iptables自启关闭。
chkconfig iptables off
3.停止iptables服务。
service iptables stop