Spectrum Report Manager not starting up due to missing files

Document ID : KB000112528
Last Modified Date : 30/08/2018
Show Technical Document Details
Issue:
Reviewing the Spectrum Tomcat Log file errors are seen regarding the service manager tables and a single Report Manager table.
Errors looking like this:
 
java.sql.SQLException: Can't find file: 'sm_slmagreesto' (errno: 2)
java.sql.SQLException: Can't find file: 'sm_slmmonitors' (errno: 2)
java.sql.SQLException: Can't find file: 'sm_slmuses' (errno: 2)


ERROR 1017 (HY000) at line 21 in file: 'create_v_security_string_accessibility_by_landscape.sql': Can't find file: 'security_string_accessibility_by_landscape' (errno: 2)
Cause:
This is caused by missing index files for MyISAM database engine tables.
Resolution:
Still having the .frm file means we can rebuild the index.

Log in to MySQL Client:

1. Navigate to $SPECROOT/mysql/bin
2. Type: ./mysql --defaults-file=../my-spectrum.cnf -uroot -proot reporting
3. At the mysql prompt type:

repair table security_string_accessibility_by_landscape USE_FRM;

Then this will need to be done for all of the Service Manager tables that exist in the reporting database.
Attached to the KB is a script called 'repair_sm_tables.sql'.  It just has a series of the same command above but can be executed to quicken things up.

Place the script in $SPECROOT/mysql/bin

While still in the mysql prompt type:

\. repair_sm_tables.sql

Output will look similar to this but for each table repaired:
 
mysql> \. repair_sm_tables.sql
+-------------------------+--------+----------+------------------------------------+
| Table                   | Op     | Msg_type | Msg_text                           |
+-------------------------+--------+----------+------------------------------------+
| reporting.sm_attributes | repair | warning  | Number of rows changed from 0 to 2 |
| reporting.sm_attributes | repair | status   | OK                                 |
+-------------------------+--------+----------+------------------------------------+
2 rows in set (0.04 sec)

4. Restart Spectrum Tomcat Service
File Attachments:
repair_sm_tables.sql