我按照指令
here在伪分布式模式下安装hadoop.
但是,我无法连接到HDFS.
当我执行此命令时:
./hadoop fs -ls /
我得到的目录列表就像我应该的那样.
但是,当我执行此命令时:
./hadoop fs -ls hdfs://localhost/
我明白了:
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
如果我在这里浏览:
http://localhost:50070/dfshealth.jsp
我得到了NameNode系统健康页面,就像我应该的那样.但是,如果我按照“浏览文件系统”链接,我相信这里:
http://localhost:50070/nn_browsedfscontent.jsp
不知道这两件事是否相关,但这肯定会阻止我.我正在尝试按照here概述的伪分布式模式设置hbase,但我不能,因为hbase无法连接到端口8020上的hdfs.
信息
我在CENTOS 6.2上运行hadoop .20和hbase .90.6.
Hadoop和hbase从我编写的init.d脚本开始启动.
Hadoop在hadoop用户下运行,位于/ opt / hadoop中.在hadoop init.d脚本中,我使用daemon命令执行start-all.sh.
HBase在root下运行,位于/ opt / hbase中.在hbase init.d脚本中,我执行start-hbase.sh脚本.目前我在独立模式下运行HBase.
解决方法
看起来我错误地将fs.default.name设置为9000.将其更改为8020,现在一切正常.感谢mgorven的帮助!