Hadoop hdfs dfs-copyFromLocal数据节点拒绝连接

Hadoop hdfs dfs-copyFromLocal数据节点拒绝连接,hadoop,Hadoop,我使用两个节点创建了一个hadoop集群 h01:主机-ubuntu桌面15.04 h02:在我的主机上使用vmware的虚拟机-ubuntu服务器14.04 jps命令在h01上显示namenode和secondarynamenode,在h02上显示datanode,namenode的Web用户界面显示datanode,以便它们成功连接 问题是当我发出命令时: hdfs dfs -copyFromLocal input / 它给出了以下错误: 16/03/14 14:29:55 IN

我使用两个节点创建了一个hadoop集群

h01:主机-ubuntu桌面15.04

h02:在我的主机上使用vmware的虚拟机-ubuntu服务器14.04

jps命令在h01上显示namenode和secondarynamenode,在h02上显示datanode,namenode的Web用户界面显示datanode,以便它们成功连接

问题是当我发出命令时:

hdfs dfs -copyFromLocal input /
它给出了以下错误:

    16/03/14 14:29:55 INFO hdfs.DFSClient: Exception in createBlockOutputStream
java.net.ConnectException: Connection refused
    at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
    at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:744)
    at org.apache.hadoop.net.SocketIOWithTimeout.connect(SocketIOWithTimeout.java:206)
    at org.apache.hadoop.net.NetUtils.connect(NetUtils.java:530)
    at org.apache.hadoop.hdfs.DFSOutputStream.createSocketForPipeline(DFSOutputStream.java:1610)
    at org.apache.hadoop.hdfs.DFSOutputStream$DataStreamer.createBlockOutputStream(DFSOutputStream.java:1408)
    at org.apache.hadoop.hdfs.DFSOutputStream$DataStreamer.nextBlockOutputStream(DFSOutputStream.java:1361)
    at org.apache.hadoop.hdfs.DFSOutputStream$DataStreamer.run(DFSOutputStream.java:588)
我是hadoop新手,任何帮助都将不胜感激。以下是我的配置文件:

文件:/etc/hosts计算机:h01

127.0.0.1 localhost
127.0.1.1 hitesh-SVE15136CNB
192.168.93.128 h02
172.16.87.68 h01
# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
文件:/etc/hosts计算机:h02

127.0.0.1   localhost
127.0.1.1   ubuntu
172.16.87.68 h01
192.168.93.128 h02
# The following lines are desirable for IPv6 capable hosts
::1     localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
文件:core-site.xml计算机:两者相同

<configuration>
    <property>
    <name>fs.defaultFS</name>
    <value>hdfs://h01:9000</value>
    </property>
    <property>
        <name>hadoop.tmp.dir</name>
        <value>/home/hadoop/hadoop</value>
        </property>
</configuration>
<configuration>
    <property>
        <name>dfs.replication</name>
        <value>1</value>
    </property>
</configuration>

fs.defaultFS
hdfs://h01:9000
hadoop.tmp.dir
/home/hadoop/hadoop
文件:hdfs-site.xml计算机:两者相同

<configuration>
    <property>
    <name>fs.defaultFS</name>
    <value>hdfs://h01:9000</value>
    </property>
    <property>
        <name>hadoop.tmp.dir</name>
        <value>/home/hadoop/hadoop</value>
        </property>
</configuration>
<configuration>
    <property>
        <name>dfs.replication</name>
        <value>1</value>
    </property>
</configuration>

dfs.replication
1.
主设备包含h01,从设备包含h02。我确保了两台机器之间的ssh连接没有密码

编辑:

我发现了问题。在namenode UI的datanodes选项卡中,它显示了正确的datanode,但显示了错误的IP(它显示的是namenode的IP,而不是datanode)。 我尝试在另一个虚拟机中安装namenode,它正在工作。 但仍然无法理解上述配置的错误之处。
请帮助查看下面的url。它可以是有用的:-