Contents
NEW - 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 to start. When this happens, following entries are logged to the logfile:
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 db locks
- Release db 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 (but works on Linux too):
- List db locks
- Release db locks
java -jar iwd_history.jar -host CFG_SRV_HOST -port CFG_SRV_PORT -app HN_APP db locks --list
java -jar iwd_history.jar -host CFG_SRV_HOST -port CFG_SRV_PORT -app HN_APP db locks --force-release
Migrating GTL History Events
You can migrate GTL history events from the Event Log database to the History Node database by History Node's builtin mechanism, which can be run with following command:
- On Linux:
./iwd_history.sh -host CFG_SRV_HOST -port CFG_SRV_PORT -app HN_APP events-migrate
- On Windows (but works on Linux too):
java -jar iwd_history.jar -host CFG_SRV_HOST -port CFG_SRV_PORT -app HN_APP events-migrate
In order to use events migration mechanism, History Node application must be properly configured. Mechanism itself is configured in event-log-migration section of the yaml configuration file.
