Unable to install monthly patch in CA API Management Gateway

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

There can be different reasons for patch installation to fail one of them is addressed in this article. 

 Various attempts to install patch using CA API Management Gateway main menu "option 8 Display Patch Management menu" or command line tool has failed with the following error ( for example) then please follow this article to further confirm the issue.

Please wait while the patch is installed ... 
Patch ID CA_API_PlatformUpdate_64bit_v9.X-RHEL-2017-07-25 (Upgrades the CA API 64bit Platform to the 9.X-RHEL-2017-07-25 version. This patch requires that the 9.X Platform Update be installed first. It also requires a restart of the CA API Gateway Appliance.) is ERROR, last modified on 2017-08-08T12:49:18+0200 
There were errors during the patch operation. 

when installing the patch using command line following error is seen

ERROR   : there was an error while running post-install script postinstall_02_bash_logging_toggle.sh. Check log file /var/log/layer7-patchlog for details.

 

Cause:

The issue may be the difference in the /etc/rsyslog.conf file which can be seen in log /var/log/layer7-patchlog. Check the following file for the patch error  -/var/log/layer7-patchlog

The error says 

Fri Aug 25 18:16:10 2017: INFO  : /tmp/patchertemp2300285132835263679.tmp/patch_sh_script1573696352081571235: doPostInstallScripts(507): Running post-install script postinstall_02_bash_logging_toggle.sh. Script output is appended to the log file

+ RSYSLOG_CONF_FILE=/etc/rsyslog.conf

+ BASH_LOG_FILE=/var/log/bash_commands.log

++ date +%Y%m%d_%H%M%S

+ BK_TIME=20170825_181610

+ BK_DIR=/opt/SecureSpan/Appliance/config/bash_log/

+ LOG_FILE=/opt/SecureSpan/Appliance/config/bash_cl_audit_toggle.log

+ checkFileExists /etc/rsyslog.conf

+ local FILE=/etc/rsyslog.conf

+ '[' -e /etc/rsyslog.conf ']'

+ RETVAL=0

+ '[' 0 -eq 0 ']'

++ which rsyslogd

+ /sbin/rsyslogd -c3 -f /etc/rsyslog.conf -N 1

+ '[' 1 -ne 0 ']'

+ toLog 'ERROR - The rsyslog configuration file (/etc/rsyslog.conf) syntax is not valid. Exiting...'

++ which date

+ local DATE=/bin/date

+ '[' X0 == X0 ']'

++ date '+%a %b %e %H:%M:%S %Y'

+ LOG_TIME='Fri Aug 25 18:16:10 2017'

+ '[' -f /opt/SecureSpan/Appliance/config/bash_cl_audit_toggle.log ']'

+ echo -e Fri Aug 25 18:16:10 '2017: ERROR' - The rsyslog configuration file '(/etc/rsyslog.conf)' syntax is not valid. Exiting...

 

+ exit 1

 2.  run the following command to confirm that the issue is due to /etc/rsyslog.conf

/sbin/rsyslogd -c3 -f /etc/rsyslog.conf -N 1

The output is ( error snippet) 

rsyslogd: CONFIG ERROR: could not interpret master config file '/home/ssgconfig/customer_rsyslog.conf'. [try http://www.rsyslog.com/e/2124 ]

compared to when running again the default file

rsyslogd: WARNING: rsyslogd is running in compatibility mode. Automatically generated config directives may interfer with your rsyslog.conf settings. We suggest upgrading your config and adding -c5 as the first rsyslogd option.

rsyslogd: End of config validation run. Bye.

Resolution:

1. Advised to keep a snapshot of the vmware machine because patch rollback feature is not available.

2. Compare the /etc/rsyslog.conf of the same version of the gateway from another system which is fresh installed using text comparing tool. 

4. If the difference is seen then follow step below

a) make a backup copy of /etc/rsyslog.conf

b) transfer the default rsyslog.conf to /home/ssgconfig

c) copy the rsyslog.conf from /home/ssgconfig to /etc/rsyslog.conf

d) rerun /sbin/rsyslogd -c3 -f /etc/rsyslog.conf -N 1 and check the output that should be 

rsyslogd: WARNING: rsyslogd is running in compatibility mode. Automatically generated config directives may interfer with your rsyslog.conf settings. We suggest upgrading your config and adding -c5 as the first rsyslogd option.

rsyslogd: End of config validation run. Bye.

e) reinstall the patch again