Customer restored the cemdb from another environment.
Once restore is complete, we find that in CEM UI, under setup -> service, we see that there are list of EMs which does not belong to this cluster. It belong to other environment from where customer restore the cemdb. We ran the following steps to clean and rebuild the list.
1) Shutdown all EMs in the cluster (MOM and all Collectors)
2) deleted the following file: \config\internal\server\tess-internal.properties from MOM and all collectors (make backup copy of files before delete).
3) Execute following query in APMDB: > delete from ts_entity;
4) Restart all EMs (MOM (first) & (then) Collectors)
But after the above step when we check CEM UI, under setup -> service, we are getting errors.
To rebuild cemdb. customer successfully able to delete/drop cemdb, but now having issue creating the cemdb.
Customer running into errors when running Createdb-postgres.sh command.
Follow the steps to resolve this issue:
All EMs (MOM and two collectors) are stopped.
Here are the two commands that we need to run to create cemdb and APM schema.
Please run these two commands one by one.
If the 1st one fails, do not run 2nd one.
./createdb-postgres.sh 150.xxx.xxx.150 /data/apmdb105215 cemdb postgres admin admin admin 5432 command
./createschema.sh -databaseName cemdb -databaseType Postgres -host 150.xxx.xxx.150 -password admin -port 5432 -releaseVersion 10.5.2.0 -scriptsDir /data/wily/Introscope10.5.2.15/install/database-scripts -user admin
Once successfully completed, then check the cemdb via pgadmin tool.