解决问题: 使用hadoop时出现:java.io.IOException: Bad connect ack with firstBadLink ...

时间:2021-04-04 08:33:52

使用hadoop时出现错误:hdfs.DFSClient - Exception in createBlockOutputStream 192.168.1.17:50010 java.io.IOException: Bad connect ack with  firstBadLink as 192.168.1.24:50010

原因192.168.1.24机器datanode log里出现以下错误信息:
2012-11-16 07:50:06,452 ERROR org.apache.hadoop.hdfs.server.datanode.DataNode: DatanodeRegistration(192.168.1.24:50010, storageID=DS-1981722178-192.168.1.24-50010-1350633535171, infoPort=50075, ipcPort=50020):DataXceiver
java.io.IOException: xceiverCount 4097 exceeds the limit of concurrent xcievers 4096

解决办法, 修改conf/hdfs-site.xml里的dfs.datanode.max.xcievers配置,增大xcievers个数,如:
  <property>
    <name>dfs.datanode.max.xcievers</name>
    <value>16000</value>
  </property>