启动CDH的cloudera-scm-server报错Error: JAVA_HOME is not set and Java could not be found

1 报错信息如下

+======================================================================+
| Error: JAVA_HOME is not set and Java could not be found |
+----------------------------------------------------------------------+
| Please download the latest Oracle JDK from the Oracle Java web site |
| > http://www.oracle.com/technetwork/java/javase/index.html < |
| |
| Cloudera Manager requires Java 1.6 or later. |
| NOTE: This script will find Oracle Java whether you install using |
| the binary or the RPM based installer. |
+======================================================================+

2 但是自己设置了JAVA_HOME啊

3在CDH的cloudera-scm-server启动脚本中添加JAVA_HOME环境变量

 find / -name 'cloudera-scm-server'

vim /etc/rc.d/init.d/cloudera-scm-server

export JAVA_HOME=/mnt/software/jdk1.8.0_201   

  

重启OK,不再报错

 

 

原文地址:https://www.cnblogs.com/QuestionsZhang/p/10433738.html