KB Article #177013
messagePurgeTool hanging "Clearing Table: alerts"
Problem
-- the execution of messagePurgeTool hangs when using the options -deleteAll or -deleteAllSkipFiles
> messagePurgeTool.cmd -deleteAllSkipFiles
2015-03-12 11:03:30,163 - INFO [Startup] (JpaPropertiesAdapter.<init>:87) - Database: driver=com.mysql.jdbc.Driver, host=axwaydemo, port=3306, name=AxwayInterchange, user=Interchange
2015-03-12 11:03:33,180 - INFO [Startup] (Crossworks.initializeFIPsSecurityProviders:468) - Running in FIPs mode
2015-03-12 11:03:33,683 - INFO [Startup] (PluginManager.getInstance:32) - Starting the Plugin Manager
2015-03-12 11:03:58,206 - INFO [Startup] (AxwayBoneCPConnectionHook.<init>:45) - Axway BoneCP Connection Pool Hook initialized with extra termination state codes: [08006]
2015-03-12 11:03:59,199 - INFO [Startup] (DeleteAllMessages.truncateTable:137) - Clearing Table: PipInstances
2015-03-12 11:03:59,302 - INFO [Startup] (DeleteAllMessages.truncateTable:184) - Completed clearing table: PipInstances
2015-03-12 11:03:59,303 - INFO [Startup] (DeleteAllMessages.truncateTable:137) - Clearing Table: alerts
- the alert table is empty, and I don't have that many data in database (less than lines in the table messages)
- the TE was stopped when the MessagePurge was executed
Resolution
* reason : the problem is caused by a metadata lock at a JDBC level
* occurs only on MySql 5.6 and higher (a metadata locking mechanism has been added on tables when a select is done outside a transaction)
* solution : the entire cluster has to be stopped - all the nodes in the cluster (including the CN node) have to be stopped when running the tool
* Interchange documentation will be improved in 5.12.0 SP3 accordingly