Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-61913

build log spammed for expected behaviour when agent does not have install cached

XMLWordPrintable

      when using the plugin to install the JDK to an ephemeral agent after the first time of installing the JDK on any agent all subsequent builds contain logspam that the agent does not have the downloaded file.

      this is expected as the downloaded JDK is cached on the master not the agent - and for ephemeral agents (cloud agents) they likely won't have the JDK downlaoded (although if you build an image they may.

      thus on every build for every stage that uses a new cloud agent you get the following stack trace in the build log

      12:36:11  Installing AdoptOpenJDK to /home/jenkins/agent/tools/hudson.model.JDK/jdk-8u242
      12:36:11  Installing AdoptOpenJDK to /home/jenkins/agent/tools/hudson.model.JDK/jdk-8u242
      12:36:11  ERROR: Failed to download file:/var/jenkins_home/caches/adoptopenjdk/LINUX/amd64/jdk8u242-b08.zip from agent; will retry from master
      12:36:11  Also:   hudson.remoting.Channel$CallSiteStackTrace: Remote call to JNLP4-connect connection from x.x.x.3/x.x.x.3:49064
      12:36:11   at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1788)
      12:36:11   at hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:356)
      12:36:11   at hudson.remoting.Channel.call(Channel.java:998)
      12:36:11   at hudson.FilePath.act(FilePath.java:1069)
      12:36:11   at hudson.FilePath.act(FilePath.java:1058)
      12:36:11   at hudson.FilePath.installIfNecessaryFrom(FilePath.java:914)
      12:36:11   at hudson.FilePath.installIfNecessaryFrom(FilePath.java:850)
      12:36:11   at io.jenkins.plugins.adoptopenjdk.AdoptOpenJDKInstaller.performInstallation(AdoptOpenJDKInstaller.java:121)
      12:36:11   at hudson.tools.InstallerTranslator.getToolHome(InstallerTranslator.java:69)
      12:36:11   at hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:109)
      12:36:11   at hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:206)
      12:36:11   at hudson.model.JDK.forNode(JDK.java:148)
      12:36:11   at hudson.model.JDK.forNode(JDK.java:60)
      12:36:11   at org.jenkinsci.plugins.workflow.steps.ToolStep$Execution.run(ToolStep.java:152)
      12:36:11   at org.jenkinsci.plugins.workflow.steps.ToolStep$Execution.run(ToolStep.java:133)
      12:36:11   at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
      12:36:11   at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      12:36:11   at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      12:36:11   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      12:36:11   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      12:36:11  java.io.FileNotFoundException: /var/jenkins_home/caches/adoptopenjdk/LINUX/amd64/jdk8u242-b08.zip (No such file or directory)
      12:36:11   at java.io.FileInputStream.open0(Native Method)
      12:36:11   at java.io.FileInputStream.open(FileInputStream.java:195)
      12:36:11   at java.io.FileInputStream.<init>(FileInputStream.java:138)
      12:36:11   at java.io.FileInputStream.<init>(FileInputStream.java:93)
      12:36:11   at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:90)
      12:36:11   at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:188)
      12:36:11   at java.net.URL.openStream(URL.java:1068)
      12:36:11   at hudson.FilePath$Unpack.invoke(FilePath.java:948)
      12:36:11   at hudson.FilePath$Unpack.invoke(FilePath.java:942)
      12:36:11   at hudson.FilePath$FileCallableWrapper.call(FilePath.java:3069)
      12:36:11   at hudson.remoting.UserRequest.perform(UserRequest.java:211)
      12:36:11   at hudson.remoting.UserRequest.perform(UserRequest.java:54)
      12:36:11   at hudson.remoting.Request$2.run(Request.java:369)
      12:36:11   at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
      12:36:11   at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      12:36:11   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      12:36:11   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      12:36:11   at hudson.remoting.Engine$1.lambda$newThread$0(Engine.java:117)
      12:36:11   at java.lang.Thread.run(Thread.java:748)

      I do not think it is worth trying to find the file in the cache on the agent - it should just use the masters cache, or at least not put the exception stack trace in the build logs

       

            mmchr Mads Mohr Christensen
            teilo James Nord
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: