While Installing Postgres as an APM database, the Installation fails with an error "Postgres Instance already exists" even though Postgres was Uninstalled.
search cancel

While Installing Postgres as an APM database, the Installation fails with an error "Postgres Instance already exists" even though Postgres was Uninstalled.

book

Article ID: 47615

calendar_today

Updated On:

Products

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

Issue/Introduction

 While installing Postgres as an APM database, the installation fails with an error "Postgres Instance already exists" even though Postgres has been uninstalled. The following error is reported:

 Postgres Instance already exists.  If you have an existing PostgreSQL-<version> instance, please uninstall it and then install a new instance. You may also use the existing instance to create new APM schema.

 No files are present in the target Postgres installation directory and this occurs regardless of how the validateDatabase and validateSchema properties are set during install.

Environment

     Any Unix based OS with Postgres used as the APM 10.x database. 

Cause

     This issue typically occurs when installing Postgres on a server where a manual uninstall of Postgres has already been performed. The error occurs because the installer checks for the presence of a Postgres script inside the /etc/init.d directory.

 

Resolution

    To address this issue, login as a root user and remove this script:

cd /etc/init.d
rm -f postgresql-<version>