gpt4 book ai didi

hadoop - hadoop fs -ls:从服务器/127.0.1.1到本地主机的调用失败

转载 作者:行者123 更新时间:2023-12-02 19:55:54 25 4
gpt4 key购买 nike

我以伪分布式模式安装了hadoop

运行命令时

hadoop fs -ls

我收到以下错误:
ls: Call From kali/127.0.1.1 to localhost:9000 failed on connection exception:
java.net.ConnectException: Connection refused;
For more details see: http://wiki.apache.org/hadoop/ConnectionRefused

有什么建议么?

最佳答案

如果您阅读错误中的链接,我会看到两个需要解决的即时问题。

If the error message says the remote service is on "127.0.0.1" or "localhost" that means the configuration file is telling the client that the service is on the local server. If your client is trying to talk to a remote system, then your configuration is broken.



即使伪分布式模式仅在本地运行,也应将其视为远程系统。

对于HDFS,您可以通过将计算机主机名(最好是域的完整FQDN)作为core-site.xml中的HDFS地址来解决。对于您的情况, hdfs://kali:9000应该足够了

Check that there isn't an entry for your hostname mapped to 127.0.0.1 or 127.0.1.1 in /etc/hosts (Ubuntu is notorious for this).



我不确定为什么需要删除它,但是我能想到的一般答案是Hadoop是一个分布式系统,并且正如我提到的,将伪分布式模式视为远程HDFS服务器。因此,任何环回地址都不应使用您的计算机主机名

例如,删除此行的第二行
127.0.0.1 localhost
127.0.1.1 kali

或从中删除主机名
127.0.0.1 localhost kali

最重要的(强调)

None of these are Hadoop problems, they are hadoop, host, network and firewall configuration issues

关于hadoop - hadoop fs -ls:从服务器/127.0.1.1到本地主机的调用失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51824229/

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