Hadoop Eclipse Plugin Connect Fail 连接namenode失败

[b]Linux Version:Ubuntu12.04 X86_64 Server Version [/b]
[b]Eclipse Juno[/b]
[b]Hadoop1.0.4[/b]

[color=red][b]namenode机子信息 机器名ubuntu ip地址192.168.1.111[/b][/color]

附件 下载地址 hadoop-eclipse-plugin-1.0.4.jar 与JDK7兼容

[img]http://dl.iteye.com/upload/attachment/0083/2409/793e6a56-8c5e-3663-a4e8-673be615b52c.png[/img]

用eclipse连接集群查看文件信息提示9000端口拒绝连接的错误
Cannot connect to the Map/Reduce location: hadoop1.0.3
Call to ubuntu/192.168.1.111:9000 failed on connection exception: java.net.ConnectException: 拒绝连接

[color=red]常见[/color]解决办法:配置都很正常,就是连接不了。后来重新配置hadoop location,把Map/Reduce Master 和 DFS Master中的Host由localhost改成了ip地址(192.168.1.111),然后问题就解决了。奇怪,localhost不就是本机嘛,而namenode主机(192.168.1.111)也是本机。

上述方法对我无效
既然无法连接,检查192.168.1.111 9000端口是否起来

[img]http://dl.iteye.com/upload/attachment/0083/2411/ef9376a7-15f8-356a-a352-ddda246748d8.png[/img]

192.168.1.111接收localhost回环请求,拒绝192.168.1.111的请求,问题就在这,回环问题,查看/etc/hosts

[img]http://dl.iteye.com/upload/attachment/0083/2413/f607c46b-5b38-3074-9af5-148bcaee7675.png[/img]

应该修改成以下,删除127.0.0.1 ubuntu

[img]http://dl.iteye.com/upload/attachment/0083/2415/56fd976a-2461-3940-ac22-618647f939f0.png[/img]

插件终于能用了~~~,花了一天才找到这个问题,解决的过程也解决好多其他问题,查看日志很有效,[color=red]不看日志不是好程序员[/color],这里[color=red]回环问题[/color]是一个经验点。


参考链接:
[url]http://stackoverflow.com/questions/7426865/hadoop-namenode-rejecting-connections-what-am-i-doing-wrong[/url]
[url]http://wiki.apache.org/hadoop/ServerNotAvailable[/url]

你可能感兴趣的:(Hadoop,hadoop1.0.4,eclipse-plugin,Namenode,Connect,Refused)