Hadoop【问题记录】【hadoop-3.1.3 单机版】ResourceManager无法启动NodeManager启动后过一段时间自动关闭 javax/activation/DataSource

报错

版本为 hadoop-3.1.3,这个问题出现的原因很多,首先是看报错日志:

[root@tcloud sbin]# cd /usr/local/hadoop-3.1.3/logs/
[root@tcloud logs]# ll
# 查看最新的 resourcemanager 日志
[root@tcloud logs]# cat ./hadoop-root-resourcemanager-tcloud.log

主要的报错信息如下:

Error injecting constructor, java.lang.NoClassDefFoundError: javax/activation/DataSource

解决

这显然不是Hadoop的配置问题,报错时,我是用的jdk版本是:

[root@tcloud ~]# java -version
openjdk version "11" 2018-09-25
OpenJDK Runtime Environment 18.9 (build 11+28)
OpenJDK 64-Bit Server VM 18.9 (build 11+28, mixed mode)

我将jdk换回8:

[root@tcloud logs]# java -version
java version "1.8.0_251"
Java(TM) SE Runtime Environment (build 1.8.0_251-b08)
Java HotSpot(TM) 64-Bit Server VM (build 25.251-b08, mixed mode)
[root@tcloud sbin]# ./start-yarn.sh
Starting resourcemanager
Last login: Wed Jul 28 17:22:16 CST 2021 from 123.160.246.239 on pts/1
Last failed login: Wed Jul 28 17:38:44 CST 2021 from 192.64.83.51 on ssh:notty
There were 41 failed login attempts since the last successful login.
Starting nodemanagers
Last login: Wed Jul 28 17:39:14 CST 2021 on pts/1

问题解决。

总结

不得不总结一下,最新的jdk版本已经到17了,我们还止步在8,原因还是挺多的,不仅仅是升级成本高,还有很多不兼容的问题存在。

上一篇:HW | 安装RTXA6000的注意事项 driver不匹配PKCS#7 signature not signed with a trusted key的修复


下一篇:C#开发微信门户及应用(32)--微信支付接入和API封装使用