Troubleshooting¶
Reconfiguring the PEM Server¶
In certain situations, you may need to uninstall the PEM server, install it again, and reconfigure the PEM server. Use the following commands in the given sequence:
Use the following command to remove the PEM server configuration and uninstall:
/usr/edb/pem/bin/configure-pem-server.sh –unUse the following command to remove the PEM packages:
yum erase edb-pem-serverUse the following command to drop the
pemdatabase:DROP DATABASE pemMove the certificates from
/root/.pem/to another location:mv /root/.pem/* <new_location>Move the
agent.cfgfile from/usr/edb/pem/agent/etc/agent.cfgto another location:mv /usr/edb/pem/agent/etc/agent.cfg <new_location>Then, use the following command to configure the PEM server again:
/usr/edb/pem/bin/configure-pem-server.sh'
The pem.alert Table Fails to Restore¶
When restoring the pem backing database from backup, you may encounter
an error during the restoration of the pem.alert table. This is caused
by a missing table pre-requisite for the table - the pg_restore utility
may restore the pem.alert pre-requisites after it attempts to restore
pem.alert.
If this happens, the output from pg_restore will include error messages
that refer to the alert table:
pg_restore: [archiver (db)] could not execute query: ERROR: insert or
update on table "alert_history" violates foreign key constraint
"alert_history_alert_id_fkey"
DETAIL: Key (alert_id)=(3) is not present in table "alert".
Command was: ALTER TABLE ONLY alert_history
ADD CONSTRAINT alert_history_alert_id_fkey FOREIGN KEY (alert_id)
REFERENCES alert(id) ON...
pg_restore: creating FK CONSTRAINT alert_status_alert_id_fkey
pg_restore: [archiver (db)] Error from TOC entry 3265; 2606 18355 FK
CONSTRAINT alert_status_alert_id_fkey postgres
pg_restore: [archiver (db)] could not execute query: ERROR: insert or
update on table "alert_status" violates foreign key constraint
"alert_status_alert_id_fkey"
DETAIL: Key (alert_id)=(1) is not present in table "alert".
Command was: ALTER TABLE ONLY alert_status
ADD CONSTRAINT alert_status_alert_id_fkey FOREIGN KEY (alert_id)
REFERENCES alert(id) ON U...
If you encounter this problem, restore the pem database before restoring
the pem.alert table. Restoring the pem database will install the
pre-requisites for pem.alert, and the restoration of the table should
complete as expected.