Platform Update installation fails due to duplicate MySQL PID

Document ID : KB000057263
Last Modified Date : 14/02/2018
Show Technical Document Details

Solution

Background

The CA API?Gateway uses Platform Updates to maintain and secure the underlying Red Hat Enterprise Linux operating system that hosts the Gateway application. This operating system must be updated regularly to ensure it is kept secure from emerging threats and vulnerabilities against tools and utilities present on the Gateway appliance itself. In some circumstances, installing a Platform Update against the Gateway may fail and require remediation from a system administrator.

Presentation

The Platform Update installation process may fail with the following error message displayed in the console during patch installation. If this error message occurs then this article should be implemented to resolve the issue:

MySQL-shared-compat-advanced##################################################?
MySQL-client-advanced ##################################################?
You have more than one PID file:?
-rw-rw---- 1 mysql mysql 5 Jun 25 16:38 /var/lib/mysql/server.domain.local.pid?
-rw-rw---- 1 mysql mysql 5 Mar 11 2013 /var/lib/mysql/localhost.localdomain.pid?
Please check which one (if any) corresponds to a running server?
and delete all others before repeating the MySQL upgrade.?

error: %pre(MySQL-server-advanced-5.5.37-1.rhel5.x86_64) scriptlet failed, exit status 1?
error: install: %pre scriptlet failed (2), skipping MySQL-server-advanced-5.5.37-1.rhel5?
MySQL-shared-advanced ##################################################?
ERROR : MySQL updated RPMs failed to install

Resolution

Fixing this issue involves stopping any running MySQL server instances and removing their process ID and process lock files. Removal of these files allows an application to start as if it had stopped successfully and without issue. Run through the following procedure to clear these files, reset the patching subsystem's status, and installing the patch again.

  1. Stop the MySQL server: service mysql stop
  2. Remove any existing process ID files:?rm -rf /var/lib/mysql/*pid
  3. Remove the subsys lock file:?rm -rf /var/lock/subsys/mysql
  4. Terminate any remaining MySQL applications: ps awwx | grep [s]ql | awk '{print $1}' | xargs kill -9
  5. Start the MySQL server: service mysql start
  6. Reset?patch status indicators: mv /opt/SecureSpan/Controller/var/patches/*.status /tmp
  7. Re-attempt the patch installation process

Further Troubleshooting

If issues with the patching subsystem persist afterwards then please open a new case with CA Support. Ensure that the following items are delivered with the new case:

  1. /opt/SecureSpan/Controller/var/log/patches.log
  2. /opt/SecureSpan/Controller/var/log/patch_cli_0_0.log
  3. /opt/SecureSpan/Controller/var/log/patch_verifier_0_0.log
  4. /opt/SecureSpan/Controller/var/patches/*.status