周末过后,我发现我的詹金斯磨损了一些。 EC2 插件似乎在与 Spot 实例有关的事情上失败了。
我将 EC2 插件与 Spot 实例一起用于代理,这已经运行了很长时间。
我尝试删除该插件,Jenkins 加载没有问题。
我尝试删除插件并重新安装它,但重新启动时会出现同样的问题。 我尝试回滚到旧版本的插件 (2.0.6),但遇到了同样的问题。
尝试将管理员 IAM 权限添加到节点角色,但这也没有什么区别。
有点不知所措。
Jenkins 正在运行最新的 LTS 容器,显示为 Jenkins 2.414.1
2023-09-18 11:33:25.098+0000 [id=30] INFO jenkins.InitReactorRunner$1#onAttained: Augmented all extensions
2023-09-18 11:33:25.592+0000 [id=30] SEVERE jenkins.InitReactorRunner$1#onTaskFailed: Failed Loading global config
java.lang.NullPointerException
at hudson.plugins.ec2.EC2SpotSlave.getSpotRequest(EC2SpotSlave.java:137)
at hudson.plugins.ec2.EC2SpotSlave.getInstanceId(EC2SpotSlave.java:179)
at hudson.plugins.ec2.EC2Computer.getInstanceId(EC2Computer.java:69)
at hudson.plugins.ec2.EC2Computer.getState(EC2Computer.java:187)
at hudson.plugins.ec2.EC2RetentionStrategy.start(EC2RetentionStrategy.java:279)
at hudson.plugins.ec2.EC2RetentionStrategy.start(EC2RetentionStrategy.java:53)
at hudson.model.AbstractCIBase.createNewComputerForNode(AbstractCIBase.java:192)
at hudson.model.AbstractCIBase.updateComputer(AbstractCIBase.java:153)
at hudson.model.AbstractCIBase$1.run(AbstractCIBase.java:255)
at hudson.model.Queue._withLock(Queue.java:1397)
at hudson.model.Queue.withLock(Queue.java:1271)
at hudson.model.AbstractCIBase.updateComputerList(AbstractCIBase.java:238)
at jenkins.model.Jenkins.updateComputerList(Jenkins.java:1693)
at jenkins.model.Nodes$6.run(Nodes.java:351)
at hudson.model.Queue._withLock(Queue.java:1397)
at hudson.model.Queue.withLock(Queue.java:1271)
at jenkins.model.Nodes.load(Nodes.java:346)
at jenkins.model.Jenkins$12.run(Jenkins.java:3453)
at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:177)
at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:305)
at jenkins.model.Jenkins$5.runTask(Jenkins.java:1166)
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:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
2023-09-18 11:33:25.597+0000 [id=22] SEVERE hudson.util.BootFailure#publish: Failed to initialize Jenkins
java.lang.NullPointerException
at hudson.plugins.ec2.EC2SpotSlave.getSpotRequest(EC2SpotSlave.java:137)
at hudson.plugins.ec2.EC2SpotSlave.getInstanceId(EC2SpotSlave.java:179)
at hudson.plugins.ec2.EC2Computer.getInstanceId(EC2Computer.java:69)
at hudson.plugins.ec2.EC2Computer.getState(EC2Computer.java:187)
at hudson.plugins.ec2.EC2RetentionStrategy.start(EC2RetentionStrategy.java:279)
at hudson.plugins.ec2.EC2RetentionStrategy.start(EC2RetentionStrategy.java:53)
at hudson.model.AbstractCIBase.createNewComputerForNode(AbstractCIBase.java:192)
at hudson.model.AbstractCIBase.updateComputer(AbstractCIBase.java:153)
at hudson.model.AbstractCIBase$1.run(AbstractCIBase.java:255)
at hudson.model.Queue._withLock(Queue.java:1397)
at hudson.model.Queue.withLock(Queue.java:1271)
at hudson.model.AbstractCIBase.updateComputerList(AbstractCIBase.java:238)
at jenkins.model.Jenkins.updateComputerList(Jenkins.java:1693)
at jenkins.model.Nodes$6.run(Nodes.java:351)
at hudson.model.Queue._withLock(Queue.java:1397)
at hudson.model.Queue.withLock(Queue.java:1271)
at jenkins.model.Nodes.load(Nodes.java:346)
at jenkins.model.Jenkins$12.run(Jenkins.java:3453)
at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:177)
at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:305)
at jenkins.model.Jenkins$5.runTask(Jenkins.java:1166)
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:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
Caused: org.jvnet.hudson.reactor.ReactorException
at org.jvnet.hudson.reactor.Reactor.execute(Reactor.java:290)
at jenkins.InitReactorRunner.run(InitReactorRunner.java:49)
at jenkins.model.Jenkins.executeReactor(Jenkins.java:1201)
at jenkins.model.Jenkins.<init>(Jenkins.java:989)
at hudson.model.Hudson.<init>(Hudson.java:86)
at hudson.model.Hudson.<init>(Hudson.java:82)
at hudson.WebAppMain$3.run(WebAppMain.java:247)
Caused: hudson.util.HudsonFailedToLoad
at hudson.WebAppMain$3.run(WebAppMain.java:264)
2023-09-18 11:33:25.611+0000 [id=22] INFO hudson.lifecycle.Lifecycle#onStatusUpdate: Stopping Jenkins
清除
/var/jenkins_home/nodes
就成功了。
甚至不知道它的存在。
(旁注,由于重大更改,我还必须更新适用于 EC2 的 JCasC https://github.com/jenkinsci/ec2-plugin/releases/tag/1628.v6d7b_fc58b_a_1d)