搭建成功Hadoop环境后,执行官方MR示例,报错。
-
问题:retry.RetryInvocationHandler: java.net.NoRouteToHostException: No Route to Host from ly/192.168.142.101 to ly2:8032 failed on socket timeout exception: java.net.NoRouteToHostException: 没有到主机的路由;
**解决方式:关闭防火墙,只关了主机,其他两台系统统统都要关上 查看防火墙状态命令:systemctl status firewalld 关闭防火墙命令:systemctl stop firewalld**
-
无法指定被请求的地址 解决方法
解决方式:查看log日志
Caused by: java.io.IOException: Failed to bind to ly2/192.168.142.103:8088
at org.eclipse.jetty.server.ServerConnector.openAcceptChannel(ServerConnector.java:346)
at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:307)
at org.apache.hadoop.http.HttpServer2.bindListener(HttpServer2.java:1213)
at org.apache.hadoop.http.HttpServer2.bindForSinglePort(HttpServer2.java:1244)
… 7 more
Caused by: java.net.BindException: 无法指定被请求的地址原因:因为Resourcemanager和namenode不是在同一台机器上,所以不能使用start-all.sh来启动。需要在两台机器上分别使用
start-dfs.sh 和 start-yarn.sh来启动。即可成功。 -
执行测试案例失败Application application_1512618719369_147804 failed 2 times
due to ApplicationMaster for attempt app: bin/hadoop jar
share/hadoop/mapreduce/hadoop-mapreduce-examples-3.1.4.jar wordcount
/user/root/input/ /user/root/output解决方式:
<property>
<name>mapreduce.application.classpath</name>
<value>$HADOOP_HOME/share/hadoop/mapreduce/*:$HADOOP_HOME/share/hadoop/mapreduce/lib/*</value>
</property>