Arek
Arek

Reputation: 2031

Jenkins CI - java.exe child process hangs after job is done

I have following problem: on my Jenkins 1.438 I have job with maven 3 application. When I run it, sometimes after build is completed successfully Jenkins child process - java.exe - still hangs in the system. It also holds a handle to POM file and when I run my job again i get error that POM file cannot be deleted and build fails. Does anyone know how to fix this? Jenkins runs on Windows Server 2008

Upvotes: 0

Views: 1007

Answers (1)

gyorgyabraham
gyorgyabraham

Reputation: 2608

We experienced the same problem with Jenkins (on a Linux server).

I'm not sure if you can achieve this with Powershell in Windows server (or use windows-port of bash etc), but for example we start and stop our builds in Jenkins with seperated starter and stopper shell scripts. The point: start script saves the PID of the java process being started into a text file, and the stop script reads it and kills after a given amount of time.

Upvotes: 1

Related Questions