hadoop中datanode无法启动,报Caused by: java.net.NoRouteToHostException: No route to host

简介:
今天把hadoop环境给搭起来了,在master上面启动hadoop后,jps查看进程,SecondaryNameNode NameNode Jps DataNode JobTracker TaskTracker都没问题。但是去 http://master:50070/dfshealth.jsp查 看,live nodes为0。所以我到slave1和slave2上面去执行jps查看进程,结果都没有datanode进程,也就是说datanode没有启动成 功,所以我就到logs里面去执行less hadoop-hadoop-datanode-slave2.log,发现报错的内容如下:
2013-06-11 02:22:13,637 INFO org.apache.hadoop.hdfs.server.datanode.DataNode: STARTUP_MSG:
/**
STARTUP_MSG: Starting DataNode
STARTUP_MSG:   host = slave2/192.168.137.112
STARTUP_MSG:   args = []
STARTUP_MSG:   version = 0.20.2
STARTUP_MSG:   build = https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.20 -r 911707; compiled by ‘chrisdo’ on Fri Feb 19 08:07:34 UTC 2010
**/
2013-06-11 02:22:14,931 INFO org.apache.hadoop.ipc.Client: Retrying connect to server: master/192.168.137.110:9000. Already tried 0 time(s).
2013-06-11 02:22:15,932 INFO org.apache.hadoop.ipc.Client: Retrying connect to server: master/192.168.137.110:9000. Already tried 1 time(s).
2013-06-11 02:22:16,934 INFO org.apache.hadoop.ipc.Client: Retrying connect to server: master/192.168.137.110:9000. Already tried 2 time(s).
2013-06-11 02:22:17,952 INFO org.apache.hadoop.ipc.Client: Retrying connect to server: master/192.168.137.110:9000. Already tried 3 time(s).
2013-06-11 02:22:18,954 INFO org.apache.hadoop.ipc.Client: Retrying connect to server: master/192.168.137.110:9000. Already tried 4 time(s).
2013-06-11 02:22:19,957 INFO org.apache.hadoop.ipc.Client: Retrying connect to server: master/192.168.137.110:9000. Already tried 5 time(s).
2013-06-11 02:22:20,959 INFO org.apache.hadoop.ipc.Client: Retrying connect to server: master/192.168.137.110:9000. Already tried 6 time(s).
2013-06-11 02:22:23,978 ERROR org.apache.hadoop.hdfs.server.datanode.DataNode: java.io.IOException: Call to master/192.168.137.110:9000 failed on local exception: java.net.NoRouteToHostException: No route to host
        at org.apache.hadoop.ipc.Client.wrapException(Client.java:775)
        at org.apache.hadoop.ipc.Client.call(Client.java:743)
        at org.apache.hadoop.ipc.RPC$Invoker.invoke(RPC.java:220)
        at $Proxy4.getProtocolVersion(Unknown Source)
        at org.apache.hadoop.ipc.RPC.getProxy(RPC.java:359)
        at org.apache.hadoop.ipc.RPC.getProxy(RPC.java:346)
        at org.apache.hadoop.ipc.RPC.getProxy(RPC.java:383)
        at org.apache.hadoop.ipc.RPC.waitForProxy(RPC.java:314)
        at org.apache.hadoop.ipc.RPC.waitForProxy(RPC.java:291)
        at org.apache.hadoop.hdfs.server.datanode.DataNode.startDataNode(DataNode.java:269)
        at org.apache.hadoop.hdfs.server.datanode.DataNode.(DataNode.java:216)
        at org.apache.hadoop.hdfs.server.datanode.DataNode.makeInstance(DataNode.java:1283)
        at org.apache.hadoop.hdfs.server.datanode.DataNode.instantiateDataNode(DataNode.java:1238)
        at org.apache.hadoop.hdfs.server.datanode.DataNode.createDataNode(DataNode.java:1246)
        at org.apache.hadoop.hdfs.server.datanode.DataNode.main(DataNode.java:1368)
Caused by: java.net.NoRouteToHostException: No route to host
        at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
        at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:692)
        at org.apache.hadoop.net.SocketIOWithTimeout.connect(SocketIOWithTimeout.java:206)
        at org.apache.hadoop.net.NetUtils.connect(NetUtils.java:404)
        at org.apache.hadoop.ipc.Client$Connection.setupIOstreams(Client.java:304)
        at org.apache.hadoop.ipc.Client$Connection.access$1700(Client.java:176)
        at org.apache.hadoop.ipc.Client.getConnection(Client.java:860)
        at org.apache.hadoop.ipc.Client.call(Client.java:720)
        … 13 more

由此文件可以看出,它无法与matser建立连接,所以我想应该是master的防火墙没有关闭,于是关闭master的防火墙,问题就解决了。

相关文章
|
24天前
|
存储 分布式计算 资源调度
大数据-04-Hadoop集群 集群群起 NameNode/DataNode启动 3台公网云 ResourceManager Yarn HDFS 集群启动 UI可视化查看 YarnUI(一)
大数据-04-Hadoop集群 集群群起 NameNode/DataNode启动 3台公网云 ResourceManager Yarn HDFS 集群启动 UI可视化查看 YarnUI(一)
64 5
|
24天前
|
资源调度 数据可视化 大数据
大数据-04-Hadoop集群 集群群起 NameNode/DataNode启动 3台公网云 ResourceManager Yarn HDFS 集群启动 UI可视化查看 YarnUI(二)
大数据-04-Hadoop集群 集群群起 NameNode/DataNode启动 3台公网云 ResourceManager Yarn HDFS 集群启动 UI可视化查看 YarnUI(二)
31 4
|
23天前
|
SQL 分布式计算 Java
Hadoop-11-MapReduce JOIN 操作的Java实现 Driver Mapper Reducer具体实现逻辑 模拟SQL进行联表操作
Hadoop-11-MapReduce JOIN 操作的Java实现 Driver Mapper Reducer具体实现逻辑 模拟SQL进行联表操作
30 3
|
23天前
|
分布式计算 资源调度 Hadoop
Hadoop-10-HDFS集群 Java实现MapReduce WordCount计算 Hadoop序列化 编写Mapper和Reducer和Driver 附带POM 详细代码 图文等内容
Hadoop-10-HDFS集群 Java实现MapReduce WordCount计算 Hadoop序列化 编写Mapper和Reducer和Driver 附带POM 详细代码 图文等内容
76 3
|
24天前
|
分布式计算 资源调度 Hadoop
大数据-01-基础环境搭建 超详细 Hadoop Java 环境变量 3节点云服务器 2C4G XML 集群配置 HDFS Yarn MapRedece
大数据-01-基础环境搭建 超详细 Hadoop Java 环境变量 3节点云服务器 2C4G XML 集群配置 HDFS Yarn MapRedece
58 4
|
23天前
|
分布式计算 NoSQL Java
Hadoop-32 ZooKeeper 分布式锁问题 分布式锁Java实现 附带案例和实现思路代码
Hadoop-32 ZooKeeper 分布式锁问题 分布式锁Java实现 附带案例和实现思路代码
37 2
|
23天前
|
分布式计算 Java Hadoop
Hadoop-30 ZooKeeper集群 JavaAPI 客户端 POM Java操作ZK 监听节点 监听数据变化 创建节点 删除节点
Hadoop-30 ZooKeeper集群 JavaAPI 客户端 POM Java操作ZK 监听节点 监听数据变化 创建节点 删除节点
52 1
|
2月前
|
Java API Nacos
Caused by: java.lang.IllegalStateException: No Feign Client for loadBalancing defined. Did you forge
Caused by: java.lang.IllegalStateException: No Feign Client for loadBalancing defined. Did you forge
|
2月前
|
Java
flyway报错Caused by: java.lang.NoSuchMethodError: org.flywaydb.core.api.configuration.FluentConfigurat
flyway报错Caused by: java.lang.NoSuchMethodError: org.flywaydb.core.api.configuration.FluentConfigurat
30 2
|
3月前
|
存储 分布式计算 Hadoop
Hadoop 中 NameNode 和 DataNode 的角色
【8月更文挑战第12天】
224 4