读取文件错误: xxx -org.apache.hadoop.hdfs.BlockMissingException: could not obtain block:BP-XXXX-10.46.10.80-XXXX:blk_xx_xx file=xxxxx: no live nodes contain current block Block locations:DatanodeInfoWithStorage[10.46.10.80:50010,DS-XX,DISK]DatanodeInfoWithStorage[10.46.10.81:50010,DS-XX,DISK]DatanodeInfoWithStorage[10.46.10.82:50010,DS-XX,DISK]Dead nodes:DatanodeInfoWithStorage[10.46.10.82:50010,DS-XX,DISK]DatanodeInfoWithStorage[10.46.10.80:50010,DS-XX,DISK]DatanodeInfoWithStorage[10.46.10.81:50010,DS-XX,DISK]
at org.apache.hadoop.hdfs.DFSInputStream.refetchLocations(DFSInputStream.java:1109)
at org.apache.hadoop.hdfs.DFSInputStream.chooseDataNode(DFSInputStream.java:1093)
at org.apache.hadoop.hdfs.DFSInputStream.chooseDataNode(DFSInputStream.java:1072)
at org.apache.hadoop.hdfs.DFSInputStream.blockSeekTo(DFSInputStream.java:673)
at org.apache.hadoop.hdfs.DFSInputStream.readWithStrategy(DFSInputStream.java:971)
at org.apache.hadoop.hdfs.DFSInputStream.read(DFSInputStream.java:1029)
hadoop 服务端配置namenode/datanode 监听 wildcard 通配符地址:绑定到通配符地址"0.0.0.0" 后,私网IP和公网IP都会被监听;(set the value of dfs.namenode.rpc-bind-host to 0.0.0.0 and Hadoop will listen on both the private and public network interfaces allowing remote access and datanode access; The wildcard is a special local IP address, It usually means “any” and can only be used for bind operations.)
其它相关jira:Using socket address for datanode registry breaks multihoming:https://issues.apache.org/jira/browse/HADOOP-6867
- Namenode should identify DataNodes as ip:port instead of hostname:port:https://issues.apache.org/jira/browse/HADOOP-985
- Add option for clients to contact DNs via hostname:https://issues.apache.org/jira/browse/HDFS-3150
- dfs.client.use.datanode.hostname: whether clients should use datanode hostnames when connecting to datanodes. default false. (clients outside cluster may not be able to route the IP)
- dfs.datanode.use.datanode.hostname:Whether datanodes should use datanode hostnames when connecting to other datanodes for data transfer.default false.
- Using socket address for datanode registry breaks multihoming:https://issues.apache.org/jira/browse/HADOOP-6867