centos7.2环境,CDH6.3.1安装CM启动不了

现象

在进行cdh6.3.1安装过程中,使用 systemctl start cloudera-scm-server 启动CM 无任何日志,启动失败。

问题定位

很慌,使用 linux自带的系统日志工具:journalctl -xe,发现如下错误:

-- The start-up result is done.
Dec 19 19:28:06 hdh02.c.p.xyidc cm-server[1826]: +======================================================================+
Dec 19 19:28:06 hdh02.c.p.xyidc cm-server[1826]: |      Error: Unable to find a compatible version of Java on this host,|
Dec 19 19:28:06 hdh02.c.p.xyidc cm-server[1826]: |             either because JAVA_HOME has not been set or because a   |
Dec 19 19:28:06 hdh02.c.p.xyidc cm-server[1826]: |             compatible version of Java is not installed.             |
Dec 19 19:28:06 hdh02.c.p.xyidc cm-server[1826]: +----------------------------------------------------------------------+
Dec 19 19:28:06 hdh02.c.p.xyidc cm-server[1826]: | Please install either:                                               |
Dec 19 19:28:06 hdh02.c.p.xyidc cm-server[1826]: | - a supported version of the Oracle JDK from the Oracle Java web     |
Dec 19 19:28:06 hdh02.c.p.xyidc cm-server[1826]: |   site:                                                              |
Dec 19 19:28:06 hdh02.c.p.xyidc cm-server[1826]: |   > http://www.oracle.com/technetwork/java/javase/index.html <       |
Dec 19 19:28:06 hdh02.c.p.xyidc cm-server[1826]: | OR                                                                   |
Dec 19 19:28:06 hdh02.c.p.xyidc cm-server[1826]: | - a supported version of the OpenJDK from your OS vendor.  Help for  |
Dec 19 19:28:06 hdh02.c.p.xyidc cm-server[1826]: |   some OSes are available at:                                        |
Dec 19 19:28:06 hdh02.c.p.xyidc cm-server[1826]: |   > http://openjdk.java.net/install/ <                               |
Dec 19 19:28:06 hdh02.c.p.xyidc cm-server[1826]: |                                                                      |
Dec 19 19:28:06 hdh02.c.p.xyidc cm-server[1826]: | Cloudera Manager requires Oracle JDK or OpenJDK 1.8 or later.        |
Dec 19 19:28:06 hdh02.c.p.xyidc cm-server[1826]: | NOTE: Cloudera Manager will find the Oracle JDK when starting,       |
Dec 19 19:28:06 hdh02.c.p.xyidc cm-server[1826]: |       regardless of whether you installed the JDK using a binary     |
Dec 19 19:28:06 hdh02.c.p.xyidc cm-server[1826]: |       installer or the RPM-based installer.                          |
Dec 19 19:28:06 hdh02.c.p.xyidc cm-server[1826]: +======================================================================+
Dec 19 19:28:06 hdh02.c.p.xyidc systemd[1]: cloudera-scm-server.service: main process exited, code=exited, status=1/FAILURE
Dec 19 19:28:06 hdh02.c.p.xyidc systemd[1]: Unit cloudera-scm-server.service entered failed state.
Dec 19 19:28:06 hdh02.c.p.xyidc systemd[1]: cloudera-scm-server.service failed.
Dec 19 19:28:06 hdh02.c.p.xyidc systemd[1]: cloudera-scm-server.service holdoff time over, scheduling restart.
Dec 19 19:28:06 hdh02.c.p.xyidc systemd[1]: Stopped Cloudera CM Server Service.
-- Subject: Unit cloudera-scm-server.service has finished shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit cloudera-scm-server.service has finished shutting down.
Dec 19 19:28:06 hdh02.c.p.xyidc systemd[1]: start request repeated too quickly for cloudera-scm-server.service
Dec 19 19:28:06 hdh02.c.p.xyidc systemd[1]: Failed to start Cloudera CM Server Service.
-- Subject: Unit cloudera-scm-server.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel

可是我明明设置了JAVA_HOME。看这个提示好像说java的版本有问题,我这边安装的是:jdk1.8.0_181
正宗的 oracle jdk,版本跟官网也对的上,没得办法只能尝试使用CDH自带的jdk:oracle-j2sdk1.8-1.8.0+update181-1.x86_64.rpm进行安装,采用rpm的方式安装。
结果:。。。 CM启动成功了

说说我的怀疑: 有可能linux centos7.2 用tar包的方式安装,会导致一些默认的环境配置缺失。
然后cdh6.3.1版本又依赖这些配置。

你可能感兴趣的:(大数据--cdh)