Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jenkins Build Never Finishing

I have a Jenkins master/slave set up which has been working quite happily, running Oracle imports on some Linux boxes.

I have just added a new slave node and tried to run our existing database import job on this new node. This job consists of three subprojects; the first one runs some execute shells, copying files and changing permissions and this currently completes successfully, the second runs an execute shell which ends with an Oracle impdp. The impdp completes (the db exists and ps -ef no longer shows impdp running) but the Jenkins subproject never finishes. The UI just sits there with the clock whirring around.

I've tried adding an echo after the impdp, and this also executes correctly, but the subproject still never finishes.

If I add a Post-Build email notification, it is not sent.

The third subproject is never reached.

What could be the cause of this and how do I debug what is happening?

like image 818
matt freake Avatar asked Jan 12 '23 11:01

matt freake


1 Answers

In our case, the jobs would declare "Finished: SUCCESS", but then continue with some unknown Jenkins business for another 10 or 20 minutes. After putting on more detailed logging, we found it was related to the ill-named LogRotator.

We have thousands of old builds and are deleting the artifacts for those older than a certain number of days. Because of the way old builds are handled, Jenkins searches the entire list of old builds even though they have already had their artifacts removed.

There is issue that is now fixed related to this: https://issues.jenkins-ci.org/browse/JENKINS-22607

As of right now I do not see it in a release, but if you have this issue, the temporary workaround is to turn off the deletion.

like image 63
peater Avatar answered Jan 22 '23 15:01

peater