Hey James,

I had the same issue without understanding what happened. Meanwhile I also 
understand that it's due to the automatic updates kicking in. I solved it 
by removing the JDK from that AMI and let the master install it. 

You could also update your AMI and not allow auto upgrades, or you could 
add in the "init-script" of the cloud configuration in jenkins master to 
perform an upgrade. From what I see in the code (
it should wait for the upgrade to be finished.

Hope this helps


On Tuesday, September 3, 2019 at 10:26:38 AM UTC+2, James Green wrote:
> So our builds failed again yesterday due to this automatic update kicking 
> in. I checked, there was indeed a JDK security update so no complaints, but 
> I need a better system of updating Jenkins.
> Given Packer can search for and filter down AMIs, I thought the EC2 plugin 
> should be able to, too. Solves our issue. Ticket if anyone is interested: 
> https://issues.jenkins-ci.org/browse/JENKINS-59180
> On Thu, 29 Aug 2019 at 10:17, James Green <james....@gmail.com 
> <javascript:>> wrote:
>> I finally used Packer to build an AMI based on Amazon Linux 2 to act as 
>> as agent. Yesterday, the builds began failing with a Java stack trace.
>> Turns out the EC2 instance starts, and in parallel the Jenkins agent 
>> begins and an auto-upgrade of openjdk kicked off. Further instructions 
>> failed. Rebuild the AMI and the new agent worked a treat.
>> Is there a way of avoiding this problem by preventing Jenkins from 
>> launching the agent until the boot steps are complete? I cannot be the 
>> first to encounter this issue :-)
>> Thanks,
>> James

You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 

Reply via email to