Resolving OCI Management Agent installation error

Problem

Getting "Error: Transaction failed" when installing the Oracle Management Agent which is downloaded from the OCI console.

These are the steps I performed:

  1. Navigate to "Observability & Management", then click on "Management Agent"
  2. Click on "Download and Keys"
  3. Download the Agent for LINUX (X86_64) RPM (filename: oracle.mgmt_agent.230427.2233.Linux-x86_64.rpm)
  4. Transfer the RPM to my Linux host
  5. As root, install Java 11:
yum install java

6.  As root, run the command:

yum install -y oracle.mgmt_agent.230427.2233.Linux-x86_64.rpm
OCI console to download the Management Agent installation binaries
Error after installation of Management Agent

Solution

Apparently the OCI Management Agent does not support Java 11, and only supports JDK 8u281+.

Java 8 can be downloaded from https://www.oracle.com/in/java/technologies/javase/javase8u211-later-archive-downloads.html.

Here are the steps to uninstall Java 11, install Java 8, and install the Agent:

# ----------------------------------------
# Uninstall JDK 11
# ----------------------------------------

root@dev:/tmp> yum remove java
This system is receiving updates from OSMS server.
Dependencies resolved.
==================================================================================================================================================================================
 Package                                Architecture                      Version                                       Repository                                           Size
==================================================================================================================================================================================
Removing:
 jdk-11.0.10                            x86_64                            2000:11.0.10-ga                               @ol8_oci_included-x86_64                            292 M

Transaction Summary
==================================================================================================================================================================================
Remove  1 Package

Freed space: 292 M
Is this ok [y/N]: y
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                                                          1/1
  Running scriptlet: jdk-11.0.10-2000:11.0.10-ga.x86_64                                                                                                                       1/1
  Erasing          : jdk-11.0.10-2000:11.0.10-ga.x86_64                                                                                                                       1/1
  Running scriptlet: jdk-11.0.10-2000:11.0.10-ga.x86_64                                                                                                                       1/1
  Verifying        : jdk-11.0.10-2000:11.0.10-ga.x86_64                                                                                                                       1/1

Removed:
  jdk-11.0.10-2000:11.0.10-ga.x86_64

Complete!

# ----------------------------------------
# Install Java 8
# ----------------------------------------

root@dev:/tmp> rpm -i jdk-8u361-linux-x64.rpm
warning: jdk-8u361-linux-x64.rpm: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY
Unpacking JAR files...
        tools.jar...
        plugin.jar...
        javaws.jar...
        deploy.jar...
        rt.jar...
        jsse.jar...
        charsets.jar...
        localedata.jar...
root@dev:/tmp> java -version
java version "1.8.0_361"
Java(TM) SE Runtime Environment (build 1.8.0_361-b09)
Java HotSpot(TM) 64-Bit Server VM (build 25.361-b09, mixed mode)

# ----------------------------------------
# Install the OCI Management Agent
# ----------------------------------------

root@dev:/tmp> yum install -y oracle.mgmt_agent.230427.2233.Linux-x86_64.rpm
This system is receiving updates from OSMS server.
Last metadata expiration check: 0:53:05 ago on Tue 30 May 2023 05:32:59 PM GMT.
Dependencies resolved.
==================================================================================================================================================================================
 Package                                        Architecture                        Version                                       Repository                                 Size
==================================================================================================================================================================================
Installing:
 oracle.mgmt_agent                              x86_64                              230427.2233-1                                 @commandline                               93 M

Transaction Summary
==================================================================================================================================================================================
Install  1 Package

Total size: 93 M
Installed size: 93 M
Downloading Packages:
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                                                          1/1
  Running scriptlet: oracle.mgmt_agent-230427.2233-1.x86_64                                                                                                                   1/1
Checking pre-requisites
        Checking if any previous agent service exists
        Checking if OS has systemd or initd
        Checking available disk space for agent install
        Checking if /opt/oracle/mgmt_agent directory exists
        Checking if 'mgmt_agent' user exists
                'mgmt_agent' user already exists, the agent will proceed installation without creating a new one.
        Checking Java version
                JAVA_HOME is not set or not readable to root
                Trying default path /usr/bin/java
                Java version: 1.8.0_361 found at /usr/bin/java
        Checking agent version

  Installing       : oracle.mgmt_agent-230427.2233-1.x86_64                                                                                                                   1/1
  Running scriptlet: oracle.mgmt_agent-230427.2233-1.x86_64                                                                                                                   1/1

Executing install
        Unpacking software zip
        Copying files to destination dir (/opt/oracle/mgmt_agent)
        Initializing software from template
        Checking if JavaScript engine is available to use
        Creating mgmt_agent daemon
        Agent Install Logs: /opt/oracle/mgmt_agent/installer-logs/installer.log.0

        Setup agent using input response file (run as any user with 'sudo' privileges)
        Usage:
                sudo /opt/oracle/mgmt_agent/agent_inst/bin/setup.sh opts=[FULL_PATH_TO_INPUT.RSP]

Agent install successful


  Verifying        : oracle.mgmt_agent-230427.2233-1.x86_64                                                                                                                   1/1

Installed:
  oracle.mgmt_agent-230427.2233-1.x86_64

Complete!