hadoop中出现Call From ubuntu/127.0.1.1 to localhost:8020 failed on connection exception

更改core-site.xml文件

<configuration>
<property>
        <name>hadoop.tmp.dir</name>
        <value>file:/home/hadoop/app/hadoop/tmp</value>
        <description>Abase for other temporary directories.</description>
</property>
<property>
        <name>fs.defaultFS</name>
        <value>hdfs://localhost:9000</value>
</property>
</configuration>

把这一行 <value>hdfs://localhost:9000</value>改为<value>hdfs://localhost:8020</value>