I have run into a similar problem with Jenkins v2.204.2 and EC2 plugin v1.49.1. In our case the master was actually overloaded by the misdirected job, and the Jenkins process was killed by the OOM-killer. One symptom I found was that the Jenkins log lines that normally log the connection attempt from the EC2 plugin to the newly created worker missed the IP address, printing "null" instead: Regular log entry:
2020-03-10 04:47:57.202+0000 [id=797295] INFO hudson.plugins.ec2.EC2Cloud#log: Connecting to 172.31.26.224 on port 22, with timeout 10000.
Bad log line (only 2 instances in several weeks, immediately before the failure):
2020-03-10 04:47:57.113+0000 [id=797326] INFO hudson.plugins.ec2.EC2Cloud#log: Connecting to null on port 22, with timeout 10000.
Observe the "null" instead of a valid IP address. |