hadoop fs -ls不起作用 [英] hadoop fs -ls does not work
问题描述
我使用Ubuntu 14.04 OS在本地计算机上安装了单节点Hadoop。现在我要使用HDFS,并且当我输入一个简单的命令时:
hdu @ hadoop:〜$ hadoop fs -ls
显示以下错误:
15/07/10 18:24:52 WARN util.NativeCodeLoader:
无法为您的平台加载native-hadoop库...
使用内建-java类(如果适用)
ls:从hadoop / 127.0.1.1调用到
localhost:9000连接失败异常:
java.net.ConnectException:
连接被拒绝;有关更多详情,请参阅:
http://wiki.apache.org/hadoop/ConnectionRefused
我对这个错误没有任何想法,我非常感谢有人帮我解决这个问题:
开始你的namenode服务?格式化namenode实际上并不会启动namenode服务。如果你的namenode服务正在运行,那么你可能遇到了错误链接中引用的Ubuntu问题。
发件人: http://wiki.apache。 org / hadoop / ConnectionRefused
检查您的主机名是否没有映射到/ etc / hosts中的127.0.0.1或127.0.1.1的条目Ubuntu为此而臭名昭着)
I have installed a single node Hadoop on my local computer with Ubuntu 14.04 OS. Now I am going to use HDFS, and when I type a simple command
hdu@hadoop:~$ hadoop fs -ls
it shows up the following errors:
15/07/10 18:24:52 WARN util.NativeCodeLoader:
Unable to load native-hadoop library for your platform...
using builtin-java classes where applicable
ls: Call From hadoop/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 have no ideas about this error, and I really appreciate if anyone helps me fix the problem :)
Did you actually start your namenode service? Formatting the namenode doesn't actually start the namenode service. If your namenode service is running then perhaps you are running into the Ubuntu issue referenced in the link in the error.
From: http://wiki.apache.org/hadoop/ConnectionRefused
Check that there isn't an entry for your hostname mapped to 127.0.0.1 or 127.0.1.1 in /etc/hosts (Ubuntu is notorious for this)
这篇关于hadoop fs -ls不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!