-
Bug
-
Resolution: Not A Defect
-
Major
-
None
The installer does not throw an error but the resulting installation is not unusable.
Sample output from trying to run this on a jenkinsci/slave:alpine with the docker-plugin
Running as SYSTEM [EnvInject] - Loading node environment variables. Installing AdoptOpenJDK to /home/jenkins/tools/hudson.model.JDK/jdkadopt ERROR: Failed to download file:/var/lib/jenkins/caches/adoptopenjdk/LINUX/amd64/jdk-11.0.5+10.zip from agent; will retry from master Also: hudson.remoting.Channel$CallSiteStackTrace: Remote call to docker-006z72dcdzrtj at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1743) at hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:357) at hudson.remoting.Channel.call(Channel.java:957) at hudson.FilePath.act(FilePath.java:1070) at hudson.FilePath.act(FilePath.java:1059) at hudson.FilePath.installIfNecessaryFrom(FilePath.java:913) at hudson.FilePath.installIfNecessaryFrom(FilePath.java:846) at io.jenkins.plugins.adoptopenjdk.AdoptOpenJDKInstaller.performInstallation(AdoptOpenJDKInstaller.java:121) at hudson.tools.InstallerTranslator.getToolHome(InstallerTranslator.java:69) at hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:109) at hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:206) at hudson.model.JDK.forNode(JDK.java:147) at org.jenkinsci.plugins.envinject.util.RunHelper.getJDKVariables(RunHelper.java:111) at org.jenkinsci.plugins.envinject.util.RunHelper.getBuildVariables(RunHelper.java:134) at org.jenkinsci.plugins.envinject.EnvInjectListener.setUpEnvironmentWithoutJobPropertyObject(EnvInjectListener.java:233) at org.jenkinsci.plugins.envinject.EnvInjectListener.setUpEnvironment(EnvInjectListener.java:49) at hudson.model.AbstractBuild$AbstractBuildExecution.createLauncher(AbstractBuild.java:542) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:462) at hudson.model.Run.execute(Run.java:1818) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:97) at hudson.model.Executor.run(Executor.java:429) java.io.FileNotFoundException: /var/lib/jenkins/caches/adoptopenjdk/LINUX/amd64/jdk-11.0.5+10.zip (No such file or directory) at java.io.FileInputStream.open0(Native Method) at java.io.FileInputStream.open(FileInputStream.java:195) at java.io.FileInputStream.<init>(FileInputStream.java:138) at java.io.FileInputStream.<init>(FileInputStream.java:93) at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:90) at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:188) at java.net.URL.openStream(URL.java:1045) at hudson.FilePath$Unpack.invoke(FilePath.java:949) at hudson.FilePath$Unpack.invoke(FilePath.java:943) at hudson.FilePath$FileCallableWrapper.call(FilePath.java:3050) at hudson.remoting.UserRequest.perform(UserRequest.java:212) at hudson.remoting.UserRequest.perform(UserRequest.java:54) at hudson.remoting.Request$2.run(Request.java:369) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Building remotely on docker-006z72dcdzrtj on helpsbslave01.fi.f-secure.com (docker) (any) in workspace /home/jenkins/workspace/adopt-test Installing AdoptOpenJDK to /home/jenkins/tools/hudson.model.JDK/jdkadopt ERROR: Failed to download file:/var/lib/jenkins/caches/adoptopenjdk/LINUX/amd64/jdk-11.0.5+10.zip from agent; will retry from master Also: hudson.remoting.Channel$CallSiteStackTrace: Remote call to docker-006z72dcdzrtj at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1743) at hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:357) at hudson.remoting.Channel.call(Channel.java:957) at hudson.FilePath.act(FilePath.java:1070) at hudson.FilePath.act(FilePath.java:1059) at hudson.FilePath.installIfNecessaryFrom(FilePath.java:913) at hudson.FilePath.installIfNecessaryFrom(FilePath.java:846) at io.jenkins.plugins.adoptopenjdk.AdoptOpenJDKInstaller.performInstallation(AdoptOpenJDKInstaller.java:121) at hudson.tools.InstallerTranslator.getToolHome(InstallerTranslator.java:69) at hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:109) at hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:206) at hudson.model.JDK.forNode(JDK.java:147) at hudson.model.AbstractProject.getEnvironment(AbstractProject.java:341) at hudson.model.Run.getEnvironment(Run.java:2374) at hudson.model.AbstractBuild.getEnvironment(AbstractBuild.java:864) at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:102) at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:66) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:741) at hudson.model.Build$BuildExecution.build(Build.java:206) at hudson.model.Build$BuildExecution.doRun(Build.java:163) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:504) at hudson.model.Run.execute(Run.java:1818) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:97) at hudson.model.Executor.run(Executor.java:429) java.io.FileNotFoundException: /var/lib/jenkins/caches/adoptopenjdk/LINUX/amd64/jdk-11.0.5+10.zip (No such file or directory) at java.io.FileInputStream.open0(Native Method) at java.io.FileInputStream.open(FileInputStream.java:195) at java.io.FileInputStream.<init>(FileInputStream.java:138) at java.io.FileInputStream.<init>(FileInputStream.java:93) at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:90) at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:188) at java.net.URL.openStream(URL.java:1045) at hudson.FilePath$Unpack.invoke(FilePath.java:949) at hudson.FilePath$Unpack.invoke(FilePath.java:943) at hudson.FilePath$FileCallableWrapper.call(FilePath.java:3050) at hudson.remoting.UserRequest.perform(UserRequest.java:212) at hudson.remoting.UserRequest.perform(UserRequest.java:54) at hudson.remoting.Request$2.run(Request.java:369) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) [adopt-test] $ /bin/sh -xe /tmp/jenkins1014781285759488702.sh + env PATH=/home/jenkins/tools/hudson.model.JDK/jdkadopt/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/lib/jvm/java-1.8-openjdk/jre/bin:/usr/lib/jvm/java-1.8-openjdk/bin JAVA_HOME=/home/jenkins/tools/hudson.model.JDK/jdkadopt + java -version Picked up JAVA_TOOL_OPTIONS: -XX:+StartAttachListener -Dhttps.proxyHost=proxy.eu-west-1.acme.com -Dhttps.proxyPort=8080 -Dhttp.nonProxyHosts=localhost|127.*|[::1]|*.acme.com openjdk version "1.8.0_212" OpenJDK Runtime Environment (IcedTea 3.12.0) (Alpine 8.212.04-r0) OpenJDK 64-Bit Server VM (build 25.212-b04, mixed mode) + javac -version Picked up JAVA_TOOL_OPTIONS: -XX:+StartAttachListener -Dhttps.proxyHost=proxy.eu-west-1.acme.com -Dhttps.proxyPort=8080 -Dhttp.nonProxyHosts=localhost|127.*|[::1]|*.acme.com javac 1.8.0_212 + which java /usr/bin/java + which javac /usr/lib/jvm/java-1.8-openjdk/bin/javac + /home/jenkins/tools/hudson.model.JDK/jdkadopt/bin/java -version /tmp/jenkins1014781285759488702.sh: line 8: /home/jenkins/tools/hudson.model.JDK/jdkadopt/bin/java: not found Build step 'Execute shell' marked build as failure
TL;DR $JAVA_HOME/bin/java is not executable.
When I switch to a debian-based jenkinsci/slave it works as expected.
If it cannot be made to work I would ask that it at least fails the installation step instead of allowing the build to proceed. That would save time debugging the issue.
I tried this with multiple versions, notably jdk8u232-b09 which is used in the official docker image https://github.com/AdoptOpenJDK/openjdk-docker/blob/master/8/jdk/alpine/Dockerfile.hotspot.releases.full