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 /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: 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 Developers Training】 64. 绘制形状
注:本文翻译自Google官方的Android Developers Training文档,译者技术一般,由于喜爱安卓而产生了翻译的念头,纯属个人兴趣爱好. 原文链接:http://developer ...
- GNU的makefile文件编写说明
这篇文章讲的相当详细,转来收藏: linux下Makefile学习 MAC
- Python3.5学习笔记-文件操作
在Python中,操作文件对象使用open函数来创建,下表列出了常用的操作file的函数: 序号 方法及描述 1.file.close() 关闭文件.关闭后文件不能再进行读写操作. 2.file.fl ...
- MOF编译器无法连接VMI服务器。原因可能是语义错误的解决方案
安装数据库时报错. 我这个是因为安装SQL SERVER时,没有卸载vs. 一般解决方法: WIN 7安装VS和SQL SERVER的顺序应该是先安装SQL SERVER 然后安装VS,当要重装SQL ...
- java--while、do while、for三种循环体
1.for可以记录执行次数: 2.while.do while的i放在sum的后面和for得到的执行次数和结果是一致的. 1.从执行结果来看,放在前面,虽然执行次数和i放在sum的后面是相同,但是结果 ...
- 关于 Eclipse中的Web项目 部署的文件位置 查看jsp源码的部署位置
使用 eclipse 开发web项目 会默认 部署在 工作目录下: .metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps 在这里 ...
- WNMP(Windows + Nginx + PHP + MySQL) 安装
最近在开发一个新的项目,环境用的是: Nginx1.10.3 下载地址: http://nginx.org/en/download.html 下载windows版本包 PHP 7.1.1 下载地 ...
- 狙杀ES6之开光篇
前言 最近有很多小伙伴在后台留言说,闰土哥,是时候来一波干货了!(机智的你们似乎已经猜到我接下来要说什么了,哈哈-).没错,今天闰土为大家带来了久违的干货文章,而且是一个系列的哦!(文章系列较长,请自 ...
- 没写完。。51nod_1630: B君的竞技场(期望 概率)
题目链接 根据 你可以认为B君的水平是在所有人中的等概率随机 ,设 每场中B君获胜的概率为p~U(0,1),在给定的x,y下至游戏结束B君的获胜场数为f(p) (这是一个关于p的函数), 由此
- hdu_5810:Balls and Boxes(期望)
这题似乎就是纯概率论.. E(V)=D(X_i)=npq (p=1/m,p+q=1) #include<bits/stdc++.h> using namespace std; typede ...