页次: 1
安装完成后运行
hadoop jar share/hadoop/mapreduce/hadoop-mapreduce-examples-2.6.0.jar pi 5 10
Hadoop报错:NoRouteToHostException: No route to host
解决方案是所有主机的关闭防火墙,包括master和所有slave节点的防火墙。
#service iptables stop
或
#chkconfig iptables on/off
离线
WARN hdfs.DFSClient: DataStreamer Exception: org.apache.hadoop.ipc.RemoteException: java.io.IOException: File /test.txt could only be replicated to 0 nodes, instead of 1
at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getAdditionalBlock(FSNamesystem.java:1639)
at org.apache.hadoop.hdfs.server.namenode.NameNode.addBlock(NameNode.java:736)
at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcc
查找了一下原因始datanode没有找到,用jps检测,datanode已经启动了,原因可能是datanode没有关闭防火墙,
service iptables status 发现防火墙果然没有关闭
执行service iptables stop 关闭之后,再上传就成功了
离线
页次: 1