来自localhost的调用,在连接异常时失败

hgqdbh6s  于 2021-06-01  发布在  Hadoop
关注(0)|答案(1)|浏览(419)

我是hadoop编程的新手,下面是https://www.guru99.com/create-your-first-hadoop-program.html,我遇到了以下错误。

copyFromLocal: Call From localhost/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

我的文件配置:
core-site.xml:

<configuration>
    <property>
        <name>fs.default.name</name>
        <value>hdfs://saichanda-OptiPlex-9020:9000</value>
    </property>
</configuration>

/etc/主机:

127.0.0.1       localhost

# 127.0.0.1       saichanda-OptiPlex-9020

10.0.3.18       localhost

其中,10.0.3.18为系统ip地址
/etc/主机名:

saichanda-OptiPlex-9020

我的配置中有什么错误导致了这个错误。。我浏览了错误声明中提供的链接,但不清楚可能的解决方案列表中属于哪一类。。
有人能解决这个问题吗。。?

9q78igpj

9q78igpj1#

将您的/etc/hosts编辑为:

127.0.0.1 localhost
10.0.3.18 saichanda-OptiPlex-9020

重新启动hdfs和Yarn。

相关问题