Hadoop: java.net.ConnectException: Connection refused

Troy Zuroske

Hello I have been trying to follow this tutorial: http://www.tutorialspoint.com/apache_flume/fetching_twitter_data.htm for a very long time now and I am absolutely stuck at Step 3: Create a Directory in HDFS. I have ran start-dfs.sh and start-yarn.sh and both seem to have worked correctly as I am getting the same output as the tutorial but when I try to run:

hdfs dfs -mkdir hdfs://localhost:9000/user/Hadoop/twitter_data 

I keep receiving the same error:

mkdir: Call From trz-VirtualBox/10.0.2.15 to localhost:9000 failed on connection exception: java.net.ConnectException: Connection refused; For more details see:  http://wiki.apache.org/hadoop/ConnectionRefused

I can not figure out why as I have searched everywhere and tried a number of solutions but can't seem to make progress. I am going to list all of the files that I think could cause this but I could be wrong: My core.site.xml is:

<configuration>
<property>  
<name>hadoop.tmp.dir</name>
<value>/Public/hadoop-2.7.1/tmp</value>
<description>A base for other temporary directories.</description>
</property>
<property>
<name>fs.default.name</name>
<value>hdfs://localhost:9000</value>
</property>

My mapred-site.xml is:

<configuration>
<property>
<name>mapred.job.tracker</name>
<value>hdfs://localhost:9001</value>
</property>
</configuration>

My hdfs.site.xml is:

<configuration>
<property>
<name>dfs.replication</name>
<value>1</value>
</property>
<property>
<name>dfs.permission</name>
<value>false</value>
</property>
</configuration>

I am running Ubuntu 14.04.4 LTS on virtual box. My ~/.bashrc looks as so:

export JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk-amd64
export HADOOP_HOME=/usr/local/hadoop/bin 
export HADOOP_HOME=/usr/local/hadoop/bin
export HADOOP_INSTALL=$HADOOP_HOME
export HADOOP_MAPRED_HOME=$HADOOP_HOME
export HADOOP_COMMON_HOME=$HADOOP_HOME
export HADOOP_HDFS_HOME=$HADOOP_HOME
export YARN_HOME=$HADOOP_HOME
export HADOOP_COMMON_LIB_NATIVE_DIR=$HADOOP_HOME/lib/native
export PATH=$PATH:$HADOOP_HOME/sbin:$HADOOP_HOME/bin
#flume
export FLUME_HOME=/usr/local/Flume
export PATH=$PATH:/FLUME_HOME/apache-flume-1.6.0-bin/bin
export CLASSPATH=$CLASSPATH:/FLUME_HOME/apache-flume-1.6.0-bin/lib/*

And finally my /etc/hosts file is set up as so:

127.0.0.1  localhost
10.0.2.15  trz-VirtualBox
10.0.2.15  hadoopmaster


# 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

The added hadoopmaster I am currently not using, that was one of my attempts to fix this by trying not to use local host (didn't work). trz-VirtualBox was originally 127.0.1.1 but I read that you should use your real IP address? Neither worked so I am not sure. I posted all of these files because I do not know where the error is. I do not think it is a path issue (I had a lot before I got to this step and was able to resolve them myself) so I am out of ideas. I've been at this for a number of hours now so any help is appreciated. Thank you.

Troy Zuroske

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Hadoop: java.net.ConnectException: Connection refused

From Dev

Hadoop "failed on connection exception: java.net.ConnectException: Connection refused"

From Dev

java.net.ConnectException: Connection refused TCP

From Dev

java.net.ConnectException: Connection refused: connect

From Dev

Hadoop standalone installation - java.net.ConnectException: Connection refused error while running jar

From Dev

ConnectException: Connection refused when run mapreduce in Hadoop

From Dev

java.net.ConnectException: Connection refused: connect for HTTPS connections

From Dev

Tomcat exception - java.net.ConnectException: Connection refused: connect

From Dev

java.net.ConnectException: Connection refused: connect: localhost

From Dev

java.net.ConnectException: Connection refused error when running Hive

From Dev

Jetty 9.0.6 - java.net.ConnectException: Connection refused: connect

From Dev

Unable to open debugger port : java.net.ConnectException "Connection refused"

From Dev

java.net.ConnectException: Connection refused apache mysql

From Dev

Caused by: java.net.ConnectException: Connection refused: no further information

From Dev

java.net.ConnectException: Connection refused: connect,Launch canceled

From Dev

java.net.ConnectException: Connection refused apache mysql

From Dev

Authentication error and java.net.ConnectException: Connection refused

From Dev

Spring boot inside docker container throws java.net.ConnectException: Connection refused (Connection refused)

From Dev

How to resolve java net ConnectException Connection refused connect even server is up

From Dev

com.jcraft.jsch.JSchException: java.net.ConnectException: Connection refused: connect

From Dev

IOException java.net.ConnectException: failed to connect to /127.0.0.1(port 5000):connect failed:ECONNREFUSED(Connection Refused)

From Dev

java.net.ConnectException: failed to connect to /192.168.253.3 (port 2468): connect failed: ECONNREFUSED (Connection refused)

From Dev

NIO client giving exception : java.net.ConnectException: Connection refused: no further information

From Dev

com.sun.jersey.api.client.ClientHandlerException: java.net.ConnectException: Connection refused: connect in Spring Boot

From Dev

java.rmi.ConnectException: Connection refused to host: 127.0.0.1

From Dev

java.rmi.ConnectException: Connection refused to host: <public IP>

From Dev

Zookeeper -Kafka: ConnectException - Connection refused

From Dev

Neo4j 1.9 throws "java.net.ConnectException: Connection refused" with multi-threaded neocons client

From Dev

Storm UI getting Internal Server Error :org.apache.thrift7.transport.TTransportException: java.net.ConnectException: Connection refused

Related Related

  1. 1

    Hadoop: java.net.ConnectException: Connection refused

  2. 2

    Hadoop "failed on connection exception: java.net.ConnectException: Connection refused"

  3. 3

    java.net.ConnectException: Connection refused TCP

  4. 4

    java.net.ConnectException: Connection refused: connect

  5. 5

    Hadoop standalone installation - java.net.ConnectException: Connection refused error while running jar

  6. 6

    ConnectException: Connection refused when run mapreduce in Hadoop

  7. 7

    java.net.ConnectException: Connection refused: connect for HTTPS connections

  8. 8

    Tomcat exception - java.net.ConnectException: Connection refused: connect

  9. 9

    java.net.ConnectException: Connection refused: connect: localhost

  10. 10

    java.net.ConnectException: Connection refused error when running Hive

  11. 11

    Jetty 9.0.6 - java.net.ConnectException: Connection refused: connect

  12. 12

    Unable to open debugger port : java.net.ConnectException "Connection refused"

  13. 13

    java.net.ConnectException: Connection refused apache mysql

  14. 14

    Caused by: java.net.ConnectException: Connection refused: no further information

  15. 15

    java.net.ConnectException: Connection refused: connect,Launch canceled

  16. 16

    java.net.ConnectException: Connection refused apache mysql

  17. 17

    Authentication error and java.net.ConnectException: Connection refused

  18. 18

    Spring boot inside docker container throws java.net.ConnectException: Connection refused (Connection refused)

  19. 19

    How to resolve java net ConnectException Connection refused connect even server is up

  20. 20

    com.jcraft.jsch.JSchException: java.net.ConnectException: Connection refused: connect

  21. 21

    IOException java.net.ConnectException: failed to connect to /127.0.0.1(port 5000):connect failed:ECONNREFUSED(Connection Refused)

  22. 22

    java.net.ConnectException: failed to connect to /192.168.253.3 (port 2468): connect failed: ECONNREFUSED (Connection refused)

  23. 23

    NIO client giving exception : java.net.ConnectException: Connection refused: no further information

  24. 24

    com.sun.jersey.api.client.ClientHandlerException: java.net.ConnectException: Connection refused: connect in Spring Boot

  25. 25

    java.rmi.ConnectException: Connection refused to host: 127.0.0.1

  26. 26

    java.rmi.ConnectException: Connection refused to host: <public IP>

  27. 27

    Zookeeper -Kafka: ConnectException - Connection refused

  28. 28

    Neo4j 1.9 throws "java.net.ConnectException: Connection refused" with multi-threaded neocons client

  29. 29

    Storm UI getting Internal Server Error :org.apache.thrift7.transport.TTransportException: java.net.ConnectException: Connection refused

HotTag

Archive