15/10/09 00:18:18 INFO DFSClient: Could not obtain BP-1056880277-192.168.1.101-1444127746416:blk_1073741825_1001 from any node: java.io.IOException: No live nodes contain current block. Will get new block locations from namenode and retry...
15/10/09 00:18:18 WARN DFSClient: DFS chooseDataNode: got # 1 IOException, will wait for 1390.501283769951 msec.
15/10/09 00:18:19 WARN DFSClient: Failed to connect to /192.168.1.117:50010 for block, add to deadNodes and continue. java.net.NoRouteToHostException: 没有到主机的路由
15/10/09 00:18:18 WARN DFSClient: DFS chooseDataNode: got # 1 IOException, will wait for 1390.501283769951 msec.
15/10/09 00:18:19 WARN DFSClient: Failed to connect to /192.168.1.117:50010 for block, add to deadNodes and continue. java.net.NoRouteToHostException: 没有到主机的路由
java.net.NoRouteToHostException: 没有到主机的路由
经测试问题原因是防火墙未关闭,不过有的情况也可能是"dfs.socket.timeout"设置的值有问题,就我本人情况是防火墙开启导致的,如果防火墙关闭了还不行可以试试在hdfs-site.xml设置"dfs.socket.timeout"值为60000。发现Spark和hadoop平台中,很多服务貌似都和防火墙有点冲突,所以最好还是直接设置防火墙开机不自启动吧。
设置防火墙开机不自动启动命令:
chkconfig iptables off
参考:http://www.cnblogs.com/siwei1988/archive/2012/07/12/2587527.html ----CentOS常用命令大全!