Jenkins 添加节点Node报错JNI error has occurred UnsupportedClassVersionError

节点日志 报错信息如下

Error: A JNI error has occurred, please check your installation and try again

Exception in thread "main" java.lang.UnsupportedClassVersionError: hudson/remoting/Launcher has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0

从文字上看第一个错误类型是属于不支持的字节码版本,那就想到当前jenkins默认是用的java 11版本,而目标节点机器上用的java 8,字节码版本不兼容,我试过把这个jenkins的jdk改为11,不行,启动报错,那就只好改目标机器上的java版本了,于是在目标节点机器下载了java 11并把版本选择设置默认为11版本,然后重新laugh Node后节点上线成功。

下载java 11

shell 复制代码
sudo apt install openjdk-11-jdk --fix-missing

更换java默认版本

shell 复制代码
 update-alternatives --config java
相关推荐
libraG3 小时前
Jenkins打包问题
前端·npm·jenkins
JuiceFS3 小时前
从 MLPerf Storage v2.0 看 AI 训练中的存储性能与扩展能力
运维·后端
chen9459 小时前
mysql 3节点mgr集群部署
运维·后端
LH_R10 小时前
OneTerm开源堡垒机实战(三):功能扩展与效率提升
运维·后端·安全
dessler10 小时前
Hadoop HDFS-高可用集群部署
linux·运维·hdfs
少妇的美梦1 天前
logstash教程
运维
chen9451 天前
k8s集群部署vector日志采集器
运维
chen9451 天前
aws ec2部署harbor,使用s3存储
运维
東雪蓮☆1 天前
深入理解 LVS-DR 模式与 Keepalived 高可用集群
linux·运维·服务器·lvs
qq_264220891 天前
LVS负载均衡群集和LVS+Keepalived群集
运维·负载均衡·lvs