[JIRA] (JENKINS-61913) build log spammed for expected behaviour when agent does not have install cached

7 views
Skip to first unread message

jnord@cloudbees.com (JIRA)

unread,
Apr 15, 2020, 7:49:03 AM4/15/20
to jenkinsc...@googlegroups.com
James Nord created an issue
 
Jenkins / Bug JENKINS-61913
build log spammed for expected behaviour when agent does not have install cached
Issue Type: Bug Bug
Assignee: Mads Mohr Christensen
Components: adoptopenjdk-plugin
Created: 2020-04-15 11:48
Priority: Minor Minor
Reporter: James Nord

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-8u24212:36:11  Installing AdoptOpenJDK to /home/jenkins/agent/tools/hudson.model.JDK/jdk-8u24212:36:11  ERROR: Failed to download file:/var/jenkins_home/caches/adoptopenjdk/LINUX/amd64/jdk8u242-b08.zip from agent; will retry from master12:36:11  Also:   hudson.remoting.Channel$CallSiteStackTrace: Remote call to JNLP4-connect connection from x.x.x.3/x.x.x.3:4906412: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

 

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.12#713012-sha1:6e07c38)
Atlassian logo

jnord@cloudbees.com (JIRA)

unread,
Apr 15, 2020, 1:49:03 PM4/15/20
to jenkinsc...@googlegroups.com

jnord@cloudbees.com (JIRA)

unread,
Apr 16, 2020, 6:25:04 AM4/16/20
to jenkinsc...@googlegroups.com
James Nord updated an issue
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


{noformat}
12:36:11  Installing AdoptOpenJDK to /home/jenkins/agent/tools/hudson.model.JDK/jdk-
8u24212 8u242
12
:36:11  Installing AdoptOpenJDK to /home/jenkins/agent/tools/hudson.model.JDK/jdk- 8u24212 8u242
12
:36:11  ERROR: Failed to download file:/var/jenkins_home/caches/adoptopenjdk/LINUX/amd64/jdk8u242-b08.zip from agent; will retry from master12 master
12
:36:11  Also:   hudson.remoting.Channel$CallSiteStackTrace: Remote call to JNLP4-connect connection from x.x.x.3/x.x.x.3: 4906412 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)
{noformat}

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

 
Reply all
Reply to author
Forward
0 new messages