gpt4 book ai didi

Hadoop 独立安装 - java.net.ConnectException : Connection refused error while running jar

转载 作者:可可西里 更新时间:2023-11-01 15:35:54 27 4
gpt4 key购买 nike

我是 Hadoop 的新手,我试图在 Ubuntu 14.04 中安装单节点独立 Hadoop。我正在关注 Apache Hadoop Document正如那里给出的那样,当我尝试运行时

$ bin/hadoop jar share/hadoop/mapreduce/hadoop-mapreduce-examples-2.5.0.jar grep input output 'dfs[a-z.]+'

我收到了 java.net.ConnectException 消息:

Call From a1409User/127.0.0.1 to localhost:9000 failed on connection exception: java.net.ConnectException: Connection refused; For more details see: http://wiki.apache.org/hadoop/ConnectionRefused

我 checkin 了http://wiki.apache.org/hadoop/ConnectionRefused它被要求验证/etc/hosts 中没有主机名条目映射到 127.0.0.1 或 127.0.1.1。虽然这一点对我来说不是很清楚,但我尝试通过更改给定的 IP 并提及端口号但没有成功。我还检查了 telnet:

$ telnet localhost 9000
Trying 127.0.0.1...
telnet: Unable to connect to remote host: Connection refused

请帮我解决这个问题。

最佳答案

尝试格式化namenode。此外,在您的脚本中,必须提供 inputoutput 目录。例如:

hadoop jar share/hadoop/mapreduce/hadoop-mapreduce-examples-2.5.0.jar grep /user/hadoop/hadoop-config /user/hadoop/output 'dfs[a-z.]+'

之后您可以通过以下方式检查输出目录中的内容:

hdfs dfs -ls /user/hadoop/output/

它应该打印输出如下:

Found 2 items -rw-r--r-- 3 hadoop supergroup 0 2014-09-05 07:55 /user/hadoop/output/_SUCCESS -rw-r--r-- 3 hadoop supergroup 179 2014-09-05 07:55 /user/hadoop/output/part-r-00000

关于Hadoop 独立安装 - java.net.ConnectException : Connection refused error while running jar,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25708502/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com