Revision as of 13:47, June 21, 2017 by Peter Chaplin (talk | contribs) (Replace string operation)
Jump to: navigation, search

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:

  1. On linux:
  2. ./iwd_history.sh -host CFG_SRV_HOST -port CFG_SRV_PORT -app HN_APP db migrate
    
  3. On Windows (but works on Linux too):
  4. 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
  1. List db locks
  2. ./iwd_history.sh -host CFG_SRV_HOST -port CFG_SRV_PORT -app HN_APP db locks --list
    
  3. Release db locks
  4. ./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):
  1. List db locks
  2. java -jar iwd_history.jar -host CFG_SRV_HOST -port CFG_SRV_PORT -app HN_APP db locks --list
    
  3. Release db locks
  4. 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.

Warning
When events migration is in process, either no History Node application should be running, or any of the running History Node applications mustn't have history events removal enabled (stop-processing option set to remove)
Comments or questions about this documentation? Contact us for support!