Run hadoop fs -put Command Error: Got error, status message , ack with firstBadLink

After the Hadoop cluster is set up, the following port error occurs on one node when the Hadoop FS – put command is executed

location:org.apache.hadoop.hdfs.DFSOutputStream$DataStreamer.createBlockOutputStream( Got error, status message , ack with firstBadLink as ip:port
at org.apache.hadoop.hdfs.protocol.datatransfer.DataTransferProtoUtil.checkBlockOpStatus(
at org.apache.hadoop.hdfs.DFSOutputStream$DataStreamer.createBlockOutputStream(
at org.apache.hadoop.hdfs.DFSOutputStream$DataStreamer.nextBlockOutputStream(
at org.apache.hadoop.hdfs.DFSOutputStream$

First, check whether the firewalls of the three nodes are closed

firewall-cmd --state

Turn off firewall command

systemctl stop firewalld.service

If this situation still occurs after the firewall is closed, it may be that the ports of ECs are not open to the public. Take Alibaba cloud server as an example (Tencent cloud opens all ports by default):

After setting, execute the command again to succeed.

Read More: