Failed to get assigned tags details. Error occurred while getting assigned tags
When attempting to review ESX host details in the SDDC UI, the utilization details may not be available and an error may be presented in the summary - Failed to get assigned tags details. Error occurred while getting assigned tags.
When reviewing the commonservice.log file, an error similar tgo the following may be present:
ERROR [common,73e0c6ac6f50436a,e1e9] [c.v.e.s.t.r.a.TaggingServiceInternalController,http-nio-127.0.0.1-7100-exec-1699] Exception during assigned tags retrieval for resource of type: hosts, with id: 60b1587e-31dd-422f-9809-62329c5a5b74.org.springframework.web.client.HttpClientErrorException$Forbidden: 403 Forbidden on POST request for "https://<workload-vcenter-fqdn>/rest/com/vmware/cis/tagging/tag-association": "{"type":"com.vmware.vapi.std.errors.unauthorized","value":{"error_type":"UNAUTHORIZED","messages":[]}}"
When reviewing the postgres database for the ESX host, it is present an shown as ACTIVE:
# psql -h localhost -U postgres -d platform -c "select hostname,source_id, status from host"
hostname | id | statusesx07 | host-21 | ACTIVE
Reviewing the ESX host from managing vCenter Server UI may show that the host has a different ID:
In the above, the host has a source_id of "host-17" in the vCenter Server managing it
VCF 9.1
This is caused by the discrepancy between the ID seen in the vCenter Server and the ID for the host in the SDDC database.
To update the host ID in the SDDC database, run an inventory sync on the workload domain.
Login to the SDDC UI and go to Inventory and then Operate. Select the target workload and from the Actions drop-down, select Sync Inventory
Once completed, confirm that the source_id for the host has been updated in the SDDC database to match what is seen in vCenter.
# psql -h localhost -U postgres -d platform -c "select hostname,source_id, status from host"
hostname | id | statusesx07 | host-17 | ACTIVE