我在Ubuntu單節點羣集上使用Hadoop 2.2。我使用start-all.sh啓動了hadoop集羣。當我嘗試在HDFS中加載文本文件時,它會引發錯誤。無法爲您的平臺(Ubuntu 12.04)錯誤加載native-hadoop庫?
[email protected]:~$ hadoop dfs -put /home/aditya/Desktop/data.txt
DEPRECATED: Use of this script to execute hdfs command is deprecated.
Instead use the hdfs command for it.
13/11/26 00:40:44 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
put: Call From ubuntu/127.0.1.1 to localhost:54310 failed on connection exception: java.net.ConnectException: Connection refused; For more details see: http://wiki.apache.org/hadoop/ConnectionRefused
這些是我的/ etc/hosts文件的詳細信息。 Plz檢查。
127.0.0.1 localhost
127.0.1.1 ubuntu
# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
我搜索&試圖解決這個錯誤,但沒有得到任何的成功。請幫助我提出你的想法。謝謝。
只是供參考,本機hadoop庫消息只是一個警告,並與您有實際的錯誤無關,這是連接被拒絕。 – climbage
嘿,謝謝Climbage。可能是你說的錯誤。我也搜索了這個錯誤,並試圖解決,但沒有得到任何好的結果。我發現的另一件事是關於32位64位版本的操作系統。 hadoop本地庫文件在32位版本上編譯。我正在使用64位版本的Ubuntu。這是錯誤原因嗎? – Aditya
可能取決於您使用的是32位還是64位的java – climbage