-
Bug
-
Resolution: Fixed
-
Minor
-
-
1945.vec801d7e4139
EC2 plugin. version 1935.v9b_77210472b_1
After a instance restart, it fails to start if there are node descriptors related to EC agents in the folder /var/jenkins_home/nodes/ . If we delete the EC* files under that folder, the instance then starts.
Error Stacktrace:
java.lang.NullPointerException: Cannot invoke "String.equals(Object)" because the return value of "software.amazon.awssdk.awscore.exception.AwsErrorDetails.errorCode()" is null at PluginClassLoader for ec2//hudson.plugins.ec2.CloudHelper.getInstanceWithRetry(CloudHelper.java:31) at PluginClassLoader for ec2//hudson.plugins.ec2.EC2Computer.getState(EC2Computer.java:200) at PluginClassLoader for ec2//hudson.plugins.ec2.EC2RetentionStrategy.start(EC2RetentionStrategy.java:293) at PluginClassLoader for ec2//hudson.plugins.ec2.EC2RetentionStrategy.start(EC2RetentionStrategy.java:50) at hudson.model.AbstractCIBase.createNewComputerForNode(AbstractCIBase.java:193) at hudson.model.AbstractCIBase.updateComputer(AbstractCIBase.java:154) at hudson.model.AbstractCIBase.lambda$updateComputerList$2(AbstractCIBase.java:256) at hudson.model.Queue._withLock(Queue.java:1411) at hudson.model.Queue.withLock(Queue.java:1285) at hudson.model.AbstractCIBase.updateComputerList(AbstractCIBase.java:241) at jenkins.model.Jenkins.updateComputerList(Jenkins.java:1606) at jenkins.model.Nodes$4.run(Nodes.java:369) at hudson.model.Queue._withLock(Queue.java:1411) at hudson.model.Queue.withLock(Queue.java:1285) at jenkins.model.Nodes.load(Nodes.java:357) at jenkins.model.Jenkins$13.run(Jenkins.java:3486) at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:175) at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:304) at jenkins.model.Jenkins$5.runTask(Jenkins.java:1149) at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:221) at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:120) at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:68) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) at java.base/java.lang.Thread.run(Thread.java:840)
In the PR https://github.com/jenkinsci/ec2-plugin/commit/730b5c25bdae64f2a4a62a1514eb7d063930b50d#diff-5d820e85c2a8648dc84abbb11fd123e5cd15ec3c4b0069079ebf3bcc78c7333e in line 31, we can check that there was a change to use AWS SDK for Java 2.x. It is described in https://issues.jenkins.io/browse/JENKINS-73640. It was released in version 1885.v730b_5c25b_da_e
For any reason, the new code introduced to use the AWS SDK is raising an exception because the errorCode is null
- links to