"Resource not found for the segment 'VirtualMachineExts' " error repeating in the vRA logs
search cancel

"Resource not found for the segment 'VirtualMachineExts' " error repeating in the vRA logs

book

Article ID: 314927

calendar_today

Updated On:

Products

VMware Aria Suite

Issue/Introduction

Symptoms:
  • In the IaaS Model Manager web logs located at C:\Program Files (x86)\VMware\vCAC\Server\Model Manager Web\Logs\Repository file, you see entries similar to:

    [UTC:2016-09-25 16:02:50 Local:2016-09-25 10:02] [Error]: [sub-thread-Id="59" context token] System.Data.Services.DataServiceException: Resource not found for the segment 'VirtualMachineExts'.
    at System.Data.Services.Providers.DataServiceExecutionProviderWrapper.GetSingleResultFromRequest(SegmentInfo segmentInfo)
    at System.Data.Services.DataService`1.CompareETagAndWriteResponse(RequestDescription description, IDataService dataService, IODataResponseMessage responseMessage)
    at System.Data.Services.DataService`1.SerializeResponseBody(RequestDescription description, IDataService dataService, IODataResponseMessage responseMessage)
    at System.Data.Services.DataService`1.HandleRequest()

     
  • In the vRealize Automation Server logs located at /storage/log/vmware/vcac/catalina.out file , you see entries similar to:

    2016-10-05 14:12:59,350 vcac: [component="cafe:iaas-proxy" priority="INFO" thread="completeIpamRequests-1" tenant context token] com.vmware.vcac.iaas.service.impl.MachineAllocationServiceImpl.buildAllocationInfo:116 - Building allocation info for cluster [[<UUID>]]
    2016-10-05 14:12:59,361 vcac: [component="cafe:iaas-proxy" priority="ERROR" thread="completeIpamRequests-1" tenant context token] com.vmware.vcac.iaas.service.impl.AsyncIPAllocationResponseServiceImpl.checkForPendingIpamRequests:165 - Exception when processing ipam requests for machine cluster [<UUID>]. Skipping over this cluster and continuing. Exception message:> [HTTP/1.1 404 Not Found : <?xml version="1.0" encoding="utf-8"?><m:error xmlns:m=" </SPAN><?xml:namespace prefix = "m" /><m:code'>http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><m:code /><m:message xml:lang="en-US">Resource not found for the segment 'VirtualMachineExts'.</m:message></m:error>]
    2016-10-05 14:13:04,365 vcac: [component="cafe:iaas-proxy" priority="INFO" thread="completeIpamRequests-1" tenant context token] com.vmware.vcac.iaas.service.impl.AsyncIPAllocationResponseServiceImpl.checkForPendingIpamRequestsForCluster:213 - IP allocation for all machines in cluster [<UUID>] has been completed
    2016-10-05 14:13:04,387 vcac: [component="cafe:iaas-proxy" priority="INFO" thread="completeIpamRequests-1" tenant context token] com.vmware.vcac.iaas.service.impl.MachineAllocationServiceImpl.buildAllocationInfo:116 - Building allocation info for cluster [[<UUID>]]
    2016-10-05 14:13:04,398 vcac: [component="cafe:iaas-proxy" priority="ERROR" thread="completeIpamRequests-1" tenant context token] com.vmware.vcac.iaas.service.impl.AsyncIPAllocationResponseServiceImpl.checkForPendingIpamRequests:165 - Exception when processing ipam requests for machine cluster [<UUID>]. Skipping over this cluster and continuing. Exception message:> [HTTP/1.1 404 Not Found : <?xml version="1.0" encoding="utf-8"?><m:error xmlns:m="</SPAN><m:code'>http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><m:code /><m:message xml:lang="en-US">Resource not found for the segment 'VirtualMachineExts'.</m:message></m:error>]

    </m:code'></m:code'>

<m:code'><m:code'>Note: The preceding log excerpts are only examples. Date, time, and environmental variables may vary depending on your environment.</m:code'></m:code'>


Environment

VMware vRealize Automation 7.1.x
VMware vRealize Automation 6.2.x
VMware vRealize Automation 7.0.x

Cause

While vRealize Automation finalizes the IP address allocation process for a machine, vRealize Automation attempts to fetch the machine from the database. This issue occurs when the machine record no longer exists.

Resolution

This issue is resolved in vRealize Automation 7.2, available at VMware Downloads.
 
To work around this issue if you do not want to upgrade, manually cleanup the affected records in the IPAM request table. This prevents vRealize Automation from retrying the request and stops the errors from occurring.
 
To manually cleanup the affected records in the IPAM request table:

Note: Take a backup or snapshot of vRealize Automation appliance.

 
  1. Log in to the vRealize Automation appliance through SSH using root credentials.
  2. Log in to postgres database.
     
    1. Navigate to /opt/vmware/vpostgres/current/bin
    2. Run the command:

      su postgres
       
    3. Run the command:

      ./psql vcac
       
    4. To extend the view in postgres, run the command:

      \x
       
  3. Confirm the record exists or not by running this command:

    SELECT * FROM IAAS_PROVIDER_IPAM_REQUESTS WHERE MACHINE_ID='xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx';

    Note: The Machine ID refers to the affected machine ID for which vRealize Automation fails to fetch from the database.
     
  4. Delete the record from the postgres database by running this command:

    DELETE FROM IAAS_PROVIDER_IPAM_REQUESTS WHERE MACHINE_ID='xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx';


Additional Information

Impact/Risks:
The error itself is harmless and has been addressed in vRealize Automation 7.2.