无法为您的平台加载本机hadoop库(ubuntu 12.04)错误?

0x6upsns  于 2021-06-04  发布在  Hadoop
关注(0)|答案(1)|浏览(401)

我在我的ubuntu单节点集群上使用hadoop2.2。我已经使用start-all.sh启动了hadoop集群。当我试图在hdfs中加载一个文本文件时,它抛出了以下错误。

hduser@ubuntu:~$ 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文件的详细信息。请检查。

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

我搜索并试图解决这个错误,但没有成功。请帮我说说你的想法。谢谢您。

6psbrbz9

6psbrbz91#

你用的是什么版本的hadoop?集群中有多少个节点?您看到的错误通常来自/etc/hosts设置。确保所有框可以通过名称相互ping。我已经删除了所有主机名到127.0.1.1的Map,并将主机名绑定到我们的小型2节点集群(hadoop2.2.0)中的ip。
............
请查看/etc/hosts设置的stackoverflow链接。安装配置单元后的hadoop(本地和主机目标不匹配)
我强烈建议您查看下面链接的hadoop2安装文档,因为有些东西已经改变了。

相关问题