"vAPI Rejecting Logon on a Session" error in vRealize Orchestrator
search cancel

"vAPI Rejecting Logon on a Session" error in vRealize Orchestrator

book

Article ID: 393553

calendar_today

Updated On: 04-08-2025

Products

VMware Aria Suite

Issue/Introduction

During workflow deployment in vRealize Automation (vRA), users may encounter the following error:

com.vmware.vapi.std.errors.internal_server_error => {data=<unset>, error_type=INTERNAL_SERVER_ERROR, messages=[com.vmware.vapi.std.localizable_message => {args=[Rejecting login on a session where login failed], default_message=Provider method implementation threw unexpected exception: Rejecting login on a session where login failed, localized=<unset>, id=vapi.bindings.method.impl.unexpected, params=<unset>}]}


This error usually occurs due to exceeding the threshold limit of open connections within the vAPI.

Environment

VMware Aria Automation 8.x
VMware vCenter 8.x

Cause

The error arises when the number of open connections to the vCenter Server via the vAPI reaches a predefined threshold. This limit is enforced to prevent resource exhaustion and maintain system stability.

Resolution

To avoid this error and ensure smooth workflow execution, follow these steps:

1. Monitor Active and Idle Sessions:

  • Navigate to your vCenter Server
  • Access the Monitor tab.
  • Go to Task and Events and then Sessions.
  • Check the number of active and idle sessions. This will provide an understanding of your current session usage.

2. Implement Client Closure in Workflow Scripts:

When creating custom workflows in Aria Automation, ensure that each scriptable task includes a client.close() line at the end of the script, whi
This line explicitly closes the vAPI client connection after the task is completed, effectively releasing resources.

Example Code:

var client = null;
try {
 client = vapiEndpoint.client();
}
catch(err) {
  System.log("Err");
}
finally {
    System.log("Finally")
 client.close();
}

 

Note : The variable naming convention for the vAPI client can vary across workflows. While the example uses 'client', other workflows may utilize alternative names like 'session'.