Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I followed the instructions here for installing hadoop in pseudo-distributed mode.

However, I'm having trouble connecting to HDFS.

When I execute this command :

./hadoop fs -ls /

I get a directory listing just like I should.

However, when I execute this command :

./hadoop fs -ls hdfs://localhost/

I get this :

12/08/23 15:29:58 INFO ipc.Client: Retrying connect to server: localhost/127.0.0.1:8020. Already tried 0 time(s).
12/08/23 15:29:59 INFO ipc.Client: Retrying connect to server: localhost/127.0.0.1:8020. Already tried 1 time(s).
12/08/23 15:30:00 INFO ipc.Client: Retrying connect to server: localhost/127.0.0.1:8020. Already tried 2 time(s).
12/08/23 15:30:01 INFO ipc.Client: Retrying connect to server: localhost/127.0.0.1:8020. Already tried 3 time(s).
12/08/23 15:30:02 INFO ipc.Client: Retrying connect to server: localhost/127.0.0.1:8020. Already tried 4 time(s).
12/08/23 15:30:03 INFO ipc.Client: Retrying connect to server: localhost/127.0.0.1:8020. Already tried 5 time(s).
12/08/23 15:30:04 INFO ipc.Client: Retrying connect to server: localhost/127.0.0.1:8020. Already tried 6 time(s).
12/08/23 15:30:05 INFO ipc.Client: Retrying connect to server: localhost/127.0.0.1:8020. Already tried 7 time(s).
12/08/23 15:30:06 INFO ipc.Client: Retrying connect to server: localhost/127.0.0.1:8020. Already tried 8 time(s).
12/08/23 15:30:07 INFO ipc.Client: Retrying connect to server: localhost/127.0.0.1:8020. Already tried 9 time(s).
ls: Call to localhost/127.0.0.1:8020 failed on connection exception: java.net.ConnectException: Connection refused

If I browse here :

http://localhost:50070/dfshealth.jsp

I get the NameNode system health page, just like I should. However, if I follow the link that says "Browse the filesystem" which I believe goes here :

http://localhost:50070/nn_browsedfscontent.jsp

I get a 404 page from Jetty.

Don't know if the two things are related, but this is definitely blocking me. I'm trying to set up hbase in pseudo-distributed mode as outlined here, but I can't because hbase can't connect to hdfs on port 8020.

INFO

I'm running hadoop .20 and hbase .90.6 on CENTOS 6.2.

Hadoop and hbase start on boot-up, from init.d scripts that I wrote.

Hadoop is running under the hadoop user, and is located in /opt/hadoop. In the hadoop init.d script, I execute start-all.sh using the daemon command.

HBase is running under root, and is located in /opt/hbase. In the hbase init.d script, I execute the start-hbase.sh script. Currently I'm running HBase in standalone mode.

share|improve this question
3  
Check that the NameNode is listening on port 8020 with netstat -tlpn | grep :8020. If it is, check that you can connect to it with telnet localhost 8020. –  mgorven Aug 24 '12 at 6:46
1  
Thank you for the tip! I had followed a tutorial that instructed me to set fs.default.name to 9000, and forgotten about it. Changed it to 8020, now everything works like a charm! –  sangfroid Aug 25 '12 at 23:39
add comment

1 Answer 1

up vote 2 down vote accepted

Looks like I had mistakenly set fs.default.name to 9000. Changed it to 8020, now everything works fine. Thanks to mgorven for the help!

share|improve this answer
    
I must have followed the same tutorial. –  dmf85 Aug 28 '13 at 15:21
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.