[hadoop@Master file]$ hadoop fs -mkdir input3
[hadoop@Master file]$ hadoop fs -put ./file*.txt input3
15/03/18 22:54:00 INFO hdfs.DFSClient: Exception in createBlockOutputStream java.net.NoRouteToHostException: 没有到主机的路由
15/03/18 22:54:00 INFO hdfs.DFSClient: Abandoning block blk_-2701910714669546890_10073
15/03/18 22:54:06 INFO hdfs.DFSClient: Exception in createBlockOutputStream java.net.NoRouteToHostException: 没有到主机的路由
15/03/18 22:54:06 INFO hdfs.DFSClient: Abandoning block blk_-6595394394333564261_10073
15/03/18 22:54:12 INFO hdfs.DFSClient: Exception in createBlockOutputStream java.net.NoRouteToHostException: 没有到主机的路由
15/03/18 22:54:12 INFO hdfs.DFSClient: Abandoning block blk_-7654232478902170768_10073
15/03/18 22:54:18 INFO hdfs.DFSClient: Exception in createBlockOutputStream java.net.NoRouteToHostException: 没有到主机的路由
15/03/18 22:54:18 INFO hdfs.DFSClient: Abandoning block blk_-4057949388287825875_10074
15/03/18 22:54:24 WARN hdfs.DFSClient: DataStreamer Exception: java.io.IOException: Unable to create new block.
at org.apache.hadoop.hdfs.DFSClient$DFSOutputStream.nextBlockOutputStream(DFSClient.java:2845)
at org.apache.hadoop.hdfs.DFSClient$DFSOutputStream.access$2000(DFSClient.java:2102)
at org.apache.hadoop.hdfs.DFSClient$DFSOutputStream$DataStreamer.run(DFSClient.java:2288)15/03/18 22:54:24 WARN hdfs.DFSClient: Error Recovery for block blk_-4057949388287825875_10074 bad datanode[0] nodes == null
15/03/18 22:54:24 WARN hdfs.DFSClient: Could not get block locations. Source file "/user/hadoop/input3/file1.txt" - Aborting...
15/03/18 22:54:24 INFO hdfs.DFSClient: Exception in createBlockOutputStream java.net.NoRouteToHostException: 没有到主机的路由
15/03/18 22:54:24 INFO hdfs.DFSClient: Abandoning block blk_-7080188390242653981_10075
15/03/18 22:54:30 INFO hdfs.DFSClient: Exception in createBlockOutputStream java.net.NoRouteToHostException: 没有到主机的路由
15/03/18 22:54:30 INFO hdfs.DFSClient: Abandoning block blk_-6858744431122541922_10075
15/03/18 22:54:36 INFO hdfs.DFSClient: Exception in createBlockOutputStream java.net.NoRouteToHostException: 没有到主机的路由
15/03/18 22:54:36 INFO hdfs.DFSClient: Abandoning block blk_-5335567731842422100_10075
15/03/18 22:54:42 INFO hdfs.DFSClient: Exception in createBlockOutputStream java.net.NoRouteToHostException: 没有到主机的路由
15/03/18 22:54:42 INFO hdfs.DFSClient: Abandoning block blk_7680139810007024027_10075
15/03/18 22:54:48 WARN hdfs.DFSClient: DataStreamer Exception: java.io.IOException: Unable to create new block.
at org.apache.hadoop.hdfs.DFSClient$DFSOutputStream.nextBlockOutputStream(DFSClient.java:2845)
at org.apache.hadoop.hdfs.DFSClient$DFSOutputStream.access$2000(DFSClient.java:2102)
at org.apache.hadoop.hdfs.DFSClient$DFSOutputStream$DataStreamer.run(DFSClient.java:2288)15/03/18 22:54:48 WARN hdfs.DFSClient: Error Recovery for block blk_7680139810007024027_10075 bad datanode[0] nodes == null
15/03/18 22:54:48 WARN hdfs.DFSClient: Could not get block locations. Source file "/user/hadoop/input3/file2.txt" - Aborting...
put: 没有到主机的路由
没有到主机的路由15/03/18 22:54:48 ERROR hdfs.DFSClient: Exception closing file /user/hadoop/input3/file1.txt : java.net.NoRouteToHostException: 没有到主机的路由
java.net.NoRouteToHostException: 没有到主机的路由
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:739)
at org.apache.hadoop.net.SocketIOWithTimeout.connect(SocketIOWithTimeout.java:206)
at org.apache.hadoop.net.NetUtils.connect(NetUtils.java:404)
at org.apache.hadoop.hdfs.DFSClient$DFSOutputStream.createBlockOutputStream(DFSClient.java:2870)
at org.apache.hadoop.hdfs.DFSClient$DFSOutputStream.nextBlockOutputStream(DFSClient.java:2826)
at org.apache.hadoop.hdfs.DFSClient$DFSOutputStream.access$2000(DFSClient.java:2102)
at org.apache.hadoop.hdfs.DFSClient$DFSOutputStream$DataStreamer.run(DFSClient.java:2288)
15/03/18 22:54:48 ERROR hdfs.DFSClient: Exception closing file /user/hadoop/input3/file2.txt : java.net.NoRouteToHostException: 没有到主机的路由
java.net.NoRouteToHostException: 没有到主机的路由
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:739)
at org.apache.hadoop.net.SocketIOWithTimeout.connect(SocketIOWithTimeout.java:206)
at org.apache.hadoop.net.NetUtils.connect(NetUtils.java:404)
at org.apache.hadoop.hdfs.DFSClient$DFSOutputStream.createBlockOutputStream(DFSClient.java:2870)
at org.apache.hadoop.hdfs.DFSClient$DFSOutputStream.nextBlockOutputStream(DFSClient.java:2826)
at org.apache.hadoop.hdfs.DFSClient$DFSOutputStream.access$2000(DFSClient.java:2102)
at org.apache.hadoop.hdfs.DFSClient$DFSOutputStream$DataStreamer.run(DFSClient.java:2288)
[hadoop@Master file]$ hadoop fs -put ./file*.txt input3
15/03/18 22:54:00 INFO hdfs.DFSClient: Exception in createBlockOutputStream java.net.NoRouteToHostException: 没有到主机的路由
15/03/18 22:54:00 INFO hdfs.DFSClient: Abandoning block blk_-2701910714669546890_10073
15/03/18 22:54:06 INFO hdfs.DFSClient: Exception in createBlockOutputStream java.net.NoRouteToHostException: 没有到主机的路由
15/03/18 22:54:06 INFO hdfs.DFSClient: Abandoning block blk_-6595394394333564261_10073
15/03/18 22:54:12 INFO hdfs.DFSClient: Exception in createBlockOutputStream java.net.NoRouteToHostException: 没有到主机的路由
15/03/18 22:54:12 INFO hdfs.DFSClient: Abandoning block blk_-7654232478902170768_10073
15/03/18 22:54:18 INFO hdfs.DFSClient: Exception in createBlockOutputStream java.net.NoRouteToHostException: 没有到主机的路由
15/03/18 22:54:18 INFO hdfs.DFSClient: Abandoning block blk_-4057949388287825875_10074
15/03/18 22:54:24 WARN hdfs.DFSClient: DataStreamer Exception: java.io.IOException: Unable to create new block.
at org.apache.hadoop.hdfs.DFSClient$DFSOutputStream.nextBlockOutputStream(DFSClient.java:2845)
at org.apache.hadoop.hdfs.DFSClient$DFSOutputStream.access$2000(DFSClient.java:2102)
at org.apache.hadoop.hdfs.DFSClient$DFSOutputStream$DataStreamer.run(DFSClient.java:2288)15/03/18 22:54:24 WARN hdfs.DFSClient: Error Recovery for block blk_-4057949388287825875_10074 bad datanode[0] nodes == null
15/03/18 22:54:24 WARN hdfs.DFSClient: Could not get block locations. Source file "/user/hadoop/input3/file1.txt" - Aborting...
15/03/18 22:54:24 INFO hdfs.DFSClient: Exception in createBlockOutputStream java.net.NoRouteToHostException: 没有到主机的路由
15/03/18 22:54:24 INFO hdfs.DFSClient: Abandoning block blk_-7080188390242653981_10075
15/03/18 22:54:30 INFO hdfs.DFSClient: Exception in createBlockOutputStream java.net.NoRouteToHostException: 没有到主机的路由
15/03/18 22:54:30 INFO hdfs.DFSClient: Abandoning block blk_-6858744431122541922_10075
15/03/18 22:54:36 INFO hdfs.DFSClient: Exception in createBlockOutputStream java.net.NoRouteToHostException: 没有到主机的路由
15/03/18 22:54:36 INFO hdfs.DFSClient: Abandoning block blk_-5335567731842422100_10075
15/03/18 22:54:42 INFO hdfs.DFSClient: Exception in createBlockOutputStream java.net.NoRouteToHostException: 没有到主机的路由
15/03/18 22:54:42 INFO hdfs.DFSClient: Abandoning block blk_7680139810007024027_10075
15/03/18 22:54:48 WARN hdfs.DFSClient: DataStreamer Exception: java.io.IOException: Unable to create new block.
at org.apache.hadoop.hdfs.DFSClient$DFSOutputStream.nextBlockOutputStream(DFSClient.java:2845)
at org.apache.hadoop.hdfs.DFSClient$DFSOutputStream.access$2000(DFSClient.java:2102)
at org.apache.hadoop.hdfs.DFSClient$DFSOutputStream$DataStreamer.run(DFSClient.java:2288)15/03/18 22:54:48 WARN hdfs.DFSClient: Error Recovery for block blk_7680139810007024027_10075 bad datanode[0] nodes == null
15/03/18 22:54:48 WARN hdfs.DFSClient: Could not get block locations. Source file "/user/hadoop/input3/file2.txt" - Aborting...
put: 没有到主机的路由
没有到主机的路由15/03/18 22:54:48 ERROR hdfs.DFSClient: Exception closing file /user/hadoop/input3/file1.txt : java.net.NoRouteToHostException: 没有到主机的路由
java.net.NoRouteToHostException: 没有到主机的路由
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:739)
at org.apache.hadoop.net.SocketIOWithTimeout.connect(SocketIOWithTimeout.java:206)
at org.apache.hadoop.net.NetUtils.connect(NetUtils.java:404)
at org.apache.hadoop.hdfs.DFSClient$DFSOutputStream.createBlockOutputStream(DFSClient.java:2870)
at org.apache.hadoop.hdfs.DFSClient$DFSOutputStream.nextBlockOutputStream(DFSClient.java:2826)
at org.apache.hadoop.hdfs.DFSClient$DFSOutputStream.access$2000(DFSClient.java:2102)
at org.apache.hadoop.hdfs.DFSClient$DFSOutputStream$DataStreamer.run(DFSClient.java:2288)
15/03/18 22:54:48 ERROR hdfs.DFSClient: Exception closing file /user/hadoop/input3/file2.txt : java.net.NoRouteToHostException: 没有到主机的路由
java.net.NoRouteToHostException: 没有到主机的路由
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:739)
at org.apache.hadoop.net.SocketIOWithTimeout.connect(SocketIOWithTimeout.java:206)
at org.apache.hadoop.net.NetUtils.connect(NetUtils.java:404)
at org.apache.hadoop.hdfs.DFSClient$DFSOutputStream.createBlockOutputStream(DFSClient.java:2870)
at org.apache.hadoop.hdfs.DFSClient$DFSOutputStream.nextBlockOutputStream(DFSClient.java:2826)
at org.apache.hadoop.hdfs.DFSClient$DFSOutputStream.access$2000(DFSClient.java:2102)
at org.apache.hadoop.hdfs.DFSClient$DFSOutputStream$DataStreamer.run(DFSClient.java:2288)
解决方案 »
- swift可不可以挂载到compute?
- 怎么使不在一个网段的计算机成为计算节点?
- 虚拟机下linux搭建的hadoop2.7.0,用eclipse运行wordcount程序出现问题
- spark的一个初级问题
- 刚接触spark 遇到个问题 怎么才可以使用spark job server 把spark中的rdd取出来
- spark sql读取parquet二进制格式的列
- Spark的RDD转换成DataFrame问题
- vsphere覆盖安装,如何恢复数据
- 年末该感谢的人是?华为云12.12卷来一股回馈风
- c++ 通过thrift2写入HBase效率很慢,有类似java的BufferedMutator的操作吗?
- 请教一个环信有关Rest的问题:token有效期需要我们自己来判断吗?Token的有效期是多长时间?
- Spark机器学习库之数据类型——scala版本
解决方案:
(1)从namenode主机ping其它slaves节点的主机名(注意是slaves节点的主机名),如果ping不通,原因可能是namenode节点的/etc/hosts 未配置主机名与IP地址的映射关系,补全主机名与IP地址的映射关系。(2)从datanode主机ping master节点的主机名(注意也是节点的主机名),如果ping不通,原因可能是datenode节点的/etc/hosts 未配置主机名与IP地址的映射关系,补全主机名与IP地址的映射关系。
(3)查看各机器节点的防火墙是否关闭(或者设置防火墙开启,但对我们的指定端口开放,最好是关闭防火墙):