search cancel

appmap tables are missing in the CEMDB postgres database for Introscope 10.1


Article ID: 37350


Updated On:


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


  Upgraded APM from v9.6x or v9.7x to v10.1 after this the MOM EM log is showing following error messages:

[ERROR] [Thread-44] [Manager.AppMap]
org.springframework.jdbc.BadSqlGrammarException: PreparedStatementCallback; bad SQL grammar [SELECT data FROM appmap_model_vertices WHERE update_time > ?]; nested exception is org.postgresql.util.PSQLException: ERROR: relation "appmap_model_vertices" does not exist

Position: 18
at org.springframework.jdbc.core.JdbcTemplate.execute(
at org.springframework.jdbc.core.JdbcTemplate.query(
at org.springframework.jdbc.core.JdbcTemplate.query(
at org.springframework.jdbc.core.JdbcTemplate.query(
at org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate.query(
at com.wily.introscope.appmap.em.model.dao.impl.gmt.GMTNamedParameterJdbcTemplate.query(
at com.wily.introscope.appmap.em.model.dao.impl.OntologyOperationsDaoImpl.getMergedVertices(
at sun.reflect.GeneratedMethodAccessor553.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(
at java.lang.reflect.Method.invoke(
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(
at com.sun.proxy.$Proxy133.getMergedVertices(Unknown Source)
at com.wily.introscope.appmap.em.ontology.OntologyModelBean.postConstruct(
at com.wily.introscope.appmap.config.AppMapPostConstructExecutor.initializeAll(
at com.wily.introscope.appmap.config.AppMapPostConstructExecutor.access$1(
at com.wily.introscope.appmap.config.AppMapPostConstructExecutor$
Caused by: org.postgresql.util.PSQLException: ERROR: relation "appmap_model_vertices" does not exist

  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:


  This issue occurs because the difference 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 take. 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_tablesPART1.txt
         Second: create_appmap_tables.txt create_appmap_tablesPART2.sql
         Third: GRANT-SQL-commands.txt GRANT-SQL-commands_10.1.sql (note you need to replace the <wilydb> user with your admin user for CEMDB)
    4 - Make sure all commands complete successfully, let us know.
    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.1, if you are upgrading to 10.0 please refer to this other Document:


  The reason to have two knowledge documents addressing this is the structural difference between 10.0 Schema and 10.1 Schema.



Release: CEMUGD00200-10.1-Introscope to CA Application-Performance Management-Upgrade Mai

Attachments get_app