Problem of Uninstall Cloudera: Can't 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 /dfsthe 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/profileand 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 hadoopis 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: Can't Add Hdfs and Reported Cannot Find CDH's bigtop-detect-javahome的更多相关文章
- 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 li ...
- Cloudera Manager5安装总结遇到问题及解决办法 CDH 5.8 on CentOS 7
问题导读:1.Cloudera Manager在线安装你认为有什么优点和缺点?2.Cloudera Manager安装过程中遇到,你认为该如何解决?3.在线安装addr.arpa domain nam ...
- How-to: Do Real-Time Log Analytics with Apache Kafka, Cloudera Search, and Hue
Cloudera recently announced formal support for Apache Kafka. This simple use case illustrates how to ...
- 离线安装Cloudera Manager 5和CDH5(最新版5.1.3) 完全教程
关于CDH和Cloudera Manager CDH (Cloudera's Distribution, including Apache Hadoop),是Hadoop众多分支中的一种,由Cloud ...
- UVA 10954 Add All 哈夫曼编码
题目链接: 题目 Add All Time Limit:3000MS Memory Limit:0KB 问题描述 Yup!! The problem name reflects your task; ...
- 利用 Docker 搭建单机的 Cloudera CDH 以及使用实践
想用 CDH 大礼包,于是先在 Mac 上和 Centos7.4 上分别搞个了单机的测试用.其实操作的流和使用到的命令差不多就一并说了: 首先前往官方下载包: https://www.cloudera ...
- hadoop系列 第一坑: hdfs JournalNode Sync Status
今天早上来公司发现cloudera manager出现了hdfs的警告,如下图: 解决的思路是: 1.首先解决简单的问题,查看警告提示的设置的阀值时多少,这样就可以快速定位到问题在哪了,果然Journ ...
- Cloudera Manager5及CDH5在线(cloudera-manager-installer.bin)安装详细文档
问题导读:1.Cloudera Manager5如何使用cloudera-manager-installer.bin安装?2.Cloudera Manager5安装被中断该如何继续安装?还是重新安装? ...
- 【转】XZip and XUnzip - Add zip and/or unzip to your app with no extra .lib or .dll
原文:http://www.codeproject.com/Articles/4135/XZip-and-XUnzip-Add-zip-and-or-unzip-to-your-app-w Downl ...
随机推荐
- 遇到android.os等系统sdk包没有自动导入的情况
采取手动导入,build path,然后add external jar,找到sdk的安装目录,导入android 的jar包即可
- CentOS7.2上用KVM安装虚拟机window10踩过的坑
最近两个星期一直在琢磨kvm安装window10操作系统,并且通过桥接模式与外界通信,经历了九九八十一难,终于搞定.下面就记录以下我们在探索的过程中踩过的坑. 安装KVM 1. 系统要求:需要一台可以 ...
- twemproxyMemcache协议解析探索——剖析twemproxy代码正编补充
memcache是一种和redis类似的高速缓存服务器,但是memcache只提供键值对这种简单的存储方式,相对于redis支持的存储方式多样化,memcache就比较简单了.memcache通过tc ...
- 把编译安装的httpd 实现服务脚本,通过service和chkconfig 进行管理
把编译安装的httpd 实现服务脚本,通过service和chkconfig 进行管理 1 编译安装httpd 把httpd编译安装在/app/httpd/目录下. 2 在/etc/rc.d/init ...
- 水题 第三站 HDU Largest prime factor
先写一遍思路,跟素数表很类似吧. 1)从小到大遍历数据范围内的所有数.把包含质因子的数的位置都设成跟质因子的位置相同. 2)同一个数的位置可能被多次复写.但是由于是从小到大遍历,这就保证了最后一次写入 ...
- Windows 10 上,Edge 浏览器不支持插件,因此将不运行 Java
在 Windows 10 上,Edge 浏览器不支持插件,因此将不运行 Java.微软想干嘛?
- 获取子物体数量---Transform.childCount
如何判断一个物体下是否有子物体?getchild(0)!=null?显然不可取 那去获取拿到子物体数量?transform.GetChildCount();可以解决 但在新版本中已被弃用,可用tran ...
- .NetCore~C#6的一些新特性
回到目录 在进行.netCore平台后,由于它的版本在.net4.6,C#6之后,所以它的语法也有一些新的特性,主要表现在以下几个方面 只读属性初始化 static string Hello => ...
- asp.net修行入门讨论
突然想起来大学的一个专业课老师,教C,C#,他的教学特点就是只教简单知识,现在想想真有道理,假如上来就教我们枯燥难以理解的高深知识,我们会恐惧编程的,极大地打击学习的兴趣,所以他C语言的指针从来没教过 ...
- C++第二篇--访问控制
C++第二篇--访问控制 1. 引入 上一篇博文中从结构体引到了类,类当中不仅有数据成员还有一些函数,这些函数被称为成员函数.今天介绍新的内容,类当中的访问控制. 2. 访问控制 当你不添加任何声明, ...