Hadoop安装,问题汇总

来源:互联网 发布:淘宝卖家中心手机版下载 编辑:程序博客网 时间:2024/05/23 02:20

1. 通过start-all.sh启动时,datanode节点提示 /home/jason/soft/jdk1.6.0_43/bin/jre/lib/i386/client/libjvm.so: cannot restoresegment prot after reloc: Permission denied 

这个问题 linux的防火墙没有关闭,导致namenode不能正常启动datanode的JVM,需要关闭防火墙。

编辑/etc/selinux/config,找到这段:

# This file controls the state of SELinux on the system.# SELINUX= can take one of these three values:# enforcing - SELinux security policy is enforced.# permissive - SELinux prints warnings instead of enforcing.# disabled - SELinux is fully disabled.SELINUX=enforcing 
把 SELINUX=enforcing 注释掉:#SELINUX=enforcing ,然后新加一行为:
SELINUX=disabled
保存,关闭。
......

编辑/etc/sysconfig/selinux,找到:

#This file controls the state of SELinux on the system.# SELINUX= can take one of these three values:# enforcing - SELinux security policy is enforced.# permissive - SELinux prints warnings instead of enforcing.# disabled - SELinux is fully disabled.SELINUX=enforcing 
如果SELINUX已经是 SELINUX=disabled,那么就不用改了,否则就把SELINUX=enforcing 注释掉,新加一行:
SELINUX=disabled
保存,退出。

如果你碰到其他类似提示:
cannot restore segment prot after reloc: Permission denied
哪应该是SELinux的问题,可以考虑把它关闭。
-------------------------------------------------------------------------------------
郁闷的是.我把SELinux关闭后还是不行.于是到google上search.发现这个很有用.
在你保证SElinux 被disable后.还执行下
chcon -t texrel_shlib_t 
如: chcon -t texrel_shlib_t /路径/路径/名字.so   (这个文件视具体执行文件.)

以上两步.已经解决了很多server的问题了


2. DateNode启动错误。通过查询日志,显示

 FATAL org.apache.hadoop.hdfs.server.datanode.DataNode: Initialization failed for block pool Block pool BP-66793784-127.0.0.1-1409789958067 (storage id DS-499334816-127.0.0.1-50010-1409712932571) service to cloud001/192.168.243.132:9000java.io.IOException: Incompatible clusterIDs in /usr/hadoop-2.2.0/data: namenode clusterID = CID-63b4cb6c-7a02-408a-9592-f7a910f35b1f; datanode clusterID = CID-f4dd9415-b3b3-4272-b23f-f5fab03fbf1c
此类就是因为namenode 和datanode的clusterID不一致导致。

修改办法:

解决方法一:删除 datanode 的所有资料,主要指的是tmp目录和data目录,适用没存放过任何资料的HDFS;
解决方法二:修改 datanode 的 namespaceID
编辑每台 datanode 的 hadoop.tmp.dir/hadoop/hadoop-root/dfs/data/current/VERSION 把ID改为和namenode一致,重启datanode,数据会丢失。


3. 目前发现有一个警告,还不知道原因:请各位大神给予答案。

WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicablestarting yarn daemons
很多网友说是版本等问题。我这边版本都是32为的操作系统,32位的JDK,Hadoop。

访问:8088、50070等JSP页面都是没有问题。


0 0