KB Article #173709

Metrics database error found on trace during startup of API Gateway

Problem

Metrics database error found on trace during startup of API Gateway

FATAL 02/Jan/2014:14:04:20.763 [428176f0] Fatal error: Metrics storing could not be initialized. Metrics will not be stored.:
com.vordel.common.VordelException: Domain ID mismatch; check your database connection
at com.vordel.reporting.metricsmanagement.MetricsManager.configure(MetricsManager.java:162)
at com.vordel.reporting.rtm.RealtimeMonitoring.configure(RealtimeMonitoring.java:131)
at com.vordel.precipitate.SolutionPack.loadModules(SolutionPack.java:595)
at com.vordel.dwe.Service.refresh(Service.java:427)
at com.vordel.dwe.Service.<init>(Service.java:384)



Resolution

The database may have been used in another domain and can be fixed by re-initializing (this will delete existing data).
e.g.
dbsetup --dburl="jdbc:sqlserver://localhost:1433;integratedSecurity=false;databaseName=reports" --dbuser=vordel --dbpass=changeme --reinstall

Or if the old schema will be reused with existing data intact, then it is possible to correct the domain ID mismatch with the following change.

e.g.
UPDATE versions SET Value='5327b76a-f78a-4498-abd0-c5f5b83c66e2' WHERE Name='DomainID'

The correct domain id value to use can be found in your /apigateway/groups/topology.json file right at the top where it states "id".
Care must be taken to make sure two different topologies are not writing data to the same metricsDB. So, if the older data is of no concern it is advised to start with a fresh db.


Also: warning, do not try to merge data from two different metricsDB's together.