| Hi, I’m coming back to you, as I was able to “fix” the issue. Maybe this is something that this plugin could fix or prevent, or maybe it’s not related at all, but at least should someone encounter the same issue, you know how I was able to find a way around the problem. During my research, I stumbled on issue JENKINS-54326 that describes a problem about builds failing with a stack trace saying that it could not find a jar file (/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.181-3.b13.el7_5.x86_64/jre/lib/resources.jar). This is one of the uses cases I had too when the build didn’t fail during checkout, but just after running tests where it used again JUnit to build reports. I asked if meanwhile somebody figured out a solution, and luckily for me, Andrey Nudko answered very quickly, mentioning something very interesting and which could make a lot of sense, where “a” cloud-init script was sneakily upgrading some JDK in the background after the agent process was launched, messing all things up. This got me thinking, as this would indeed explain why some of my builds passed, some failed in the very beginning and some somewhere in the middle or the end when doing some java executions … And especially without changing anything to my Jenkins configuration (upgrades etc). That said, I have (and still don’t have) no clue about which cloud-init script this is and from where it comes?! Especially because in my case, my AMI was pre-installed with a JDK. But it all made sense, so I did 2 things that completely fixed my problem: 1. Updated my AMI by removing the pre-installed JDK 2. Edited the Jenkins cloud configuration and added ‘sudo yum -y update’ in the “Init script” section. Now when the slave server starts, it performs an upgrade of the currently installed libraries and the master Jenkins installs the corresponding JDK on the slave. Although it’s still not 100% clear to me what was the problem, this did solve it. I’m all ears with a more detailed explanation or if by any luck this plugin can solve (or document) this behavior?! Cheers |