Getting apiErrorCode: 500 for API call "curl -X GET "https://Aria_Ops_FQDN/suite-api/api/credentialkinds"
search cancel

Getting apiErrorCode: 500 for API call "curl -X GET "https://Aria_Ops_FQDN/suite-api/api/credentialkinds"

book

Article ID: 401310

calendar_today

Updated On:

Products

VCF Operations/Automation (formerly VMware Aria Suite)

Issue/Introduction

API GET call "/api/credentialkinds" failed with error "httpStatusCode": 500 and "apiErrorCode": 500.

api.log

ERROR [ajp-nio-127.0.0.1-8010-exec-7, 9koSQA2ez3HMnCoibMl41kO0RQ811EnG] service.impl.ControllerFacadeFactory$ControllerFacadeInvocationHandler - Controller API call 'getCredentialKinds' has failed! Reason = [Failed to execute function 'ControllerInterface.getCredentialKinds : FunctionException: com.vmware.vcops.platform.gemfire.GemfireFunction$MethodInvocationException: NullPointerException: ]
==
==
WARN [ajp-nio-127.0.0.1-8010-exec-7, 9koSQA2ez3HMnCoibMl41kO0RQ811EnG] server.utils.ProxyUtils$AbstractServiceSource - Caught exception [ControllerExecutionException], which was one of the watch list items. so not raising flag
ERROR [ajp-nio-127.0.0.1-8010-exec-7, 9koSQA2ez3HMnCoibMl41kO0RQ811EnG] server.controller.AbstractBaseController - ControllerExecutionException caught before sending response.
com.vmware.ops.api.common.exceptions.Exceptions$ControllerExecutionException: Internal Server error, cause unknown.

Environment

Aria operations 8.18.x

Cause

Aria Management Pack Builder is malformed, causing apiErrorCode: 500.

To validate the issue, follow below steps:

  1. SSH to Aria operations Primary node and run below command:
    less $ALIVE_BASE/user/plugins/inbound/<ADAPTER_FOLDER_NAME>/conf/describe.xml

    (replace ADAPTER_FOLDER_NAME with each third-party adapter name configured).

  2.  Look for the <CredentialKind> which does not have any credential field similar to this one:  
    <CredentialKind key="TEST_CREDENTIAL" nameKey="4"></CredentialKind>

         this is an example of correct credential kind with credential fields:          

    <CredentialKinds>
        <CredentialKind key="Test_Credentials" nameKey="2">
             <CredentialField key="ACTION_USER" dispOrder="3" enum="false" isAutomaticallyManaged="" nameKey="30097" password="false" passwordAlphabet="" passwordLength="" type="string"/>
            <CredentialField key="ACTION_PASSWORD" dispOrder="4" enum="false" isAutomaticallyManaged="" nameKey="30098" password="true" passwordAlphabet="" passwordLength="" type="string"/>
        </CredentialKind>
        

 

Resolution

Note: Before following the Resolution steps validate the issue as described in Cause Section.

Resolution

  1. SSH to Aria operations Primary node
  2. Open describe.xml file located in the "$ALIVE_BASE/user/plugins/inbound/<ADAPTER_FOLDER_NAME>/conf/describe.xml"
  3. Delete the problematic Credential Kind which we found from the describe.xml file.
  4. Once deleted, increment adapter version in the describe.xml file, which is available in the beginning of the xml, similar to this one:
    <AdapterKind key="YOUR_ADAPTER_KIND_KEY" nameKey="1" version="151"

    For example: if the version is 151, you should set it to 152.

  5. Navigate to Product UI->Administration->Control Panel->Redescribe, click on your adapter and click Redescribe button.
  6. After receiving success message, make sure that the Describe Version of your adapter has changed to the one set in the step 3.