SRM has not finished starting after upgrade

book

Article ID: 37353

calendar_today

Updated On:

Products

CA Spectrum

Issue/Introduction

Symptom:

After upgrading to CA Spectrum 9.4.x, fails to launch the InfoView, the following message error is displayed:

SRM has not finished starting

 

Environment:

CA Spectrum 9.3.x/9.4.x

CABI 3.3 SP1

 

Cause:

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

 

The following error is found in the $SPECROOT/tomcat/logs/stdout.log (or catalina.out) file:

jan 26, 2016 08:21:05 AM (SRM/Startup/Container) (com.aprisma.spectrum.app.web.db.schemachange.SchemaChangeUpdater) - (ERROR) - Error occurred while applying schema change

Name: 1068 (Product version: 9.3.2) - Adding isClusterEntity column to model table for cluster information

com.aprisma.spectrum.app.web.db.schemachange.FatalSchemaChangeException: com.aprisma.spectrum.app.web.db.schemachange.SchemaChangeException: SQLException while running RuntimeSchemaChange1068 Schema Change Errorcode: 1060

 

Caused by: com.aprisma.spectrum.app.web.db.schemachange.SchemaChangeException: SQLException while running RuntimeSchemaChange1068 Schema Change Errorcode: 1060

 

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> show full columns from model;

+------------------+------------------+-------------------+------+-----+---------------------+

| Field            | Type             | Collation         | Null | Key | Default             |

+------------------+------------------+-------------------+------+-----+---------------------+

| model_key        | int(10) unsigned | NULL              | NO   | PRI | NULL                |

| model_h          | int(10) unsigned | NULL              | NO   | MUL | 0                   |

| model_name       | varchar(4000)    | latin1_swedish_ci | YES  | MUL | NULL                |

| mtype_h          | int(10) unsigned | NULL              | YES  | MUL | NULL                |

| model_class      | int(10) unsigned | NULL              | YES  | MUL | NULL                |

| network_address  | varchar(255)     | latin1_swedish_ci | YES  |     | NULL                |

| first_event_time | datetime         | NULL              | YES  |     | 2000-01-01 00:00:00 |

| landscape_h      | int(10) unsigned | NULL              | YES  | MUL | NULL                |

| destroy_time     | datetime         | NULL              | YES  | MUL | NULL                |

| security_string  | varchar(255)     | latin1_swedish_ci | YES  | MUL | *UNKNOWN*           |

| isClusterEntity  | int(11)          | NULL              | NO   |     | 0                   |

+------------------+------------------+-------------------+------+-----+---------------------+

11 rows in set (0.00 sec)

 

Run the following MySQL query to find the last entry in the schemaversion table and take note of change_id value:

mysql> select * from schemaversion order by change_id desc limit 1\G

 

*************************** 1. row ***************************

change_id: 221

session_id: 156

name: 1068

category: DataProcessing

schema_comments: Adding isClusterEntity column to model table for cluster information

major: 9

minor: 3

service_pack: 2

start_time: 2016-01-26 08:21:05

end_time: NULL

duration_secs: NULL

state: F

state_details: com.aprisma.spectrum.app.web.db.schemachange.SchemaChangeException: SQLException while running RuntimeSchemaChange1068 Schema Change Errorcode: 1060

 

 

Resolution:

Run the following MySQL command line in the MySQL prompt to change the state column from "F" to "A" of the last change_id entry in the schemaversion table and restart the Spectrum Tomcat service.

 

1. Open a bash shell (bash -login)

2. Go 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>update schemaversion set state='A' where change_id=221;

 

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

Environment

Release: SPDBIP99000-9.3-Spectrum-Device Based Suite-IP Services Manager
Component: