先说明下我使用的环境:
centos7.x
cdh6.3.2
jdk1.8
之前的配置都配好后执行systemctl start cloudera-scm-server命令报如下错误:
[root@s30 ~]# systemctl status cloudera-scm-server
● cloudera-scm-server.service – Cloudera CM Server Service
Loaded: loaded (/usr/lib/systemd/system/cloudera-scm-server.service; enabled; vendor preset: disabled)
Active:
failed
(Result: start-limit) since 五 2020-08-07 10:01:06 CST; 7s ago
Process: 4537 ExecStart=/opt/cloudera/cm/bin/cm-server (
code=exited, status=1/FAILURE
)
Process: 4533 ExecStartPre=/opt/cloudera/cm/bin/cm-server-pre (code=exited, status=0/SUCCESS)
Main PID: 4537 (code=exited, status=1/
FAILURE
)
8月 07 10:01:06 s30 systemd[1]: cloudera-scm-server.service: main process exited, code=exited, status=1/FAILURE
8月 07 10:01:06 s30 systemd[1]: Unit cloudera-scm-server.service entered failed state.
8月 07 10:01:06 s30 systemd[1]: cloudera-scm-server.service failed.
8月 07 10:01:06 s30 systemd[1]: cloudera-scm-server.service holdoff time over, scheduling restart.
8月 07 10:01:06 s30 systemd[1]: Stopped Cloudera CM Server Service.
8月 07 10:01:06 s30 systemd[1]: start request repeated too quickly for cloudera-scm-server.service
8月 07 10:01:06 s30 systemd[1]:
Failed to start Cloudera CM Server Service
.
8月 07 10:01:06 s30 systemd[1]: Unit cloudera-scm-server.service entered failed state.
8月 07 10:01:06 s30 systemd[1]: cloudera-scm-server.service failed.
没有任何其他的日志了
然后通过命令journalctl -xe发现了一些端倪,提示JAVA_HOME找不到,但是我明明已经安装过了jdk怎么还会找不到呢,之后在一个脚本文件中找到了些答案,他会去使用/usr/java下的jdk,所以解决办法执行以下两条命令即可:
mkdir -p /usr/java
ln -s /opt/jdk1.8 /usr/java/default
其中jdk1.8是我的安装目录,改成自己的