Introduction

Patching an Oracle Database Appliance is mainly applying 3 patches: the system patch, including OS and Grid Infrastructure updates, the storage patch for data disks and disk controllers, and the DB patch for DB homes and databases. ASR manager (Automatic Service Request) update is included in the system patch. And it’s normally not a topic when patching an ODA, it’s a small module and update is done without any problem in most cases. Using ASR is recommended as its purpose is to automatically open a Service Request on My Oracle Support when hardware failure is detected by the system: don’t miss this important feature.

When patching an ODA X8-2M from 19.18 to 19.20, I discovered that ASR manager was not in the correct version. How could I solve this problem?

Status of my components

I always check the version of the ODA components prior applying a patch, just because it’s better to know where you started. Regarding the ASR manager on my ODA, it’s not OK because version doesn’t match the one delivered within 19.18 patch:

odacli describe-component
System Version  
---------------
19.18.0.0.0

System node Name 
---------------
oda01val

Local System Version 
---------------
19.18.0.0.0 

Component                                Installed Version    Available Version   
---------------------------------------- -------------------- --------------------
OAK                                     
                                          19.18.0.0.0           up-to-date          
GI                                      
                                          19.18.0.0.230117      up-to-date          
...
 
ASR                                     
                                          20.3.0                22.2.0              
HMP                                     
                                          2.4.8.9.604           up-to-date 

Retrying the 19.18 patch

You should know that you can retry the system patch without any problem. odacli will skip the already patched modules, and try to patch the components that are not in the target version. So this is the first thing you could do:

odacli create-prepatchreport -s -v 19.18.0.0.0
odacli describe-prepatchreport -i 91c48ee7-bffb-4ff7-9452-93b6d2c413d3
Patch pre-check report                                           
------------------------------------------------------------------------
                 Job ID:  91c48ee7-bffb-4ff7-9452-93b6d2c413d3
            Description:  Patch pre-checks for [OS, ILOM, GI, ORACHKSERVER, SERVER]
                 Status:  SUCCESS
                Created:  April 2, 2024 12:24:15 PM CEST
                 Result:  All pre-checks succeeded

...
odacli update-server -v 19.18.0.0.0
odacli describe-job -i 3d72b49a-c201-42e2-9da9-e5e55d5b5e86
Job details                                                      
----------------------------------------------------------------
                     ID:  3d72b49a-c201-42e2-9da9-e5e55d5b5e86
            Description:  Server Patching
                 Status:  Success
                Created:  April 2, 2024 12:32:23 PM CEST
                Message:  
...
odacli describe-component | tail -n 5 
ASR                                     
                                          20.3.0                22.2.0              
HMP                                     
                                          2.4.8.9.604           up-to-date 

It didn’t help.

Trying the 19.20 patch

As I need to go to 19.20, let’s try applying this system patch and see if it’s better:

odacli create-prepatchreport -s -v 19.20.0.0.0
odacli describe-prepatchreport -i 13919f5c-753e-4340-818d-b04022419938
Patch pre-check report                                           
------------------------------------------------------------------------
                 Job ID:  13919f5c-753e-4340-818d-b04022419938
            Description:  Patch pre-checks for [OS, ILOM, GI, ORACHKSERVER, SERVER]
                 Status:  SUCCESS
                Created:  April 2, 2024 3:50:29 PM CEST
                 Result:  All pre-checks succeeded
...
odacli update-server -v 19.20.0.0.0
odacli describe-job -i 367476ef-1c67-4521-8c96-eb2dd8ad37ca
Job details                                                      
----------------------------------------------------------------
                     ID:  367476ef-1c67-4521-8c96-eb2dd8ad37ca
            Description:  Server Patching
                 Status:  Success
                Created:  April 2, 2024 3:59:44 PM CEST
                Message:  Successfully patched GI with RHP
... 

Let’s check the version of ASR manager:

odacli describe-component | tail -n 5 
ASR                                     
                                          20.3.0                23.1.0              
HMP                                     
                                          2.4.9.0.601           up-to-date 

Still stuck to this old 20.3.0 release!

Troubleshooting why it’s stuck

Let’s have a look of what’s inside this ASR manager:

ls -lrt /var/opt/asrmanager/log/ 
total 5188
-rw-r--r-- 1 asrmgr asrmgr       0 Feb 17  2022 service-request.log
-rw-r--r-- 1 asrmgr asrmgr       0 Feb 17  2022 file-upload.log
-rw-r--r-- 1 asrmgr asrmgr       0 Feb 17  2022 trap-accepted.log
-rw-r--r-- 1 asrmgr asrmgr       0 Feb 17  2022 trap-rejected.log
drwxr-xr-x 2 asrmgr asrmgr    4096 Feb 17  2022 sftransport
-rw-r--r-- 1 asrmgr asrmgr     106 Feb 17  2022 autoupdate.log
-rw-r--r-- 1 asrmgr asrmgr       0 Aug 17  2022 derby.log.0.lck
-rw-r--r-- 1 asrmgr asrmgr  708474 Dec 19  2022 derby.log.0
drwxr-xr-x 2 asrmgr asrmgr    4096 Jan 19  2023 auditlog
-rw-r--r-- 1 asrmgr asrmgr    4341 May 19  2023 zfssa-proxy.log
-rw-r--r-- 1 asrmgr asrmgr 1407270 May 19  2023 memory.log
-rw-r--r-- 1 asrmgr asrmgr    8518 May 19  2023 asr-http.log
-rw-r--r-- 1 asrmgr asrmgr    2208 May 19  2023 remote-request.log
-rw-r--r-- 1 asrmgr asrmgr   23388 May 19  2023 asr-snmp.log
-rw-r--r-- 1 asrmgr asrmgr 3118352 May 19  2023 asr.log

No log since last year, this component is probably not running anymore:

/opt/asrmanager/util/check_asr_status.sh
Checking ASR Manager status ..............
PASS: anaconda-ks.cfg copy-DIA003AP.sh copy-DIV002AP.sh copy-ERPPROD.sh Extras iar-cm22_cmdb_itasm_server.sh iar-info-acfs-asm.sh imaging_status.log initreboot.sh original-ks.cfg osimagelogs_2022-02-07-10-35.tar.gz perl5 post-ks-chroot.log post-ks-nochroot.log setupNetwork stderr.txt stdout.txt JAVA is not found. Please set 'java.exec' property in file /var/opt/asrmanager/configuration/asr.conf to point to JAVA 1.8 or later and try again ****************************************************************
PASS: ASR Manager SNMP listener is running (SNMP port anaconda-ks.cfg copy-DIA003AP.sh copy-DIV002AP.sh copy-ERPPROD.sh Extras iar-cm22_cmdb_itasm_server.sh iar-info-acfs-asm.sh imaging_status.log initreboot.sh original-ks.cfg osimagelogs_2022-02-07-10-35.tar.gz perl5 post-ks-chroot.log post-ks-nochroot.log setupNetwork stderr.txt stdout.txt JAVA is not found. Please set 'java.exec' property in file /var/opt/asrmanager/configuration/asr.conf to point to JAVA 1.8 or later and try again ****************************************************************).
PASS: ASR Manager HTTP receiver is running (HTTP port anaconda-ks.cfg copy-DIA003AP.sh copy-DIV002AP.sh copy-ERPPROD.sh Extras iar-cm22_cmdb_itasm_server.sh iar-info-acfs-asm.sh imaging_status.log initreboot.sh original-ks.cfg osimagelogs_2022-02-07-10-35.tar.gz perl5 post-ks-chroot.log post-ks-nochroot.log setupNetwork stderr.txt stdout.txt JAVA is not found. Please set 'java.exec' property in file /var/opt/asrmanager/configuration/asr.conf to point to JAVA 1.8 or later and try again ****************************************************************).
PASS: ASR Manager Oracle transport endpoint is set correctly. [**************************************************************** JAVA is not found. Please set 'java.exec' property in file /var/opt/asrmanager/configuration/asr.conf to point to JAVA 1.8 or later and try again ****************************************************************]
PASS: ASR Manager site id anaconda-ks.cfg copy-DIA003AP.sh copy-DIV002AP.sh copy-ERPPROD.sh Extras iar-cm22_cmdb_itasm_server.sh iar-info-acfs-asm.sh imaging_status.log initreboot.sh original-ks.cfg osimagelogs_2022-02-07-10-35.tar.gz perl5 post-ks-chroot.log post-ks-nochroot.log setupNetwork stderr.txt stdout.txt JAVA is not found. Please set 'java.exec' property in file /var/opt/asrmanager/configuration/asr.conf to point to JAVA 1.8 or later and try again ****************************************************************.
PASS: ASR Manager registration id anaconda-ks.cfg copy-DIA003AP.sh copy-DIV002AP.sh copy-ERPPROD.sh Extras iar-cm22_cmdb_itasm_server.sh iar-info-acfs-asm.sh imaging_status.log initreboot.sh original-ks.cfg osimagelogs_2022-02-07-10-35.tar.gz perl5 post-ks-chroot.log post-ks-nochroot.log setupNetwork stderr.txt stdout.txt JAVA is not found. Please set 'java.exec' property in file /var/opt/asrmanager/configuration/asr.conf to point to JAVA 1.8 or later and try again ****************************************************************.
PASS: ASR Manager logging level anaconda-ks.cfg copy-DIA003AP.sh copy-DIV002AP.sh copy-ERPPROD.sh Extras iar-cm22_cmdb_itasm_server.sh iar-info-acfs-asm.sh imaging_status.log initreboot.sh original-ks.cfg osimagelogs_2022-02-07-10-35.tar.gz perl5 post-ks-chroot.log post-ks-nochroot.log setupNetwork stderr.txt stdout.txt JAVA is not found. Please set 'java.exec' property in file /var/opt/asrmanager/configuration/asr.conf to point to JAVA 1.8 or later and try again ****************************************************************.
FAIL: ASR Manager bundles state is NOT active.
FAIL: ASR Manager missing version.
FAIL: ASR Manager database connectivity is not working.
FAIL: ASR Manager process is not running.
FAIL: ASR Autoupdate bundles state is NOT active.
Please refer to ASR documentation for troubleshooting steps.

It looks like the problem is related to Java, a configuration file describes the Java path:

cat /var/opt/asrmanager/configuration/asr.conf
java.exec=/opt/oracle/dcs/java/1.8.0_281/bin/java

ls /opt/oracle/dcs/java/1.8.0_281/bin/java
ls: cannot access /opt/oracle/dcs/java/1.8.0_281/bin/java: No such file or directory

ls /opt/oracle/dcs/java/1.8.0_381/bin/java
/opt/oracle/dcs/java/1.8.0_381/bin/java

OK, the Java path is not correct, let’s change it and check the status:

sed -i 's/281/381/g' /var/opt/asrmanager/configuration/asr.conf

/opt/asrmanager/util/check_asr_status.sh
Checking ASR Manager status ..............
PASS: ASR Manager site id ASR Manager is NOT RUNNING..
PASS: ASR Manager registration id ASR Manager is NOT RUNNING..
PASS: ASR Manager logging level ASR Manager is NOT RUNNING..
FAIL: ASR Manager is NOT RUNNING.
FAIL: ASR Manager bundles state is NOT active.
FAIL: ASR Manager SNMP listener is not running.
FAIL: ASR Manager HTTP receiver is not running.
FAIL: ASR Manager missing version.
FAIL: ASR Manager database connectivity is not working.
FAIL: ASR Manager Oracle transport end point is incorrectly set.
FAIL: ASR Manager process is not running.
FAIL: ASR Autoupdate bundles state is NOT active.
Please refer to ASR documentation for troubleshooting steps.

It’s better now. Let’s retry the system patch:

odacli create-prepatchreport -s -v 19.20.0.0.0
odacli describe-prepatchreport -i 2d60dbdf-9c51-467f-858c-ccf6226b1828
Patch pre-check report                                           
------------------------------------------------------------------------
                 Job ID:  2d60dbdf-9c51-467f-858c-ccf6226b1828
            Description:  Patch pre-checks for [OS, ILOM, GI, ORACHKSERVER, SERVER]
                 Status:  SUCCESS
                Created:  April 2, 2024 5:44:51 PM CEST
                 Result:  All pre-checks succeeded
...
odacli update-server -v 19.20.0.0.0
...
odacli describe-job -i 05a10cf6-7856-494f-b434-04ea7b0b0c8d
Job details                                                      
----------------------------------------------------------------
                     ID:  05a10cf6-7856-494f-b434-04ea7b0b0c8d
            Description:  Server Patching
                 Status:  Success
                Created:  April 3, 2024 9:20:46 AM CEST
                Message:  
...

OK, and let’s check the version of ASR manager:

odacli describe-component | tail -n 5
ASR                                     
                                          20.3.0                23.1.0              
HMP                                     
                                          2.4.9.0.601           up-to-date

Not better…

ASR manager is an RPM

I discovered that ASR manager is an RPM package, meaning that update may be quite easy.

rpm -qa | grep asr
asrmanager-20.3.0-1.noarch

Newest version should be in the ODA repository:

ls -lrth /opt/oracle/oak/pkgrepos/asr/23.1.0/asrmanager-23.1.0-20230320145431.rpm 
-rw-r--r-- 1 root root 40M Aug  3  2023 /opt/oracle/oak/pkgrepos/asr/23.1.0/asrmanager-23.1.0-20230320145431.rpm

OK, so let’s upgrade this ASR manager:

service asrm stop
ASR Manager is stopped.

yum localupdate /opt/oracle/oak/pkgrepos/asr/23.1.0/asrmanager-23.1.0-20230320145431.rpm
Loaded plugins: langpacks, priorities, ulninfo, versionlock
Examining /opt/oracle/oak/pkgrepos/asr/23.1.0/asrmanager-23.1.0-20230320145431.rpm: asrmanager-23.1.0-1.noarch
Marking /opt/oracle/oak/pkgrepos/asr/23.1.0/asrmanager-23.1.0-20230320145431.rpm as an update to asrmanager-20.3.0-1.noarch
Resolving Dependencies
--> Running transaction check
---> Package asrmanager.noarch 0:20.3.0-1 will be updated
---> Package asrmanager.noarch 0:23.1.0-1 will be an update
--> Finished Dependency Resolution
ol7_UEKR6/x86_64                                                                                                                                                      | 3.0 kB  00:00:00     
ol7_UEKR6/x86_64/updateinfo                                                                                                                                           | 1.1 MB  00:00:00     
ol7_UEKR6/x86_64/primary_db                                                                                                                                           |  72 MB  00:00:00     
ol7_latest/x86_64                                                                                                                                                     | 3.6 kB  00:00:00     
ol7_latest/x86_64/group_gz                                                                                                                                            | 136 kB  00:00:00     
 
ol7_latest/x86_64/updateinfo                                                                                                                                          | 3.6 MB  00:00:00     
ol7_latest/x86_64/primary_db                                                                                                                                          |  51 MB  00:00:00     

Dependencies Resolved

=============================================================================================================================================================================================
 Package                                  Arch                                 Version                                 Repository                                                       Size
=============================================================================================================================================================================================
Updating:
 asrmanager                               noarch                               23.1.0-1                                /asrmanager-23.1.0-20230320145431                                45 M

Transaction Summary
=============================================================================================================================================================================================
Upgrade  1 Package

Total size: 45 M
Is this ok [y/d/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Warning: RPMDB altered outside of yum.

Please enter 'yes' or 'no'
yes

Copyright [2008,2016], Oracle and/or its affiliates. All rights reserved.

License and Terms of Use for this software are described at https://support.oracle.com/ (see Legal Notices and Terms of Use).

****************************************************************
Warning: ASR Manager should be run as asrmgr for better security.
Doing so will mean changing the default 162 port or configuring
your system to enable asrmgr to access port 162.
****************************************************************

Please review the security readme for more details.
  Updating   : asrmanager-23.1.0-1.noarch                                                                                                                                                1/2 

*******************************************************
To allow a non-root user to manage ASR Manager service:
Add the following line to /etc/sudoers file
'<userName> ALL=(root) NOPASSWD:/opt/asrmanager/bin/asr start,/opt/asrmanager/bin/asr stop,/opt/asrmanager/bin/asr status,/opt/asrmanager/bin/asr restart'
*******************************************************
Starting ASR Manager
ASR Manager (pid 13055) is RUNNING.
Upgrading ASR Manager bundles...
Successfully installed ASR Manager bundles.
Adding the systemctl ASR Manager (asrm-startup) service.
Removing the original chkconfig ASR Manager (asrm) service.

Note: This output shows SysV services only and does not include native
      systemd services. SysV configuration data might be overridden by native
      systemd configuration.

      If you want to list systemd services use 'systemctl list-unit-files'.
      To see services enabled on particular target use
      'systemctl list-dependencies [target]'.

ASR AUTOUPDATE (asra) service exists.
ASR Manager is stopped.
ASR Manager (pid 17323) is RUNNING.

The ASR Manager application is installed in '/opt/asrmanager'. Log files are located in '/var/opt/asrmanager'.
ASR Administration command is now available at /opt/asrmanager/bin/asr.

Checking ASR Manager status ..
FAIL: ASR Manager missing registration id.
Please refer to ASR documentation for troubleshooting steps.
apply.db.schema.changes is set to yes
 
Update SFT listener.xml ...
Installation of asrmanager was successful.
Checking ASR Manager snmp port ..
The ASR Manager SNMP listener port is set to 162 and is able to receive SNMP traps from assets.
  Cleanup    : asrmanager-20.3.0-1.noarch                                                                                                                                                2/2 
  Verifying  : asrmanager-23.1.0-1.noarch                                                                                                                                                1/2 
  Verifying  : asrmanager-20.3.0-1.noarch                                                                                                                                                2/2 

Updated:
  asrmanager.noarch 0:23.1.0-1                                                                                                                                                               

Complete!

service asrm status
ASR Manager (pid 17323) is RUNNING.


odacli describe-component | tail -n 5
ASR                                     
                                          23.1.0                up-to-date          
HMP                                     
                                          2.4.9.0.601           up-to-date      

/opt/asrmanager/util/check_asr_status.sh
Checking ASR Manager status ..
PASS: ASR Manager (pid 17323) is RUNNING.
PASS: ASR Manager bundles state is active.
PASS: ASR Manager SNMP listener is running (SNMP port 162).
PASS: ASR Manager HTTP receiver is running (HTTP port 16161).
PASS: ASR Manager version 23.1.0.
PASS: ASR Manager database connectivity is working.
PASS: ASR Manager Oracle transport endpoint is set correctly. [https://transport.oracle.com]
PASS: ASR Manager site id B156B0E0F8A8AA314F21DFA1BD88046F.
PASS: ASR Manager logging level info.
PASS: ASR Manager process is running as asrmgr.
PASS: ASR Autoupdate bundles state is active.
FAIL: ASR Manager missing registration id.
Please refer to ASR documentation for troubleshooting steps.

It’s now OK, my ASR manager is running with the correct version. I can now configure it with odacli configure-asr: my ODA will then be able to open a Service Request as soon as a hardware failure is detected.

Conclusion

In normal conditions, ASR manager is updated without any issue when appyling the system patch. But if you’re stuck with an old version, you can easily upgrade it manually without any problem.