top of page

Experienced Technology Product Manager adept at steering success throughout the entire product lifecycle, from conceptualization to market delivery. Proficient in market analysis, strategic planning, and effective team leadership, utilizing data-driven approaches for ongoing enhancements.

  • Twitter
  • LinkedIn
White Background

vRA Inventory Syncfails with error "java.util.NoSuchElementException: No value present"

Updated: Apr 24, 2022


While performing an Inventory Sync for vRealize Automation environment we've seen an error stating


 ERROR [scheduling-1] c.v.v.l.r.c.p.ProductInventorySyncPlanner -  -- Error queuing the engine request for performing product sync 
java.util.NoSuchElementException: No value present 


So how do you debug and resolve this problem ?



First of all let's understand what happens in the background when you initiate an inventory sync when it's working and compare it with this failed scenario


This will give us a picture on where the problem is and how to resolve it



Reference Log Snippet from my lab , taken from /var/log/vrlcm/vmware_vrlcm.log 

**** Inventory Sync starts here ****


2021-10-04 04:38:38.168 INFO  [http-nio-8080-exec-4] c.v.v.l.l.u.RequestSubmissionUtil -  -- ++++++++++++++++++ Creating request to Request_Service :::>>> { 
  "vmid" : "4026aa6b-4157-4da5-917b-f8b7952eadd5", 
  "transactionId" : null, 
  "requestName" : "productinventorysync", 
  "requestReason" : "VRA in Environment ARUN - Product Inventory Sync", 
  "requestType" : "PRODUCT_INVENTORY_SYNC", 
  "requestSource" : "3eb03039-1ea0-4924-b251-8fb14c63315c", 
  "requestSourceType" : "user", 
  "inputMap" : { 
    "environmentId" : "3eb03039-1ea0-4924-b251-8fb14c63315c", 
    "productId" : "vra", 
    "tenantId" : "" 
  }, 
  "outputMap" : { }, 
  "state" : "CREATED", 
  "executionId" : null, 
  "executionPath" : null, 
  "executionStatus" : null, 
  "errorCause" : null, 
  "resultSet" : null, 
  "isCancelEnabled" : null, 
  "lastUpdatedOn" : 1633322318167, 
  "createdBy" : null 
} 



**** Generates the request id ****


2021-10-04 04:38:38.172 INFO  [http-nio-8080-exec-4] c.v.v.l.l.u.RequestSubmissionUtil -  -- Generic Request Response : { 
  "requestId" : "4026aa6b-4157-4da5-917b-f8b7952eadd5" 
} 
2021-10-04 04:38:38.707 INFO  [scheduling-1] c.v.v.l.r.c.RequestProcessor -  -- Number of request to be processed : 1




**** Creates Spec ****


2021-10-04 04:38:38.725 INFO  [scheduling-1] c.v.v.l.r.c.p.ProductInventorySyncPlanner -  -- Creating spec for inventory sync for product : vra in environment : ARUN 
2021-10-04 04:38:38.725 INFO  [scheduling-1] c.v.v.l.r.u.InfrastructurePropertiesHelper -  -- VCF properties: { 
  "vcfEnabled" : false, 
  "sddcManagerDetails" : [ ] 
}




**** Finds the product id with vIDM ****
**** Since it's not a clustered environment it goes ahead and moves on with the Environment Planner   ****


2021-10-04 04:38:38.727 INFO  [scheduling-1] c.v.v.l.r.c.p.ProductInventorySyncPlanner -  -- Found product with id vidm 
2021-10-04 04:38:38.728 INFO  [scheduling-1] c.v.v.l.r.c.p.ProductInventorySyncPlanner -  -- CreateEnvironmentPlanner.addVsscImportStateMachine environmentId : 3eb03039-1ea0-4924-b251-8fb14c63315c 
2021-10-04 04:38:38.728 INFO  [scheduling-1] c.v.v.l.c.u.StringUtil -  -- QUERYING CONTENT :: ProductInventory::resources::dataCenters->8efd48d7-d813-408f-aa55-be997e4463f7 
2021-10-04 04:38:38.728 INFO  [scheduling-1] c.v.v.l.d.i.u.InventoryWriteUtil -  -- QUERY MAP LENGTH :: 3 
2021-10-04 04:38:38.728 INFO  [scheduling-1] c.v.v.l.d.i.u.InventorySchemaQueryUtil -  -- GETTING ROOT NODE FOR :: ProductInventory 
2021-10-04 04:38:38.831 INFO  [scheduling-1] c.v.v.l.c.u.StringUtil -  -- QUERYING CONTENT :: ProductInventory::resources::dataCenters->8efd48d7-d813-408f-aa55-be997e4463f7 
2021-10-04 04:38:38.831 INFO  [scheduling-1] c.v.v.l.d.i.u.InventoryWriteUtil -  -- QUERY MAP LENGTH :: 3 
2021-10-04 04:38:38.831 INFO  [scheduling-1] c.v.v.l.d.i.u.InventorySchemaQueryUtil -  -- GETTING ROOT NODE FOR :: ProductInventory 
2021-10-04 04:38:38.947 INFO  [scheduling-1] c.v.v.l.c.u.StringUtil -  -- QUERYING CONTENT :: ProductInventory::resources::dataCenters->8efd48d7-d813-408f-aa55-be997e4463f7::regions->default::zones->default::vCenters 
2021-10-04 04:38:38.947 INFO  [scheduling-1] c.v.v.l.d.i.u.InventoryWriteUtil -  -- QUERY MAP LENGTH :: 6 
2021-10-04 04:38:38.947 INFO  [scheduling-1] c.v.v.l.d.i.u.InventorySchemaQueryUtil -  -- GETTING ROOT NODE FOR :: ProductInventory 
2021-10-04 04:38:39.041 INFO  [scheduling-1] c.v.v.l.l.s.DataCenterServiceImpl -  -- VCENTER RESOURCE RETRIEVED IS 
{
*
*
*
aged\":true},{\"storageName\":\"ISOs\",\"totalSize\":6.333186977792E12,\"availableSize\":2.783035342848E12,\"isManaged\":true},{\"storageName\":\"local_13\",\"totalSize\":4.61977419776E11,\"availableSize\":4.6046117888E11,\"isManaged\":true},{\"storageName\":\"local_11\",\"totalSize\":4.61977419776E11,\"availableSize\":4.6046117888E11,\"isManaged\":true},{\"storageName\":\"local_14\",\"totalSize\":4.61977419776E11,\"availableSize\":4.6046117888E11,\"isManaged\":true}],\"networks\":[{\"network\":\"mgmtnetwork\",\"isManaged\":null},{\"network\":\"ncdvswitch-DVUplinks-1050\",\"isManaged\":null},{\"network\":\"vmnetwork\",\"isManaged\":null},{\"network\":\"storage\",\"isManaged\":null},{\"network\":\"vmdvswitch-DVUplinks-1055\",\"isManaged\":null}],\"virtualMachineTemplates\":[],\"isManaged\":null,\"clusterName\":\"nccluster\",\"resourcePools\":[{\"name\":\"tkgresourcegroup\",\"children\":null,\"morId\":\"resgroup-1046\"}]}],\"folders\":[{\"name\":\"harpreet\",\"morId\":\"group-v1039\",\"children\":null},{\"name\":\"vramanaged\",\"morId\":\"group-v1028\",\"children\":null},{\"name\":\"templates\",\"morId\":\"group-v42\",\"children\":null},{\"name\":\"infra\",\"morId\":\"group-v38\",\"children\":null},{\"name\":\"tkgmvms\",\"morId\":\"group-v1047\",\"children\":null},{\"name\":\"kubernetes\",\"morId\":\"group-v46\",\"children\":null}]}],\"templateCustomSpecs\":[],\"contentLibraries\":[],\"name\":\"nc\"}", 
    "vcUsername" : "arun@nc.com", 
    "vCenterHost" : "vc.nc.com", 
    "vCenterName" : "nc", 
    "vcPassword" : "JXJXJXJX", 
    "vcUsedAs" : "MANAGEMENT_AND_WORKLOAD" 
  }

In the environment where the failure was seen


**** Inventory Sync starts here **** 


2021-09-28 01:48:02.378 INFO  [http-nio-8080-exec-6] c.v.v.l.l.u.RequestSubmissionUtil -  -- ++++++++++++++++++ Creating request to Request_Service :::>>> { 
  "vmid" : "3a1ce775-f36f-4753-9c6a-83f09ef52647", 
  "transactionId" : null, 
  "requestName" : "productinventorysync", 
  "requestReason" : "VRA in Environment TESTENV - Product Inventory Sync", 
  "requestType" : "PRODUCT_INVENTORY_SYNC", 
  "requestSource" : "c150a269-6278-4f1e-b16a-fdc203756e11", 
  "requestSourceType" : "user", 
  "inputMap" : { 
    "environmentId" : "c1dd269-6278-4f1e-b16a-fdc2ddd756e11", 
    "productId" : "vra" 
  }, 
  "outputMap" : { }, 
  "state" : "CREATED", 
  "executionId" : null, 
  "executionPath" : null, 
  "executionStatus" : null, 
  "errorCause" : null, 
  "resultSet" : null, 
  "isCancelEnabled" : null, 
  "lastUpdatedOn" : 1632793682377, 
  "createdBy" : null 
} 



**** Generates the request id **** 


2021-09-28 01:48:02.384 INFO  [http-nio-8080-exec-6] c.v.v.l.l.u.RequestSubmissionUtil -  -- Generic Request Response : { 
  "requestId" : "3a1ce775-f36f-4753-9c6a-83f09ef52647" 
} 
2021-09-28 01:48:02.853 INFO  [scheduling-1] c.v.v.l.r.c.RequestProcessor -  -- Number of request to be processed : 1


**** Creates Spec **** 
**** Because this is a vCF Managed environment , we do see the properties of vCF listed below else , these would be blank ****

2021-09-28 01:48:02.863 INFO  [scheduling-1] c.v.v.l.r.c.p.ProductInventorySyncPlanner -  -- Creating spec for inventory sync for product : vra in environment : TESTENV
2021-09-28 01:48:02.863 INFO  [scheduling-1] c.v.v.l.r.u.UserLoginUtil -  -- Is local admin false 
2021-09-28 01:48:02.863 INFO  [scheduling-1] c.v.v.l.r.u.UserLoginUtil -  -- Is service admin false 
2021-09-28 01:48:02.863 INFO  [scheduling-1] c.v.v.l.r.u.UserLoginUtil -  -- Is VCF admin true 
2021-09-28 01:48:02.864 INFO  [scheduling-1] c.v.v.l.r.u.InfrastructurePropertiesHelper -  -- VCF properties: { 
  "vcfEnabled" : true, 
  "sddcManagerDetails" : [ { 
    "sddcManagerName" : "default", 
    "sddcManagerVmid" : "default", 
    "sddcManagerHostName" : "sddcmanager.nc.com", 
    "properties" : null 
  } ] 
}




**** Finds the product id with vIDM **** 


2021-09-28 01:48:02.866 INFO  [scheduling-1] c.v.v.l.r.c.p.ProductInventorySyncPlanner -  -- Found product with id vidm




**** Identifies vIDm clustered lb hostname  ****
**** Only occurs if vIDM is in clustered mode **** 

2021-09-28 01:48:02.866 INFO  [scheduling-1] c.v.v.l.r.c.p.CreateEnvironmentPlanner -  -- vIDM clustered LB hostname idm.nc.com




**** Exception occurs here  ****


2021-09-28 01:48:02.866 ERROR [scheduling-1] c.v.v.l.r.c.p.ProductInventorySyncPlanner -  -- Error queuing the engine request for performing product sync 
java.util.NoSuchElementException: No value present 
        at java.util.Optional.get(Unknown Source) ~[?:?] 
        at com.vmware.vrealize.lcm.requestservice.core.planner.ProductInventorySyncPlanner.processRequest(ProductInventorySyncPlanner.java:115) ~[vmlcm-requestservice-core-8.2.0-SNAPSHOT.jar!/:?] 
        at com.vmware.vrealize.lcm.requestservice.core.RequestProcessor.invokeExecutionPlanner(RequestProcessor.java:296) ~[vmlcm-requestservice-core-8.2.0-SNAPSHOT.jar!/:?] 
        at com.vmware.vrealize.lcm.requestservice.core.RequestProcessor$$FastClassBySpringCGLIB$$58375e43.invoke(<generated>) ~[vmlcm-requestservice-core-8.2.0-SNAPSHOT.jar!/:?] 
        at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218) ~[spring-core-5.1.17.RELEASE.jar!/:5.1.17.RELEASE] 
        at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:752) ~[spring-aop-5.1.17.RELEASE.jar!/:5.1.17.RELEASE] 
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) ~[spring-aop-5.1.17.RELEASE.jar!/:5.1.17.RELEASE] 
        at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:295) [spring-tx-5.1.17.RELEASE.jar!/:5.1.17.RELEASE] 
        at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:98) [spring-tx-5.1.17.RELEASE.jar!/:5.1.17.RELEASE] 
*
*
*
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:?] 
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:?] 
        at java.lang.Thread.run(Unknown Source) [?:?]
2021-09-28 01:48:02.878 INFO  [scheduling-1] c.v.v.l.r.c.RequestProcessor -  -- Engine Spec generated is null for Request ID : 3a1ce775-f36f-4753-9c6a-83f09ef52647, So marking the request as FAILED

What does the "no value present mean and what is it referring to ?


It's telling you that when we select the product in an environment it's does not see the product information and it's missing or null


Ideally it should be in this way , one should be able to see the nodes which constitute a product and it's properties




To resolve , all we had to do is to remove the product from inventory and then re-import it back to vRSLCM.


Remember when your deleting the product from vRSLCM never check "Delete VM's from vCenter" option. This will delete the whole VM's from vCenter. So be very careful and extra cautious.



874 views1 comment

1 Comment

Rated 0 out of 5 stars.
No ratings yet

Add a rating
bshaik109
Oct 06, 2021

Hello Arun, thanks for sharing knowledge. I am facing differnet issue while syncing images from vcenter, have you experienced this issue earlier in vra 8.4. Below is the error.


"Image synchronization failed when processing content library items. Cannot list libraries ( vapi.method.input.invalid.interface Cannot find service 'com.vmware.content.library'.)"

Like
bottom of page