当前位置:   article > 正文

Jenkins启动节点报错: Exception in thread “main“ java.lang.UnsupportedClassVersionError: hudson/remoting_jenkins exception in thread "main" java.lang.unsup

jenkins exception in thread "main" java.lang.unsupportedclassversionerror: h

报错信息如下:

[05/05/24 14:18:35] [SSH] Starting agent process: cd "/home/jenkins" && /usr/local/jdk/jdk1.8.0_391/bin/java  -jar remoting.jar -workDir /home/jenkins -jar-cache /home/jenkins/remoting/jarCache
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
  • 1
  • 2

错误原因:
由于Jenkins的运行环境是Java11,但是节点的运行环境是Java1.8导致。

错误解决办法:
把节点配置里的Jdk路径改为11以上即可。当然如果你项目运行必须用Java1.8,你可以先把jdk路径改为11以上,节点启动成功后,再改回1.8

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

闽ICP备14008679号