20170426搜集解决方案:
1.解决方案(关闭安全模式):
bin/hadoop dfsadmin -safemode leave
bin/hadoop dfs -chmod -R 777 /tmp
hadoop dfsadmin -report看看datanode是否运行
2.hdfs-site.xml 配置name路径
<configuration>
<property>
<name>dfs.name.dir</name>
<value>file:/home/hadoop/dfs/name</value>
</property>
<property>
<name>dfs.data.dir</name>
<value>file:/home/hadoop/dfs/data</value>
</property>
</configuration>
3.hadoop各种xml配置文件中ip地址都用hosts文件中对应的别名设置。
4.删除hosts文件中localhost等配置,自己明确定义每个ip对应的别名。
20170427新搜集解决方案:
一。保持master节点上namespaceid和子节点上的一致:
0.20.2版本解决方式:
1、查看名称节点上(即在配置文件中配置的hadoop.tmp.dir参数路径)/usr/hadoop0.20.2/hadoop-huanghz/dfs/name/current/文件夹中VERSION文件中的namespaceid;
2、在两个数据节点修改上dfs.data.dir配置的路径下current文件夹中的VERSION文件namespaceid与名称节点保持一致
2.20版本解决
/data/hadoop/dfs/name/current/VERSION
用name下面的clusterID,修改datanode的/data/hadoop/dfs/data/current/VERSION 里面的clusterID
每次格式化,name下面的VERSION的clusterID会产生一个新的ID,要去修改各个节点的VERSION的clusterID
二。hdfs-site.xml文件的配置问题,置的路径*/dfs/name注意权限的问题,前面需要加file://(不是hdfs?),否则格式化失败
<property>
<name>dfs.name.dir</name>
<value>file:///home/grid/hadoop-2.5.2/dfs/name</value>
</property>
<property>
<name>dfs.data.dir</name>
<value>file:///home/grid/hadoop-2.5.2/dfs/data</value>
</property>
三。关闭防火墙:***********非常重要***********
# systemctl status firewalld.service --查看防火墙状态
# systemctl stop firewalld.service --关闭防火墙
# systemctl disable firewalld.service --永久关闭防火墙
关闭防火墙:
systemctl status firewalld
systemctl disable firewalld
systemctl stop firewalld
关闭SELinux:
sestatus
vi /etc/sysconfig/selinu
#下面为selinux文件中需要修改的元素
SELINUX=disabled
chkconfig iptables off
/etc/init.d/iptables stop
http://www.xdowns.com/soft/softdown.asp?softid=121508
本文汇总了Hadoop启动时遇到的Datanode错误问题及其解决方案,包括关闭安全模式、配置hdfs-site.xml、统一namespaceid、检查路径权限、关闭防火墙和SELinux等步骤。确保Hadoop集群正常运行。
1万+

被折叠的 条评论
为什么被折叠?



