0

I'm trying to create an input file in the hdfs using this command :

hduser@salma-SATELLITE-C855-1EQ:/usr/local/hadoop$ ./bin/hadoop fs -mkdir /in

but it gives me an error that the connection failed :

SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/usr/local/hadoop/share/hadoop/common/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/local/hadoop/share/hadoop/common/lib/slf4j-log4j12-1.7.10.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
16/10/09 02:12:04 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
mkdir: Call From salma-SATELLITE-C855-1EQ/127.0.1.1 to localhost:9000 failed on connection exception: java.net.ConnectException: Connection refused; For more details see:  http://wiki.apache.org/hadoop/ConnectionRefused

I already run hadoop service with start-all.sh :

hduser@salma-SATELLITE-C855-1EQ:/usr/local/hadoop$ jps
20437 Jps
20030 SecondaryNameNode
19839 DataNode

So can anyone help to solve this problem

Salma Hakim
  • 105
  • 8
  • Try : hadoop dfs -mkdir -p /in Otherwise try to open your hadoop UI http://localhost:50070/ – cody123 Oct 09 '16 at 04:16
  • Look [here](http://stackoverflow.com/questions/29910805/namenode-datanode-not-list-by-using-jps) the second answer helped me... – Spyros_av Oct 09 '16 at 14:34
  • @Spyros_av yes i did this steps and the problem with namenode is solved but I have another problem now : 16/10/09 15:48:17 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable – Salma Hakim Oct 09 '16 at 14:59

1 Answers1

1

Your are missing the namenode ( primary ) this is where you code is attempitng to connect. Check the log to understand why it does not started.

ozw1z5rd
  • 3,034
  • 3
  • 32
  • 49
  • I fixed the problem with namenode but when I retry the command it gives me another problem : 16/10/09 15:48:17 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable – Salma Hakim Oct 09 '16 at 14:55
  • This is has been already fixed [here](http://stackoverflow.com/questions/19943766/hadoop-unable-to-load-native-hadoop-library-for-your-platform-warning) – ozw1z5rd Oct 09 '16 at 15:01