When I try to modify some code in ASF hadoop-0.20.2 and compile it with command "ant jar".
It reports no *route to host* exceptions.
I do this on a server that with no direct internet connection, that is, I need to set a proxy to access outside network.
So to build hadoop, maven needs to download something from maven repository, so you need to set proxy for it and also a proxy for ant.
ant proxy:
ANT_OPTS="-Dhttp.proxyHost=host -Dhttp.proxyPort=yourport"
maven proxy:
<settings>
<proxies>
<proxy>
<active>true</active>
<protocol>http</protocol>
<host>your proxyHost</host>
<port>your port</port>
</proxy>
</proxies>
</settings>
Now it works well. Hope this can be useful to you.

本文介绍了在没有直接互联网连接的服务器上编译Hadoop-0.20.2过程中遇到的路由错误问题及解决方案。作者通过设置ant和maven的代理配置成功解决了外部网络访问的问题。

1万+

被折叠的 条评论
为什么被折叠?



