Contents
iWD History Node Migration Information
Automatic Database Schema Migration
You can configure iWD History Node to automatically migrate database schema at startup. To do this set the value of Configuration Server option [iWD]/migrate-schema to true. The default value is false.
Beside the automatic schema update, you can also migrate the schema using the command-line thus:
- On linux:
- On Windows (but works on Linux too):
./iwd_history.sh -host CFG_SRV_HOST -port CFG_SRV_PORT -app HN_APP db migrate
java -jar iwd_history.jar -host CFG_SRV_HOST -port CFG_SRV_PORT -app HN_APP db migrate
Troubleshooting
Schema migration can sometimes get stuck in a loop that prevents History Node starting. When this happens, the following entries are written to the log file:
INFO [2017-05-26 10:10:57,497] com.genesyslab.iwd.history.HistoryApplication: Running database schema migration INFO [2017-05-26 10:11:03,313] liquibase: Waiting for changelog lock.... INFO [2017-05-26 10:11:13,317] liquibase: Waiting for changelog lock.... ...
To correct this, after stopping History Node application, do the following:
- On Linux
- List any database locks.
- Release the database locks.
./iwd_history.sh -host CFG_SRV_HOST -port CFG_SRV_PORT -app HN_APP db locks --list
./iwd_history.sh -host CFG_SRV_HOST -port CFG_SRV_PORT -app HN_APP db locks --force-release
- On Windows:
- List any database locks.
- Release the database locks.</li
java -jar iwd_history.jar -host CFG_SRV_HOST -port CFG_SRV_PORT -app HN_APP db locks --force-release
java -jar iwd_history.jar -host CFG_SRV_HOST -port CFG_SRV_PORT -app HN_APP db locks --list
Migrating GTL History Events
You can migrate GTL history events from the Event Log database to the History Node database by using History Node's built-in mechanism, which can be run with the following command:
- On Linux:
./iwd_history.sh -host CFG_SRV_HOST -port CFG_SRV_PORT -app HN_APP events-migrate
- On Windows:
java -jar iwd_history.jar -host CFG_SRV_HOST -port CFG_SRV_PORT -app HN_APP events-migrate
In order to use the events migration mechanism, the History Node application must be properly configured. tHE Mechanism itself is configured in the [event-log-migration] section of the yaml configuration file.
- No History Node applications are running.
- If any History Node applications are running, they must have history events removal disabled (stop-processing option set to remove)
