1
ls: Call From java.net.UnknownHostException: ubuntu: ubuntu: unknown error to localhost:9000 failed on connection exception: java.net.ConnectException: Connection refused; For more details see:  http://wiki.apache.org/hadoop/ConnectionRefused

My hadoop configuration is like this.

/etc/hosts

127.0.0.1   localhost
# 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

core-site.xml

<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>

hdfs-site.xml

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

mapred-site.xml

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

Is there any question?I have been browsing the web for one whole day..help me

Stillily
  • 39
  • 1
  • 9

1 Answers1

0

Try this:

1. Open /etc/hosts in terminal using command:

sudo nano /etc/hosts

2. Add this line below 127.0.0.1 line:

your-ip-address    hadoopmaster

NOTE: To find you ip address, type this command ifconfig | grep inet in terminal.

3. Change localhost to hadoopmaster in core-site.xml and mapred-site.xml

4. Stop all hadoop processes and then start again.

Rajesh N
  • 2,554
  • 1
  • 13
  • 17