Getting the "Corrupt Installation is Present" Error on starting APMIA
search cancel

Getting the "Corrupt Installation is Present" Error on starting APMIA

book

Article ID: 445925

calendar_today

Updated On:

Products

DX SaaS

Issue/Introduction

 

After installing/starting APMIA, seeing 

"APMIA is not installed/corrupt installation is present/APMIA is started using console start."

 

Cause

 The error is a combined message covering four distinct scenarios — it does not necessarily mean the installation is corrupted. 

Resolution


1. isinstall remains 0 — No installation detected at all

The script sets variable isinstall to 1 only when a service registration file is found and its recorded path matches the current $APMIA_HOME. If none of the following are found, isinstall stays 0:

  • /etc/init.d/$APP_NAME (or a symlink to it)
  • /etc/systemd/system/${APP_NAME}.service
  • /etc/init/${APP_NAME}.conf
  • The sysedge equivalents (sysedge.service, etc.)
  • AIX: an lsitab entry or IA_mode file

Common causes: the agent was never installed via APMIACtrl.sh install, or the service registration files were manually deleted.


2. isinstall is 2 — Path mismatch (the actual corrupt installation scenario)

isinstall variable is set to 2 when a service registration file is found, but the path recorded inside it does not match the current $APMIA_HOME. This means the agent was registered from a different directory than where the script is now running. This happens when:

  • The APMIA installation directory was moved or renamed after installation.
  • The agent was installed under a symlink that has since changed.
  • The service file points to an old/stale path that no longer exists.

Since isinstall == 2 is not equal to 1, installerrmsg fires.


3. APP_NAME is empty or misconfigured

APP_NAME is read from APMIAgent.shconf

APP_NAME=$(grep 'APP_NAME=[^,]*' "$APMIA_AGENT_BIN_PATH/APMIAgent.shconf" | awk ...)

If APMIAgent.shconf is missing, corrupted, or the APP_NAME variable is not set in it, APP_NAME will be empty. All the service file paths like /etc/systemd/system/.service or /etc/init.d/ will resolve to empty/wrong paths, so no service is found → isinstall stays 0.


4. Agent was started via console_start, not installed as a service

If the agent was launched using APMIACtrl.sh console_start, it runs as a foreground process without registering any service files. So the script finds nothing and isinstall remains 0.

Additional Information

How to Fix

  • Path mismatch: Re-run APMIACtrl.sh install from the correct directory, or update the path in the systemd/init.d service file to match the current location.
  • Missing APP_NAME: Verify APMIAgent.shconf exists and contains a valid APP_NAME= entry.
  • Missing service files: Run APMIACtrl.sh install again to re-register the service.
  • Console-started agent: Stop it and install it properly as a service.