"Failed to create AI resource. Resource with same key already exists" when attempting to re-create adapter instance in Aria Operations
search cancel

"Failed to create AI resource. Resource with same key already exists" when attempting to re-create adapter instance in Aria Operations

book

Article ID: 382929

calendar_today

Updated On: 02-04-2025

Products

VMware Aria Suite

Issue/Introduction

Symptom 1:

  • None of the integrations (outside of vCenter) are showing up under integrations.
  • When attempting to re-create a deleted adapter instance, the following error message is displayed in the UI:

    "Failed to create AI resource. Resource with same key already exists"

  • This adapter instance is no longer present in the UI.

Symptom 2:

  • Aria Operations gives "Failed to create AI resource. Resource with same key already exists" while trying to re-add a deleted adapter but adds it successfully when we hit OK on the error message and starts data collection.

In this case it may be necessary to use the API to delete this old adapter instance to remove from the system completely.

This article provides an example on how to delete an adapter instance from Aria Operations using Swagger API. 

Environment

Aria Operations 8.x

Cause

1. Users are logging in through vCenter SSO credentials, which are exact the same as Active Directory user credentials.

2. This issue may occur after deleting an adapter instance for troubleshooting purposes and then needing to add the adapter back into Aria Operations with the same information.

Resolution

Solution for Symptom 1:

1. If the adapter instances/integrations are supposed to be there, make sure users are logging in by using the correct SSO or credentials, as vCenter SSO does not have full visibility of the contents.

2. If the above is not the case, below are the steps on deleting an adapter instance from Aria Operations using API:

  1. Open the Swagger API page by visiting the URL: https://<AriaOpsFQDN>/suite-api/
  2. Get the adapter id by using Swagger API to run the following call:  "GET /api/adapters"
    • Below is an example of the output from this call, locate the id value for the relevant adapter as highlighted:

      {
        "adapterInstancesInfoDto" : [ {
          "resourceKey" : {
            "name" : "VC Adapter",
            "adapterKindKey" : "VMWARE",
            "resourceKindKey" : "Adapter"
          },
          "description" : "A vCenter Adapter Instance",
          "collectorId" : 1,
          "credentialInstanceId" : "UUID",
          "id" : "UUID"
        } ]
      }
    • Delete the intended adapter instance using the API call: "DELETE /api/adapters/{adapterId}", replacing adapterId with the ID of the adapter taken from the previous call.


NOTE:
We must keep "deleteResources" option set to false to make sure that existing data for that adapter in not deleted. If set to true, existing data would also be deleted along with the adapter.

 

Solution for Symptom 2:

  1. Copy adapter certificate thumbprint from certificates section by going to Administration> Trusted Certificated
  2. Go to Swagger UI using https://<AriaOps FQDN>/suite-api and authorize as admin
  3. Delete the certificate using API call: "DELETE /api/certificate

    4. After that, go back to Aria Operations UI and delete that adapter instance.

    5. You can re-add the same adapter instance now and it will not give any error.