Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jenkins build fails on slaves with java.lang.InterruptedException

Tags:

jenkins

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
like image 451
puneeth Avatar asked Sep 13 '17 14:09

puneeth


2 Answers

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.

like image 184
puneeth Avatar answered Oct 24 '22 05:10

puneeth


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

like image 37
Carlos Cavero Avatar answered Oct 24 '22 05:10

Carlos Cavero