背景是 Jenkins 2.354 升级到 Jenkins 2.381 之后,jenkins启动就挂,看docker的启动记录,是exit(1)。
看报错信息是 Running with Java 8 from /usr/local/openjdk-8/jre,which is older than the minimum requeired version (Java 11).

请教了之前处理过这个问题的同事,最后他是这样解决的:

/home/docker/overlay2/XXXEEEE/diff/usr/local/bin# diff jenkins.sh jenkins.sh.bak

37c37
< exec /usr/local/jdk-11.0.2/bin/java -Duser.home="$JENKINS_HOME" "${java_opts_array[@]}" -jar ${JENKINS_WAR} "${jenkins_opts_array[@]}" "$@"
---
> exec java -Duser.home="$JENKINS_HOME" "${java_opts_array[@]}" -jar ${JENKINS_WAR} "${jenkins_opts_array[@]}" "$@"
Logo

权威|前沿|技术|干货|国内首个API全生命周期开发者社区

更多推荐