SRM Not Starting - Error Caused by: MySQLSyntaxErrorException : Duplicate column name 'isClusterEntity'

Document ID : KB000046554
Last Modified Date : 14/02/2018
Show Technical Document Details

Problem: 

Post upgrading Spectrum, Info view  fails to launch with the following error:

"SRM has not finished starting" 

 

Environment:  

Spectrum 10.x

 

Cause: 

This happens because SRM is failing to apply schema change to add the isClusterEntity column to the model table for cluster information.

The below error can be found in  $SPECROOT/tomcat/logs/stdout.log (or catalina.out) file:

Caused by: com.aprisma.spectrum.app.web.db.schemachange.SchemaChangeException: SQLException while running RuntimeSchemaChange1068 Schema Change Errorcode: 1060
at com.aprisma.spectrum.app.repmgr.dc.db.changes.RuntimeSchemaChange1068.doSchemaChange(Unknown Source)
at com.aprisma.spectrum.app.web.db.schemachange.RuntimeStatementSchemaChange.doSchemaChange(RuntimeStatementSchemaChange.java:73)
at com.aprisma.spectrum.app.web.db.schemachange.BaseSchemaChange.applySchemaChange(BaseSchemaChange.java:185)
... 70 more
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Duplicate column name 'isClusterEntity'

As per the output of the following MySQL query, the  'isClusterEntity'  column already exists in the model table:

 

1. Open a bash shell (bash –login)

 

2. Navigate to $SPECROOT/mysql/bin directory

 

3. Launch the MySQL command line interface

 

Run: ./mysql -uroot -proot reporting (for Windows platform)

 

Run: ./mysql --defaults-file=../my-spectrum.cnf -uroot -proot reporting (for Linux/Solaris platform)

 

MySQL> Select * from schemaversion where schema_comments='Adding isClusterEntity column to model table for cluster information'\G

 

 mysql.jpg

 

 4. Take a look at the State which says "F". We would need to change that.

  

Resolution:

1. Make a note of the change_id. From the above screenshot it is "137"

2. Run the following MySQL command in the MySQL prompt to change the state column from "F" to "A"

MySQL> update schemaversion set state='A' where change_id=137;

Note : Change_id will differ from database to database, please make a note of it accordingly.

3. Stop / Start the Spectrum Tomcat service for the changes to take place.