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

JUnit fails on remote node after upgrading to 1.26.1

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • junit-plugin
    • None
    • Jenkins 2.149

      After upgrading the JUnit plugin from 1.25 to 1.26.1 it build fail on remote nodes.

      Error when executing always post condition: java.io.IOException: Remote call on build-php71 failed at hudson.remoting.Channel.call(Channel.java:961) at hudson.FilePath.act(FilePath.java:1070) at hudson.FilePath.act(FilePath.java:1059) at hudson.tasks.junit.JUnitParser.parseResult(JUnitParser.java:114) at hudson.tasks.junit.JUnitResultArchiver.parse(JUnitResultArchiver.java:137) at hudson.tasks.junit.JUnitResultArchiver.parseAndAttach(JUnitResultArchiver.java:167) at hudson.tasks.junit.pipeline.JUnitResultsStepExecution.run(JUnitResultsStepExecution.java:50) at hudson.tasks.junit.pipeline.JUnitResultsStepExecution.run(JUnitResultsStepExecution.java:23) at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1$1.call(SynchronousNonBlockingStepExecution.java:50) at hudson.security.ACL.impersonate(ACL.java:290) at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1.run(SynchronousNonBlockingStepExecution.java:47) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) 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) Caused by: java.lang.InternalError: java.io.FileNotFoundException: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.181-3.b13.el7_5.x86_64/jre/lib/resources.jar at sun.misc.URLClassPath$JarLoader.getResource(URLClassPath.java:1040) at sun.misc.URLClassPath.getResource(URLClassPath.java:239) at sun.misc.URLClassPath.getResource(URLClassPath.java:292) at java.lang.ClassLoader.getBootstrapResource(ClassLoader.java:1264) at java.lang.ClassLoader.getResource(ClassLoader.java:1093) at java.net.URLClassLoader.getResourceAsStream(URLClassLoader.java:232) at java.util.ResourceBundle$RBClassLoader.getResourceAsStream(ResourceBundle.java:524) at java.util.ResourceBundle$Control$1.run(ResourceBundle.java:2686) at java.util.ResourceBundle$Control$1.run(ResourceBundle.java:2671) at java.security.AccessController.doPrivileged(Native Method) at java.util.ResourceBundle$Control.newBundle(ResourceBundle.java:2670) at java.util.ResourceBundle.loadBundle(ResourceBundle.java:1510) at java.util.ResourceBundle.findBundle(ResourceBundle.java:1474) at java.util.ResourceBundle.findBundle(ResourceBundle.java:1428) at java.util.ResourceBundle.findBundle(ResourceBundle.java:1428) at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1370) at java.util.ResourceBundle.getBundle(ResourceBundle.java:854) at com.sun.org.apache.xerces.internal.utils.SecuritySupport$7.run(SecuritySupport.java:169) at com.sun.org.apache.xerces.internal.utils.SecuritySupport$7.run(SecuritySupport.java:166) at java.security.AccessController.doPrivileged(Native Method) at com.sun.org.apache.xerces.internal.utils.SecuritySupport.getResourceBundle(SecuritySupport.java:166) at com.sun.org.apache.xerces.internal.util.SAXMessageFormatter.formatMessage(SAXMessageFormatter.java:58) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.getProperty(AbstractSAXParser.java:2063) at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.setProperty(SAXParserImpl.java:574) at org.dom4j.io.SAXHelper.setParserProperty(SAXHelper.java:34) at org.dom4j.io.SAXReader.configureReader(SAXReader.java:911) at org.dom4j.io.SAXReader.read(SAXReader.java:463) at org.dom4j.io.SAXReader.read(SAXReader.java:343) at hudson.tasks.junit.SuiteResult.parse(SuiteResult.java:178) at hudson.tasks.junit.TestResult.parse(TestResult.java:348) at hudson.tasks.junit.TestResult.parsePossiblyEmpty(TestResult.java:281) at hudson.tasks.junit.TestResult.parse(TestResult.java:206) at hudson.tasks.junit.TestResult.parse(TestResult.java:178) at hudson.tasks.junit.TestResult.<init>(TestResult.java:143) at hudson.tasks.junit.JUnitParser$ParseResultCallable.invoke(JUnitParser.java:146) at hudson.tasks.junit.JUnitParser$ParseResultCallable.invoke(JUnitParser.java:118) at hudson.FilePath$FileCallableWrapper.call(FilePath.java:3084) 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) ... 4 more Suppressed: hudson.remoting.Channel$CallSiteStackTrace: Remote call to build-php71 at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1741) at hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:357) at hudson.remoting.Channel.call(Channel.java:955) at hudson.FilePath.act(FilePath.java:1070) at hudson.FilePath.act(FilePath.java:1059) at hudson.tasks.junit.JUnitParser.parseResult(JUnitParser.java:114) at hudson.tasks.junit.JUnitResultArchiver.parse(JUnitResultArchiver.java:137) at hudson.tasks.junit.JUnitResultArchiver.parseAndAttach(JUnitResultArchiver.java:167) at hudson.tasks.junit.pipeline.JUnitResultsStepExecution.run(JUnitResultsStepExecution.java:50) at hudson.tasks.junit.pipeline.JUnitResultsStepExecution.run(JUnitResultsStepExecution.java:23) at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1$1.call(SynchronousNonBlockingStepExecution.java:50) at hudson.security.ACL.impersonate(ACL.java:290) at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1.run(SynchronousNonBlockingStepExecution.java:47) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ... 4 more Caused by: java.io.FileNotFoundException: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.181-3.b13.el7_5.x86_64/jre/lib/resources.jar at sun.misc.URLClassPath$JarLoader.getJarFile(URLClassPath.java:928) at sun.misc.URLClassPath$JarLoader.access$800(URLClassPath.java:791) at sun.misc.URLClassPath$JarLoader$1.run(URLClassPath.java:876) at sun.misc.URLClassPath$JarLoader$1.run(URLClassPath.java:869) at java.security.AccessController.doPrivileged(Native Method) at sun.misc.URLClassPath$JarLoader.ensureOpen(URLClassPath.java:868) at sun.misc.URLClassPath$JarLoader.getResource(URLClassPath.java:1038) ... 44 more

       

      Downgrading to 1.25 fixes the problem, but re-introduces the CSRF security vulnerability.

          [JENKINS-54326] JUnit fails on remote node after upgrading to 1.26.1

          For what it's worth, JUnit works fine on the master on the same job with JUnit 1.26.1. It only fails on the remote nodes.

          Nick Le Mouton added a comment - For what it's worth, JUnit works fine on the master on the same job with JUnit 1.26.1. It only fails on the remote nodes.

          I have the same problem on my agents running on Linux in EC2, but not on local Linux agents (for whatever reason). We don't run builds on the master.

          Downgrading (to 1.24 in our case) fixed it.

          Christopher Orr added a comment - I have the same problem on my agents running on Linux in EC2, but not on local Linux agents (for whatever reason). We don't run builds on the master. Downgrading (to 1.24 in our case) fixed it.

          Hey guys,

          I'm also facing this issue (sometimes) ... are you still staying on version 1.24 ? Or the problem fixed itself with latest versions?

          Toni Van de Voorde added a comment - Hey guys, I'm also facing this issue (sometimes) ... are you still staying on version 1.24 ? Or the problem fixed itself with latest versions?

          Andrey Nudko added a comment -

          We had similar problem in EC2, and that was happening with both 1.28 and 1.24.

          In our case the issue was that cloud-init script was sneakily upgrading JDK in the background after agent process was launched. So agent was launched using one java installation, which is then being deleted during upgrade - and now all system jars are unavailable. A quick workaround was to add some `yum install` as node init script - that delays agent startup until update finished. We're looking to change our ami-s to avoid auto-upgrade on launch as a proper solution.

          Andrey Nudko added a comment - We had similar problem in EC2, and that was happening with both 1.28 and 1.24. In our case the issue was that cloud-init script was sneakily upgrading JDK in the background after agent process was launched. So agent was launched using one java installation, which is then being deleted during upgrade - and now all system jars are unavailable. A quick workaround was to add some `yum install` as node init script - that delays agent startup until update finished. We're looking to change our ami-s to avoid auto-upgrade on launch as a proper solution.

          andreynudko The thing is, our ami contains a java installation ... and we never had the issue before. Now I do also have another issue currently going on, so I'm not sure if there are related ... (cf https://issues.jenkins-ci.org/browse/JENKINS-59137?page=com.atlassian.jira.plugin.system.issuetabpanels%3Aall-tabpanel)

          Currently trying something out with your comment and see if it changes anything ...

          Toni Van de Voorde added a comment - andreynudko The thing is, our ami contains a java installation ... and we never had the issue before. Now I do also have another issue currently going on, so I'm not sure if there are related ... (cf https://issues.jenkins-ci.org/browse/JENKINS-59137?page=com.atlassian.jira.plugin.system.issuetabpanels%3Aall-tabpanel ) Currently trying something out with your comment and see if it changes anything ...

          andreynudko I was able to fix it by removing my pre-installed JDK from my AMI and add ‘sudo yum -y update’ in the “Init script” section in the Jenkins master settings. Thanks

          Toni Van de Voorde added a comment - andreynudko I was able to fix it by removing my pre-installed JDK from my AMI and add ‘sudo yum -y update’ in the “Init script” section in the Jenkins master settings. Thanks

            Unassigned Unassigned
            noodlesnz Nick Le Mouton
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: