Problem of Uninstall Cloudera: Cannot Add Hdfs and Reported Cannot Find CDH's bigtop-detect-javahome
1. Problem
We wrote a shell script to uninstall Cloudera Manager(CM) that run in a cluster with 3 linux server. After run the script, we reinstalled the CM normally. But when we established Hdfs encountered a problem: **failed to format NameNode. Cannot find CDH's bigtop-detect-javahome. **
2.Thinking
- By google we found if it caused by the exist of floder "/dfs", but after used command
rm -rf /dfs
the problem still happen. - We found the error reported:
/usr/libexec/bigtop-detect-javahome
, so we thought if caused by JAVA_HOME variable exception. At first, we disable the file:/etc/profile
's JAAVA_HOME variable. To make the change effect, we shouldsource /etc/profile
and disconnect the xshell. however, the problem still happen. - Recheck the uninstall script, we found the script delete files:
/usr/bin/hadoop*
which was important.
now /etc/profile as follow:
#export JAVA_HOME=/usr/java/jdk1.7.0_67-cloudera
#export PATH=$JAVA_HOME/bin:$PATH
#export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
3. Slove
follwing step you should do in each server of the cluster.
3.1 Check file hadoop avaliable
cd to the floder /usr/bin and check if file hadoop
is avaliable. the content of file as follows:
#!/bin/bash
# Autodetect JAVA_HOME if not defined
. /usr/lib/bigtop-utils/bigtop-detect-javahome
export HADOOP_HOME=/usr/lib/hadoop
export HADOOP_MAPRED_HOME=/usr/lib/hadoop
export HADOOP_LIBEXEC_DIR=//usr/lib/hadoop/libexec
export HADOOP_CONF_DIR=/etc/hadoop/conf
exec /usr/lib/hadoop/bin/hadoop "$@"
we found it load file bigtop-detect-javahome
and set HADOOP_HOME.
It's a pity that /usr/lib/hadoop*
and /usr/lib/hadoop*
was delete by our uninstall script, so we copied those file and floder from another cluster to our cluster.
3.2 Check file bigtop-detect-javahome avaliable
cd to the floder /usr/lib/bigtop-utils and check if filebigtop-detect-javahome
is avaliable, the content of file as follows:
# attempt to find java
if [ -z "${JAVA_HOME}" ]; then
for candidate_regex in ${JAVA_HOME_CANDIDATES[@]}; do
for candidate in `ls -rvd ${candidate_regex}* 2>/dev/null`; do
if [ -e ${candidate}/bin/java ]; then
export JAVA_HOME=${candidate}
break 2
fi
done
done
fi
the file is used to set JAVA_HOME variable when system doesn't define JAVA_HOME in /etc/profile.
Finally, I found no matter the file /etc/profile
with JAVA_HOME variable or without it, Hdfs can be installed.
3.3 More and more
Go through the first two steps can slove the problem, but more google let me know /etc/default/
is real config floder !
refer: http://blog.sina.com.cn/s/blog_5d9aca630101pxr1.html
addexport JAVA_HOME=path
into /etc/default/bigtop-utils
, then source /etc/default/bigtop-utils
.
You only need to do it once and all CDH components would use that variable to figure out where JDK is.
4. Conclusion
- Always focus on the log file content and error's relation is.
- Make the best use of your time and modest ask for advise to other. otherwise, the problem always exists.
Problem of Uninstall Cloudera: Cannot Add Hdfs and Reported Cannot Find CDH's bigtop-detect-javahome的更多相关文章
- Problem of Uninstall Cloudera: Can't Add Hdfs and Reported Cannot Find CDH's bigtop-detect-javahome
[toc] 1. Problem We wrote a shell script to uninstall Cloudera Manager(CM) that run in a cluster wit ...
- 使用Cloudera Manager搭建HDFS完全分布式集群
使用Cloudera Manager搭建HDFS完全分布式集群 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 关于Cloudera Manager的搭建我这里就不再赘述了,可以参考 ...
- 使用Cloudera Manager搭建zookeeper集群及HDFS HA实战篇
使用Cloudera Manager搭建zookeeper集群及HDFS HA实战篇 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 一.使用Cloudera Manager搭建zo ...
- hdfs client access the hdfs cluster not in one domain
https://hadoop.apache.org/docs/stable/hadoop-project-dist/hadoop-hdfs/HdfsMultihoming.html#Clients_u ...
- cloudera learning1:cloudera简介及安装
cloudera分为两个部分:CDH和CM.CDH是Cloudera Distribution Hadoop的简称,顾名思义,就是cloudera公司发布的Hadoop版本,封装了Apache Had ...
- CDH(Cloudera)与hadoop(apache)对比
本文出自:CDH(Cloudera)与hadoop(apache)对比http://www.aboutyun.com/thread-9225-1-1.html(出处: about云开发) 问题导读 ...
- 纯手工全删除域内最后一个EXCHANGE--How to Manually Uninstall Last Exchange 2010 Server from Organization
http://www.itbigbang.com/how-to-manually-uninstall-last-exchange-2010-server-from-organization/ 没办法, ...
- Hadoop cloudera版和Apache(原生态)的区别
---------------------------------------------------------------------------------------------------- ...
- HDFS 和 YARN 的 HA 故障切换【转】
来源:https://blog.csdn.net/u011414200/article/details/50336735 一 非 HDFS HA 集群转换成 HA 集群二 HDFS 的 HA 自动切换 ...
随机推荐
- android高速上手(三)经常使用控件使用
版权声明:本文为博主原创文章,未经博主同意不得转载. https://blog.csdn.net/wangpeifeng669/article/details/26288387 完毕了android的 ...
- 【转】Bash Shell中命令行选项/参数处理
原文网址:http://www.cnblogs.com/FrankTan/archive/2010/03/01/1634516.html 0.引言 写程序的时候经常要处理命令行参数,本文描述在Bash ...
- java并发回答
java 线程安全比较重要的点: 在 java 编程中,记住这些关键点可以帮你避免一些严重的并发问题,比如条件竞争或死锁. 1).不可变对象默认是线程安全的,因为他们一旦被创建就不会被修改.比 ...
- 深入理解java虚拟机,内存管理部分
1,对象回收前会调用finalize()方法,尝试自救,只能调用一次 2,上面横向对比c++的析构函数,但是java有良好的内存管理,而且try/catch做得比较好 3,回收一个常量,1,对象的实例 ...
- php如何获取服务器所在的时区
//获取默认时区echo date_default_timezone_get(); //将时区设置为中国date_default_timezone_set("PRC"); //将时 ...
- Am335x 下GPIO控制实例-驱动程序(转)
看了这么多的资料,现在决定上手了,下面将用两种方式来实现对GPIO 117的控制1,用直接添加到内核的方式,实现MISC的驱动(misc_register)2,用手工安装的方式,实现简单字符设备驱动( ...
- open_input_file函数调用结构图(转)
open_input_file函数调用结构图(有些重复的函数调用就略掉了,大致是按流程往下的). 函数大致说明: AVFormatContext *avformat_alloc_context(voi ...
- Fri Oct 31 18:00:00 UTC+0800 2008转换为yyyy-mm-dd
这个其实网上有很多例子,都是直接用js在前端做了时间处理,我的处理也一样,想要变成2008-3-31,就用下面的js直接可以处理 function Todate(num) { //Fri Oct 31 ...
- 给iOS开发新手送点福利,简述UITextField的属性和用法
UITextField属性 0. enablesReturnKeyAutomatically 默认为No,如果设置为Yes,文本框中没有输入任何字符的话,右下角的返回按钮是disabled的. ...
- Building a Simple User Interface(创建一个简单的用户界面)
对于一个android 应用程序,用户的图形界面通常是由View(视图)和ViewGroup(视图组)对象构成的层次结构. View(视图)对象通常是按钮或文本输入框这类UI小部件,ViewGroup ...