The following is a high-list of techniques and suggestions to employ when troubleshooting postgres installation issues
Typical error message reported in the <EM-HOME>/install/Introscope_10.7.0.45_InstallLog.log
...
Postgres installation in UNIX failed as below:
...
===============================================================================
Database installation failed
----------------------------
The detail error messages will be saved into installation log file under
APM 10.7
ps -ef | grep postgres
example:
postgres 28304 1 0 11:32 ? 00:00:00 /opt/ca/APM_10.7/PostgreSQL-9.6.2/bin/postgres -D /opt/ca/APM_10.7/PostgreSQL-9.6.2/data
postgres 28305 28304 0 11:32 ? 00:00:00 postgres: logger process
postgres 28307 28304 0 11:32 ? 00:00:00 postgres: checkpointer process
postgres 28308 28304 0 11:32 ? 00:00:00 postgres: writer process
postgres 28309 28304 0 11:32 ? 00:00:00 postgres: wal writer process
postgres 28310 28304 0 11:32 ? 00:00:00 postgres: autovacuum launcher process
postgres 28311 28304 0 11:32 ? 00:00:00 postgres: stats collector process
If it the file doesn't exist it means that the installer wasn't able to create the apm db
a) Uninstall the existing installation using the APM uninstaller script :
EM_HOME/UninstallerData/base/Uninstall_Introscope
b) Verify postgres has been uninstalled:
systemctl list-units --type service --all | grep postgres
If the output is as below:
postgresql-9.6.service loaded active running PostgreSQL 9.6 database server
you need to manually uninstall postgres as below:
/usr/bin/systemctl stop "postgresql-9.6.service"
find / -name uninstall-postgresql
Go the folder found and uninstall the postgres instance, below is an example:
# ./uninstall-postgresql
Do you want to uninstall PostgreSQL and all of its modules? [Y/n]: Y
----------------------------------------------------------------------------
Uninstall Status
Uninstalling PostgreSQL
0% ______________ 50% ______________ 100%
########################################
Warning: The data directory (/apm_db/database/PostgreSQL-9.6.2/data) and service
user account (postgres) have not been removed.
Press [Enter] to continue:
c) Check that postgres user has been deleted, if not, run:
userdel -r postgres
d) If postgres process is running, force the stop using:
/usr/bin/pkill -9 postgres
e) Verify that no port is in-use by postgres
netstat -tnlp
f) Disable previous postgres installations services.
For example: if you found that postgresql-9.2 was enabled disable it as below:
- Linux:
chkconfig postgresql-9.2 off
Verification:
chkconfig --list|grep -i postgres
postgresql-9.2 0:off 1:off 2:off 3:off 4:off 5:off 6:off
postgresql-9.6 0:off 1:off 2:on 3:on 4:on 5:on 6:off
- Windows:
Under Control Panel/Administrative Tools/Services set the service "pgsql-9.2 - PostgreSQL Server 9.2" to have a Startup of Disabled.
g) check that /etc/init.d PostgreSQL startup script files are gone after uninstalling any existing PostgreSQL installation
check if Introscope_10.7.0.45_InstallLog.log is reporting below error:
** Error: Error invoking Postgres installer, please check Postgres installation log file under /tmp for details.
Install Postgres failed with exit code 1
Suggestion:
Check if /tmp is a mounted drive ? If so, make sure it has write permissions? Try to remount it
Export the below variable before running the installer:
export LAX_DEBUG=true (if you are using the EM installer wizard / console mode)
or you can use in case of silent installation:
export LAX_DEBUG=/Install.log
The Introscope_10.7.0.45_InstallLog.log will tell you if you are using an unsupported OS, for example:
ERROR - (STDOUT: Detected RHEL or Fedora
OR
ERROR - (STDOUT: Unknown OS version
Make sure you are using a supported OS
APM Compatibilities are available from: https://support.ca.com/us/product-content/status/compatibility-matrix/application-performance-management-compatibility-guide.html
the Introscope_10.7.0.45_InstallLog.log will tell you which is the account used for the installer, :
user.name == root
Create Database Failed
Status: ERROR
Additional Notes: ERROR - createdb: database creation failed: ERROR: encoding "UTF8" does not match locale "en_GB"
Suggestion: https://knowledge.broadcom.com/external/article/31796
If postgres is successfully installed but apm database was not created, you can try to manually create the APM schema manually
cd <APM-HOME>/install/database-scripts/unix
./dropdb-postgres.sh 127.0.0.1 "<APM-DB>" cemdb admin admin 5432
./createdb-postgres.sh 127.0.0.1 "<APM-DB>" cemdb postgres <postgres-password> admin <admin-password> 5432
./createschema.sh -databaseName cemdb -databaseType Postgres -host 127.0.0.1 -port 5432 -releaseVersion 10.7.0.0 -scriptsDir "<APM-HOME>/install/database-scripts" -user admin -password <admin-password>
for more information refer to : https://techdocs.broadcom.com/us/en/ca-enterprise-software/it-operations-management/application-performance-management/10-7/installing/apm-installation/install-and-configure-the-apm-database.html#concept.dita_a76880049931c2879d1a17908c088e72758b7c34_InstallaPostgreSQLAPMDatabase