Note: This article refers specifically to the built-in database shipped with CloudBees CD (CloudBees Flow).
Using the built-in database supplied by CloudBees CD (CloudBees Flow) exposed some obscure scenarios that you may require some workarounds:
- CloudBees CD (CloudBees Flow) takes an unexpectedly long time to start up
- Your CloudBees CD (CloudBees Flow) instance has jobs that never end
- You cannot delete some jobs from the CloudBees CD (CloudBees Flow) UI
- CloudBees CD (CloudBees Flow) is unable to export your projects because of these same jobs
Below is a description of how to access the built-in database directly, for example, how to remove a job you cannot kill through the Commander UI.
Stop ElectricCommander. (If it’s still running, the databse lock will prevent you from accessing it.)
Go to to the Commander installation directory and start the database web UI console:
jre/bin/java -jar server/lib/h2.jar -web -webAllowOthers
-web: launch the database’s web UI console
-webAllowOthers: allow access to the database’s web UI console from remote hosts
Type http://:8082 in the browser address bar to access the built-in database’s web UI console.
Use the following parameters when asked to log in:
Driver class: org.h2.Driver
JDBC URL: jdbc:h2:builtin/commander
- Click Connect. The interface that appears in your browser allows you to look at the tables and/or create SQL statements.
Example: To kill a job with ID ‘550558’ run the following commands:
update ec_job_step set status = 'completed' where job_id = 55058; delete from ec_resource_usage where job_id = 55058; update ec_resource set job_id = null where job_id = 55058;
- Before restarting ElectricCommander, stop the database’s web UI console by pressing in the terminal.
Note: Some database tips (http://www.h2database.com/html/tutorial.html) that may be useful.