Spectrum Archive Manager logs showing Table ddmdb.event doesn't exist error
search cancel

Spectrum Archive Manager logs showing Table ddmdb.event doesn't exist error

book

Article ID: 121312

calendar_today

Updated On:

Products

Spectrum Network Observability

Issue/Introduction

The Spectrum Archive Manager will not start. The following error is seen in the $SPECROOT/SS/DDM/ARCHMGR.OUT file:

Nov 14 10:27:00 ERROR TRACE at ModelArchDBImp.cc(4969): doSqlQuery/mysql_query: Failure executing query:
SHOW COLUMNS FROM event LIKE 'node_id' - Table 'ddmdb.event' doesn't exist

Nov 14 10:27:00 ERROR TRACE at ModelArchDBImp.cc(4969): doSqlQuery/mysql_query: Failure executing query:
SHOW COLUMNS FROM event LIKE 'vardata_string' - Table 'ddmdb.event' doesn't exist

Environment

Any Spectrum version installed on any support operating system

Resolution

To resolve this issue you can try the following:

1.  Initialize the DDM database from $SPECROOT/SS/DDM:

./ddm_load.pl -il landscapehandle

For example:

./ddm_load.pl -il 0x10000000

If that works start the ArchMgr using the ./startSS.pl script in the $SPECROOT/bin directory.  If that fails proceed with step 2.

2.  Recreate the ddmdb.event table and then reinitialize the ddmdb with the proceeding steps:

Prior to recreating the ddmdb.event table, you will need to know how the ddmdb.event table was created for the version of Spectrum you have installed. Do the following on another SpectroSERVER system with the same Spectrum version and patches installed:

A. Log into the Spectrum system as the user that owns the Spectrum installation 

B. cd to the $SPECROOT/mysql/bin directory and log into mysql: 

Windows:
./mysql -uroot -p<password> ddmdb;

Linux:
./mysql --defaults-file=../my-spectrum.cnf -uroot -p<password> ddmdb;



C. At the mysql> prompt, enter the following command to find out how the ddmdb.event table was created:

show create table event;

Starting at "CREATE TABLE" copy all the way to the the line before the first "PARTITION EVENT" line.  Here is an example from a 25.4.4 SS mysql db:

CREATE TABLE `event` (
  `model_h` int unsigned NOT NULL,
  `utime` int NOT NULL,
  `counter` int unsigned NOT NULL,
  `clk_seq` smallint unsigned NOT NULL,
  `version` tinyint NOT NULL,
  `node_id` char(6) NOT NULL,
  `user_key` int unsigned NOT NULL,
  `type` int unsigned NOT NULL,
  `severity` int unsigned NOT NULL,
  `vardata_string` mediumtext,
  PRIMARY KEY (`model_h`,`utime`,`counter`,`clk_seq`,`version`,`node_id`),
  UNIQUE KEY `event_ie3` (`utime`,`counter`,`model_h`,`clk_seq`,`version`,`node_id`),
  KEY `event_ie1` (`utime`,`counter`),
  KEY `event_ie2` (`type`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3
/*!50500 PARTITION BY RANGE  COLUMNS(utime)


Now that you have the command on how the ddmdb.event table is created, you can create the ddmdb.event table on the system where you are seeing the issue occur by doing the following:


A. Log into the Spectrum system as the user that owns the Spectrum installation 

B. cd to the $SPECROOT/mysql/bin directory and log into mysql: 

Windows:
./mysql -uroot -p<password> ddmdb;

Linux:
./mysql --defaults-file=../my-spectrum.cnf -uroot -p<password> ddmdb;



C. At the mysql> prompt, enter the following command to drop the ddmdb.event table:


drop table event; 

5. At the mysql> prompt, enter the command to recreate the ddmdb.event table as noted previously.

NOTE: Make sure to include a semicolon ; character at the end of the CREATE command.

For example:

CREATE TABLE `event` (
  `model_h` int unsigned NOT NULL,
  `utime` int NOT NULL,
  `counter` int unsigned NOT NULL,
  `clk_seq` smallint unsigned NOT NULL,
  `version` tinyint NOT NULL,
  `node_id` char(6) NOT NULL,
  `user_key` int unsigned NOT NULL,
  `type` int unsigned NOT NULL,
  `severity` int unsigned NOT NULL,
  `vardata_string` mediumtext,
  PRIMARY KEY (`model_h`,`utime`,`counter`,`clk_seq`,`version`,`node_id`),
  UNIQUE KEY `event_ie3` (`utime`,`counter`,`model_h`,`clk_seq`,`version`,`node_id`),
  KEY `event_ie1` (`utime`,`counter`),
  KEY `event_ie2` (`type`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3
/*!50500 PARTITION BY RANGE  COLUMNS(utime);

D. Exit mysql

E. Reinitialize the ddmdb using the ddm_load command
    a. cd to the $SPECROOT/SS directory and enter the following command to note the landscape handle

../SS-Tools/lh_set

    b. cd to the $SPECROOT/SS/DDM directory
    c. Enter the following command to reinitialize the ddmdb where <LH> is the decimal value of the landscape handle noted above:

./ddm_load -i <LH>

F. Start the Archive Manager using the ./startSS.pl script in the $SPECROOT/bin directory.