search cancel

Appmap tables are missing in the CEMDB Postgres database for APM 10.0.


Article ID: 33686


Updated On:


CA Application Performance Management Agent (APM / Wily / Introscope) INTROSCOPE


  After Upgrading APM from v9.6 to v10.0, then the MOM EM log is showing following error messages:

[ERROR] [Thread-25] [Manager.AppMap]
org.springframework.jdbc.BadSqlGrammarException: PreparedStatementCallback; bad SQL grammar [SELECT vertex_id, external_id FROM appmap_id_mappings WHERE vertex_id > 0]; nested exception is org.postgresql.util.PSQLException: ERROR: relation "appmap_id_mappings" does not exist
Position: 36

  Also, Team Center is not able to mount graphs and starts to throw:

    - "Error retrieving permissions. Status code: 503"
    - "Error reading data from polling URL: ../apm/appmap/private/permission. Retrying in 60000ms."

  It occurs when CEMDB Schema is not matching with the actual Introscope release, if you are not receiving org.springframework.jdbc.BadSqlGrammarException error, please refer to below document to address 503 error:



APM 10.0

Postgres 9.2.9



  This issue occurs because of the differences between 9.6x/9.7x, 10.0 and 10.1 DB schema. When you upgrade the database some tables may missing and causing this error.



  Here is the procedure that we need to follow. Do this during maintenance hours.

  1 - Make a backup of CEMDB postgres database.
  2 - Stop all EMs connected to the CEMDB.
  3 - Open the pgadmin and run the commands in given order one by one in attached files.
       First: create_appmap_tables.txt create_appmap_tables.txt
       Second: GRANT-SQL-commands.txt GRANT-SQL-commands.txt(note you need to replace the <wilydb> user with one for your environment.)
  4 - Make sure all commands complete successfully.
  5 - Start all EMs connected to the CEMDB.
  6 - If failure occurs, restore the CEMDB backup and start all EMs connected to the CEMDB.
  7 - Report a issue to CA support with details about the failure.


Additional Information:  

  Please note that this Knowledge Document only applies when upgrading to Introscope 10.0, if you are upgrading to 10.1 please refer to the below Document.  The reason to have two knowledge documents addressing this is the structural difference between 10.0 Schema and 10.1 Schema.



Component: APMCEM

Attachments get_app