KBEC-00295 – Cleaning up un-abortable jobs

 

There is a known issue where aborting a job through the UI or the command line does not abort the job. It is rarely seen by most customers, but for those customers that see this issue we have a plugin utility, CleanupStalledJob available on our github site, to assist with cleaning up these jobs.

https://github.com/electriccommunity/electriccommander/tree/master/CleanupStalledJob

Note: For Java version 8 and higher, please use the CleanupStalledJob-jar-with-dependencies_ver6.jar

In pre-5.x versions, this utility works by using the jobId to identify the job to be cleaned. In 5.x and after, the UUID needs to be used to clean the jobs. Follow the steps here to find the UUID for your selected job:

  1. In the Flow/Commander UI, click on the "Jobs" tab and locate the Job for which you want to run the CleanupStalledJob utility.

In the below screenshot the job is “build2_OnelPlatform":

  1. Click on the Job you are interested in to get the UUID of the job on the browsers address bar. In my case the UUID for my job is "de9547fe-a596-11e4-9e3b-080027a41600"

Now I can run the utility as:

vagrant@commander53:/tmp$ /opt/electriccloud/electriccommander/jre/bin/java -jar /vagrant/CleanupStalledJob-jar-with-dependencies.jar --database-properties /opt/electriccloud/electriccommander/conf/database.properties --passkey /opt/electriccloud/electriccommander/conf/passkey --jobId "de9547fe-a596-11e4-9e3b-080027a41600 --output jobid123"

In the “cleanupStalledJob.log” in the directory where you ran the CleanupStalledJob you should see the below lines indicating that CleanupStalledJob was able to find the job:

 

 

Microsoft SQL Server with integrated authentication

If you are using SQL Server with integrated security, you will need sqljdbc_auth.dll in the java library path to run this utility. You will also need to run the jar as a user that has full access permissions to the database. You can download this dll as part of the SQL Server JDBC driver here. To use the Java installed with Flow, place this dll in <install_dir>\jre\bin before running the CleanupStalledJob jar.

Have more questions? Submit a request

Comments

Powered by Zendesk