Receive error "Resource with same key already exists" connecting to multiple Oracle database instances on the same host:port with the Management Pack for Oracle Database
search cancel

Receive error "Resource with same key already exists" connecting to multiple Oracle database instances on the same host:port with the Management Pack for Oracle Database

book

Article ID: 325370

calendar_today

Updated On:

Products

VMware Aria Suite

Issue/Introduction

  • Receiving "Failed to create AI resource. Resource with same key already exists." error when adding additional oracle DB instances as new adapters.
  • Your current Oracle infrastructure has many servers in cluster mode with multiple different services/SID per host.

Environment

VMware Aria Operations 8.x
Management Pack for Oracle Database version 4.x+

Cause

The Management Pack for Oracle Database only considers the server hostname and port when considering the adapter's uniqueness.

Resolution

Workaround 1

If there are only 2 database instances on the same Oracle host, the IP can be used for 1 adapter instance and the hostname can be used to configure the second adapter instance.

Workaround 2

Add aliases for each Oracle instance that shares a hostname and port to the local hosts file on each node that will host an Oracle adapter instance. If the adapter instance is assigned to a collector group, all cloud proxies in the group should have the hosts file updated.

Note: Any time the cloud proxy or analytic node is upgraded or patched, this workaround will need to be re-applied.

  1. Log in as root via SSH or vSphere console to the cloud proxy or analytic node that will host the Oracle adapters
  2. Add the desired alias to the hosts file
    sed -i '$ a\[ip] [alias]' /etc/hosts

    Note: Replace <ip> and <alias> with the IP of the Oracle database host and the alias you would like to refer to it as in the adapter configuration.

    Example:
    sed -i '$ a\10.1.2.3 oracledb1.example.com' /etc/hosts

  3. Repeat step 2 to create the necessary number of aliases to address all instances provided on the same Oracle host and port.
  4. Repeat steps 1-3 on all nodes that will host the oracle adapters.
  5. Configure multiple oracle adapters in Aria Operations using 1 of the aliases per adapter instance.

Workaround 3

Add CNAME records to the DNS server that is used by the cloud proxy or analytic node that hosts the Oracle adapter to provide multiple aliases for the same Oracle hostname.

Additional Information