Hadoop 从本地主机调用,连接异常时失败

Hadoop 从本地主机调用,连接异常时失败,hadoop,hdfs,Hadoop,Hdfs,我是Hadoop编程的新手,下面是一个简单的示例文档,我遇到了以下错误 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

我是Hadoop编程的新手,下面是一个简单的示例文档,我遇到了以下错误

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>
其中,10.0.3.18为系统ip地址

/etc/主机名:

saichanda-OptiPlex-9020
我的配置中有什么错误导致我出现此错误。。 我浏览了错误声明中提供的链接,但我不清楚在可能的解决方案列表中我属于哪一类


有人能解决这个问题吗?

请编辑您的/etc/hosts,使其:

127.0.0.1 localhost
10.0.3.18 saichanda-OptiPlex-9020

重新启动hdfs和纱线。

请阅读错误中的链接,并按照您应该执行的每个步骤进行操作hdfs://saichanda-OptiPlex-9020:9000 无论如何,为了使HDFS正确地处于伪分布式模式,我在单个系统上运行,所以,客户端和服务器是相同的,对吗?在链接中的第5点之后,我得到了以下错误-copyFromLocal:java.net.UnknownHostException:saichanda-OptiPlex-9020我应该在哪里将saichanda-OptiPlex-9020更改为本地主机?或者需要更改什么?在完成上述更改后,我得到了以下错误------copyFromLocal:调用saichanda-OptiPlex-9020/10.0.3.18到saichanda-OptiPlex-9020:9000连接失败异常:java.net.ConnectException:连接被拒绝;有关更多详细信息,请参阅:在浏览器上查看saichanda-OptiPlex-9020:50070。它处于安全模式吗?!
127.0.0.1 localhost
10.0.3.18 saichanda-OptiPlex-9020