• Arun Nukula

vRA portal "Machine" tab exception

Updated: May 17, 2019


We get following exception by clicking on Machine tab on vRA portal

Error while retrieving resources from provider [Infrastructure Service] for resource type [Machine].

/var/log/vmware/vcac/catalina.out throws following exception

2018-03-15 09:25:31,027 vcac: [component="cafe:catalog" priority="INFO" thread="tomcat-http--37" tenant="vsphere.local" context="qXyeQEHe" parent="" token="qXyeQEHe"] com.vmware.vcac.catalog.controller.consumer.ConsumerResourceController.getResourcesByResourceType:267 - Retrieving resources for type [Infrastructure.Machine], managedOnly [true], withExtendedData[true], withOperations[true]

2018-03-15 09:25:31,070 vcac: [component="cafe:catalog" priority="ERROR" thread="tomcat-http--37" tenant="vsphere.local" context="qXyeQEHe" parent="" token="qXyeQEHe"] com.vmware.vcac.catalog.service.impl.ConsumerResourceServiceImpl.extendResourcesWithProviderData:803 - Error retrieving Resources from provider. Reason:org.springframework.web.client.HttpClientErrorException: 404

at org.springframework.web.client.DefaultResponseErrorHandler.handleError(DefaultResponseErrorHandler.java:91) ~[spring-web-4.2.8.RELEASE.jar:4.2.8.RELEASE]

at com.vmware.vcac.platform.rest.client.error.ResponseErrorHandler.handleError(ResponseErrorHandler.java:61) ~[platform-rest-client-7.2.0-SNAPSHOT.jar:?]

at org.springframework.web.client.RestTemplate.handleResponse(RestTemplate.java:641) ~[spring-web-4.2.8.RELEASE.jar:4.2.8.RELEASE]

at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:597) ~[spring-web-4.2.8.RELEASE.jar:4.2.8.RELEASE]

at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:572) ~[spring-web-4.2.8.RELEASE.jar:4.2.8.RELEASE]

at org.springframework.web.client.RestTemplate.getForObject(RestTemplate.java:280) ~[spring-web-4.2.8.RELEASE.jar:4.2.8.RELEASE]

at com.vmware.vcac.platform.rest.client.impl.RestClientImpl.get(RestClientImpl.java:313) ~[platform-rest-client-7.2.0-SNAPSHOT.jar:?]

at com.vmware.vcac.platform.rest.client.services.AbstractService.get(AbstractService.java:67) ~[platform-rest-client-7.2.0-SNAPSHOT.jar:?]

at com.vmware.vcac.core.componentregistry.rest.client.service.RegistryService.getEndPoint(RegistryService.java:141) ~[component-registry-client-rest-service-7.2.0-SNAPSHOT.jar:?]

at com.vmware.vcac.core.componentregistry.rest.client.SolutionRestClientManager.getEndpoint(SolutionRestClientManager.java:166) ~[component-registry-client-rest-service-7.2.0-SNAPSHOT.jar:?]

at com.vmware.vcac.core.componentregistry.rest.client.SolutionRestClientManager.credentialPropagatingRestClientByService(SolutionRestClientManager.java:209) ~[component-registry-client-rest-service-7.2.0-SNAPSHOT.jar:?]

at com.vmware.vcac.catalog.provider.gateway.impl.ProviderResourceGatewayImpl.createRestClient(ProviderResourceGatewayImpl.java:134) ~[classes/:?]

at com.vmware.vcac.catalog.provider.gateway.impl.ProviderResourceGatewayImpl.getResourcesFromProvider(ProviderResourceGatewayImpl.java:100) ~[classes/:?]

at com.vmware.vcac.catalog.service.impl.ConsumerResourceServiceImpl.extendResourcesWithProviderData(ConsumerResourceServiceImpl.java:801) [classes/:?]

at com.vmware.vcac.catalog.service.impl.ConsumerResourceServiceImpl.getResourcesByType(ConsumerResourceServiceImpl.java:307) [classes/:?]

Before getting into resolution section it's mandatory backup vRA vPostgres database

Also ensure snapshots are taken on vRA components , including IAAS servers

Resolution

After connecting to vRA database execute following query

select * from cat_provider;

Verify if you have two com.vmware.csp.iaas.blueprint.service providertype_id's

Check the time mentioned under lastsync column. This would give an idea on what's the latest id for com.vmware.csp.iaas.blueprint.service

Now make note of two IaaS proxy services

Two Iaas Proxy services - Old one: XXXX New one: YYYY

Please perform the following steps to clean up:

  • Verify the states of the database is still intact.

select * from cat_provider where name ='{com.vmware.csp.component.iaas.proxy.provider@iaasservice.name}'; Expected result: Two entries are still there: XXXX and YYYY select * from service_info where name = 'iaas-service'; Expected result: Only one entry returned: YYYY

  • If the results in previous step what are not expect then please STOP. Otherwise proceed to next Step

  • Backup vRA vPostgres Database ( Skip if you have done this before ), before starting this procedure

  • ssh to vRA appliance where DB is present using root account change directory psql location

  • cd /opt/vmware/vpostgres/current/bin/

  • Switch to postgres using command "su postgres"

  • Start psql by command "./psql"

  • Connect to "vcac" database by command "\connect vcac"

  • With above commands you now have psql session connecting to vRA Cafe vcac database.

  • Run the following sql commands: delete from cat_catalogitem where provider_id='YYYY'; update cat_catalogitem set provider_id='YYYY' where provider_id='XXXX'; update cat_catalogitemtype SET provider_id='YYYY' WHERE provider_id='XXXX'; update cat_resource set provider_id='YYYY' where provider_id='XXXX'; update cat_request set provider_id='YYYY' where provider_id='XXXX'; update cat_requestcomponent set providerid='YYYY' where providerid='XXXX'; update comp_bprequest set callbackserviceid='YYYY' where callbackserviceid='XXXX'; update comp_component_res set provider_id='YYYY' where provider_id='XXXX'; update comp_componenttype set serviceid='YYYY' where serviceid='XXXX'; update comp_comprequest set provider_id='YYYY' where provider_id='XXXX'; delete from cat_provider where id = 'XXXX';

  • Now after cleaning up database , machine's tab and item's tab should now be functional

  • If in doubt in any of these above steps get in touch with VMware Support

#vRealizeAutomation

229 views

Recent Posts

See All

Subscribe Now

  • Twitter
  • Facebook Social Icon

Copyright © 2019 nukescloud