---
title: "windows下eclipse连接虚拟机下或集群的linux系统部署的hadoop "
author: "cry615"
date: "2013-12-04T14:49:52Z"
tags: []
categories: ["开源软件"]
slug: "windows-eclipse-linux-hadoop"
draft: false
lastmod: "2014-03-16T00:14:21Z"
id: 1985107
url: "https://cry615.iteye.com/blog/1985107"
---

由于在linux下用eclipse操作起来确实没有习惯用window方便，简单。所以就迎着之前老window下eclipse获取linux的hadoop的连接不到的问题继续解决。也许我用虚拟机下5天的开发时间，我window下4天就可以搞定，那多出的一天何不解决这个问题呢，何况使用hadoop不一定就只用5天。

 

1.前提条件：

windows下的eclipse集成好hadoop插件。

eclipse版本：3.3.2

hadoop版本：0.20.2

![](http://dl.iteye.com/upload/picture/pic/128659/3a9eba22-1ca0-3633-aaf4-a6c85408fe25.jpg)

 

 2.配置hadoop：

用SecureCRT，putty或winSCP等远程软件可以连接到linux系统，Linux系统的网络类型最好是桥接或host-only。

 

然后配置haodoop location的ip，端口号和hdfs的详细信息

![](http://dl.iteye.com/upload/picture/pic/128661/523ce973-4c72-387a-816a-a5d5b66a733a.jpg)

![](http://dl.iteye.com/upload/picture/pic/129759/6c4117b1-f6bb-31c7-88ec-42a5614290d5.jpg)

 

易出问题：

Cannot connect to the Map/Reduce location: hadoop  
Call to localhsot/10.1.23.42:9001 failed on connection exception: java.net.ConnectException: Connection refused: no further information

解决方法：

hadoop目录conf/core-site.xml、mapred-site.xml、hdfs-site.xml中配置的value都用的localhost替换固定的ip(10.1.23.42)，localhost 指的本机，对于外部访问的话，换成ip。

 

参考连接：

[http://february30thcf.iteye.com/blog/1768795](http://february30thcf.iteye.com/blog/1768795)