Built-in database schema on disk is older than required for upgrade

2 minute readTroubleshooting

Description

During an upgrade, the installer displays the following error prompt:

CloudBees CD/RO is configured to use the built-in database. The built-in database on disk has a schema intended for CloudBees CD/RO version <version>, which is older than that needed by this CloudBees CD/RO <version> server. CloudBees CD/RO does not support version upgrades of the built-in database, so the CloudBees CD/RO server cannot start. For options to resolve this issue, see the "Troubleshooting" chapter of the "CloudBees CD/RO Installation Guide"

This problem occurs because starting with CloudBees CD/RO version 8.0, CloudBees does not support upgrades from CloudBees CD/RO versions that use HSQLDB. HSQLDB is the built-in (default) database that was replaced by MariaDB in CloudBees CD/RO version 8.3 as the built-in database.

Workarounds

Because the HSQLDB database in CloudBees CD/RO is not upgradeable, to work around this issue, you can either point to a supported database, wipe the database (if you do not need its contents), or migrate the database contents to a database supported by CloudBees CD/RO.

Pointing to a supported database

To point to a different CloudBees CD/RO-supported database, modify the database.properties file to point to that database.

Wiping the database contents

If you do not need the contents of the built-in database, complete the following steps:

  1. Back up the database.

    For details, refer to Back up a CloudBees CD/RO server.

  2. Delete the files and folders whose names match the pattern:

    <DATA_DIR>/builtin/commander.*

Migrating the database contents to a supported database

If you do need the contents of the built-in database, complete the following steps:

  • Back up your <DATA_DIR>\builtin folder and your <DATA_DIR>\conf\database.properties, passkey, and keystore files (or simply back up the entire <DATA_DIR>\conf folder).

  • Reinstall the prior CloudBees CD/RO version by using the following substeps:

    1. Uninstall the newer instance that is not working.

    2. Install the prior version again, which uses a new built-in database by default.

      If you installed the CloudBees Analytics server on the same system, you must use a different <INSTALL_DIR> and <DATA_DIR> for this CloudBees CD/RO server installation.
    3. After the CommanderServer service starts (meaning that the plugins are installed and so on) and you can log into the installed version from substep b, stop the CommanderServer service.

    4. Back up the new <DATA_DIR>\builtin and <DATA_DIR>\conf folders and replace them with the folders that you backed up in step 1.

    5. Restart the new CommanderServer service. It should now use the original built-in database containing your data and should function properly.

  • Do a full export of the database contents.

  • Switch to another production-quality database that CloudBees CD/RO supports.

  • Do a full import of your data to the new database.

  • Re-upgrade CloudBees CD/RO.