This article addresses a stack overflow error encountered in Aria Automation when enumerating a large number of NSX networks (over 1000) from vCenter. This error can prevent Aria Automation from collecting network information and lead to incomplete provisioning or configuration issues.
The error from the provisioning logs:
####-##-##T##:##:##Z ERROR provisioning [host='provisioning-service-app-123456-1234' thread='vsphere-enum-205' user='' org='' trace='' parent='' span=''] c.v.p.c.m.a.v.e.DatacenterEnumerationService.lambda$processNetworks$23:752 - [FQDN]:[/resources/endpoints/123456-1234-1234-1234-123456]: Failed collecting networks: java.util.concurrent.CompletionException: java.lang.StackOverflowError at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:315) at java.base/java.util.concurrent.CompletableFuture.uniApplyNow(CompletableFuture.java:687) at java.base/java.util.concurrent.CompletableFuture.uniApplyStage(CompletableFuture.java:662) at java.base/java.util.concurrent.CompletableFuture.thenApply(CompletableFuture.java:2168) at com.vmware.photon.controller.model.adapters.vsphere.remotecallmanager.vc.PcDomain.handleRetrieveResults(PcDomain.java:426) at com.vmware.photon.controller.model.adapters.vsphere.remotecallmanager.vc.PcDomain.lambda$handleRetrieveResults$13(PcDomain.java:441) at java.base/java.util.concurrent.CompletableFuture.uniHandle(CompletableFuture.java:934)
Aria Automation 8.16.x
Aria automation handles the recursive retrieval of network properties from vCenter using the "retrievePropertiesEx" method. This recursive approach can cause a stack overflow error when dealing with extensive network inventories.
The recommended solution is to upgrade Aria automation to version 8.16.1 or later. This version includes a fix that addresses the stack overflow issue:
1. The network enumeration implementation is changed from a recursive approach to an iterative one, eliminating the risk of stack overflow.
2. The page size for retrieving results from vCenter is increased from 25 to 100, reducing the number of API calls required.
Upgrading to Aria Automation 8.16.1 offers additional benefits beyond resolving the stack overflow error. It's recommended to review the Aria Automation 8.16.1 release notes for details on other improvements and bug fixes.