javahadoop2mkdirconnectionexception

(Hadoop) mkdir: Call From NameNode/192.168.21.129 to NameNode:10001 failed on connection


When I try:

hadoop fs -mkdir hdfs://HName:10001/data/testFolder

I get:

mkdir: Call From HName/192.168.21.129 to HName:10001 failed on connection except
ion: java.net.ConnectException: Connection refused; For more details see:  http://wiki.apache.org/hadoop/ConnectionRefused

Note that: -when JPS I see all the services that should be on the name node, and on the data nodes I see all the services that should be there. -I can ssh from any node to itself and to any other node with no password. -I'm running Hadoop 2.7.3 on one name node and three data nodes

also when I try:

sudo netstat -ntap | grep 9000

I get:

tcp        0      0 192.168.21.129:9000     0.0.0.0:*               LISTEN      2104/java       
tcp        0      0 192.168.21.129:9000     192.168.21.133:36116    ESTABLISHED 2104/java       
tcp        0      0 192.168.21.129:55052    192.168.21.129:9000     TIME_WAIT   -               
tcp        0      0 192.168.21.129:9000     192.168.21.132:36236    ESTABLISHED 2104/java       
tcp        0      0 192.168.21.129:9000     192.168.21.130:60798    ESTABLISHED 2104/java

What could be the problem? where to look?


Solution

  • if the port which you connect is 9000

    then replace 10001 with 9000 on the command

    hadoop fs -mkdir hdfs://HName:9000/data/testFolder