Search the VMware Knowledge Base (KB)
View by Article ID

Unable to retrieve over 100 machines in vRO workflow or vRA UI/API call (2149013)

  • 0 Ratings

Symptoms

  • Retrieving over 100 machines in vRealize Orchestrator (vRO) workflow or vRealize Automation (vRA) UI/API call fails.
  • In the vRealize Orchestrator server.log file, you see entries similar to:

    016-12-22 13:22:23.689+0000 [https-jsse-nio-0.0.0.0-8281-exec-7] ERROR {} [ResponseErrorHandler] [Rest Composite Exception]: ( [Rest Error]: {Status code: 400}, {Error code: 20152} , {Error Source: null}, {Error Msg: Error while retrieving resources from provider [Infrastructure Service] for resource type [Machine].}, {System Msg: Error while retrieving resources from provider [{com.vmware.csp.component.iaas.proxy.provider@iaasservice.name}] for resource type [{com.vmware.csp.component.iaas.proxy.provider@resource.type.registration.name.Infrastructure.Machine}].} ) ( [Rest Error]: {Status code: 400}, {Error code: 42000} , {Error Source: null}, {Error Msg: Request was denied due to exceeded resource size limit. The maximum number of resources allowed is 100.}, {System Msg: Infrastructure service provider error: Request was denied due to exceeded resource size limit. The maximum number of resources allowed is 100.} )
    2016-12-22 13:22:23.690+0000 [https-jsse-nio-0.0.0.0-8281-exec-7] ERROR {} [InventoryService] findChildrenInRelation error! host: everyone (a26127ad-e702-4662-8c8a-1abcdcf98669), type: VCACHost, id: a26127ad-e702-4662-8c8a-1abcdcf98669, relationName: CatalogResource, exception: com.vmware.vcac.platform.rest.client.error.RestCompositeException: [Rest Composite Exception]: ( [Rest Error]: {Status code: 400}, {Error code: 20152} , {Error Source: null}, {Error Msg: Error while retrieving resources from provider [Infrastructure Service] for resource type [Machine].}, {System Msg: Error while retrieving resources from provider [{com.vmware.csp.component.iaas.proxy.provider@iaasservice.name}] for resource type [{com.vmware.csp.component.iaas.proxy.provider@resource.type.registration.name.Infrastructure.Machine}].} ) ( [Rest Error]: {Status code: 400}, {Error code: 42000} , {Error Source: null}, {Error Msg: Request was denied due to exceeded resource size limit. The maximum number of resources allowed is 100.}, {System Msg: Infrastructure service provider error: Request was denied due to exceeded resource size limit. The maximum number of resources allowed is 100

  • In the IaaS Web Server WAPI Elmah logs located at <Install drive>\Program Files (x86)\Vmware\vCAC\Web API\Logs\Elmah, you see entries similar to:

    Request was denied due to exceeded resource size limit. The maximum number of resources allowed is 100.

  • In the vRealize Automation logs located at /var/log/vmware/vcac/catalina.out file, you see the error:

    {"code":42000,"message":"Request was denied due to exceeded resource size limit. The maximum number of resources allowed is 100.","systemMessage":"Infrastructure service provider error: Request was denied due to exceeded resource size limit. The maximum number of resources allowed is 100.","moreInfoUrl":null}

Note: The preceding log excerpts are only examples. Date, time, and environmental variables may vary depending on your environment.

Cause

In vRealize Automation 7.2  there was a change introduced to address failures when a large number of machines are queried which disallows retrieval of more than 100 machines at a time. 

Resolution

To resolve this issue using the REST API, specify the paging information by appending the following to the end of your API call:

?page=<page>&limit=<limit>

For Example:
 
When calling for catalogItems, this will look like:
 
https://<vrva-url>/catalog-service/api/consumer/catalogItems?page=1&limit=25
 
For more information on the vRA REST API and its functionality please refer to the documentation's vRealize Automation 7.2 Developer Resources Guide .
 
To workaround this issue in a vRealize Orchestrator workflow, include host and pagination details for the vCAC plugin:
 
For example:
 
var myvCACCAFEOdataQuery = new vCACCAFEOdataQuery();
var myFilter = vCACCAFEFilterParam.substringOf("name" , "'" + nameFilter + "'");
myvCACCAFEOdataQuery.addFilter([myFilter]);
 
var myvCACCAFEPageOdataRequest = new vCACCAFEPageOdataRequest(page , pageLimit , myvCACCAFEOdataQuery);
 
var items = host.createCatalogClient().getCatalogConsumerCatalogItemService().getCatalogItems(myvCACCAFEPageOdataRequest);
System.log(items);

Additional Information

Note: Pagination is not supported in the inventory tree of vRO and pagination is not supported in find/find all methods in the vCAC plugin.

Tags

vRealize Automation, vRealize Orchestrator, vRA, vRO, REST API, iaas-proxy, IaaS

Request a Product Feature

To request a new product feature or to provide feedback on a VMware product, please visit the Request a Product Feature page.

Feedback

  • 0 Ratings

Did this article help you?
This article resolved my issue.
This article did not resolve my issue.
This article helped but additional information was required to resolve my issue.

What can we do to improve this information? (4000 or fewer characters)




Please enter the Captcha code before clicking Submit.
  • 0 Ratings
Actions
KB: