16

Jenkins build fails with Cannot contact XXXXXXXXXXXX: java.lang.InterruptedException

from time to time. it doesn't matter if it is a spot instance or an on-demand instance

Jenkins ver. 2.60.3 
Amazon EC2 plugin 1.36
1
  • They already shared the ssh-keys Commented Sep 15, 2017 at 9:43

4 Answers 4

16

I monitored the slave stats and figured out that the slave was under heavy load like 1200. The slaves build a lot of docker images. The load was due to the fact that the save was I/O bound. The docker volume /var/lib/docker and workspace were EBS and EFS mounts respectively. Upgrading the linux kernel and changing the docker volume to Overlay2 solved the issue.

Sign up to request clarification or add additional context in comments.

Comments

5

In my case after the error described above in the pipeline, I checked the specific node console log and it appeared the following error:

java.util.concurrent.TimeoutException: Ping started on XXXX hasn't completed at XXX

Probably the jenkins slave was corrupted. Just rebooting the slave solved the problem as it is explained in this jenkins issue

Comments

0

In my case :

I disconnected or detached the slave from master and attached or connected it with the master resolved the issue.

Hope it helps someone.

Comments

0

enter image description here

My jenkins-slave is in AWS, so I just rebooted the instance and then it started working, this error is definitely resources-related. A long term solution would be adding more resources (bigger instance size) or refactoring the Jenkins pipeline to use less memory/cpu

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.