当前位置:   article > 正文

Jenkins 添加节点Node报错JNI error has occurred UnsupportedClassVersionError_hudson/remoting/launcher has been compiled by a mo

hudson/remoting/launcher has been compiled by a more recent version of the j

节点日志 报错信息如下
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

sudo apt install openjdk-11-jdk --fix-missing
  • 1

更换java默认版本

 update-alternatives --config java
  • 1

在这里插入图片描述

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/很楠不爱3/article/detail/151216
推荐阅读
  

闽ICP备14008679号