"Synchronize Inventory Versions" task failed in the SDDC Manager with error 'Cannot connect to vCenter'
search cancel

"Synchronize Inventory Versions" task failed in the SDDC Manager with error 'Cannot connect to vCenter'

book

Article ID: 439995

calendar_today

Updated On:

Products

VMware SDDC Manager / VCF Installer

Issue/Introduction

  • Inventory version synchronization failed with: Cannot connect to vCenter <vCenter_ID> of domain to complete inventory sync.

    Description

    Synchronize Inventory Versions

    Progress Messages

    Inventory version synchronization failed. Please try to fix the cause for the issue and retry the operation.

    Error

    Message: Inventory version synchronization failed. Please try to fix the cause for the issue and retry the operation.

    Remediation Message: Please ensure the following: Please ensure the vCenter

    <vCenterID> is up and running.

    Reference Token:######

    Cause: Inventory version synchronization failed with: Cannot connect to vCenter

    <vCenterID> of domain <domain_name> to complete inventory sync.

  • In /var/log/vmware/vcf/operationsmanager/operationsmanager.log the following stack trace is observed:

YYYY-MM-DDTHH:MM:SS.750+0000 DEBUG [vcf_om,######,####] [c.v.v.v.s.i.VersionSyncServiceImpl,pool-3-thread-1] Validating the result of the inventory sync:{
"entitiesToSync":["VCENTER","NSXT_CLUSTER","ESXI"],"entitiesToUpdate":[],"completedInventorySyncTasks":[{"entity":"NSXT_CLUSTER","syncStatus":"SUCCEEDED","errors":[]},{"entity":"VCENTER","syncStatus":"SUCCEEDED","errors":[]},{"entity":"ESXI","syncStatus":"FAILED","errors":[{"errorCode":"ESX_RESOURCE_VERSION_FETCH_FAILED","errorMessage":"Cannot connect to vCenter ########-####-####-####-######### of domain <domain_name> to complete inventory sync.","errorType":"ERROR","cause":"","remediation":"Please ensure the vCenter ########-####-####-####-######### is up and running."}]}],"failedInventorySyncTasks":[{"entity":"ESXI","syncStatus":"FAILED","errors":[{"errorCode":"ESX_RESOURCE_VERSION_FETCH_FAILED","errorMessage":"Cannot connect to vCenter ########-####-####-####-######### of domain <domain_name> to complete inventory sync.","errorType":"ERROR","cause":"","remediation":"Please ensure the vCenter ########-####-####-####-######### is up and running."}]}]}
YYYY-MM-DDTHH:MM:SS.751+0000 ERROR [vcf_om,########,####] [c.v.e.s.o.model.error.ErrorFactory,pool-3-thread-1] [######] VERSION_SYNC_FAILED Inventory version synchronization failed. Please try to fix the cause for the issue and retry the operation.
com.vmware.evo.sddc.common.core.error.InvalidStateException: Inventory version synchronization failed. Please try to fix the cause for the issue and retry the operation.
at com.vmware.vcf.versionsync.services.impl.VersionSyncServiceImpl.validateInventorySyncStatus(VersionSyncServiceImpl.java:91)
at com.vmware.vcf.versionsync.services.impl.VersionSyncServiceImpl.syncInventory(VersionSyncServiceImpl.java:43)
..
at java.base/java.lang.Thread.run(Thread.java:840)
Caused by: com.vmware.evo.sddc.common.core.error.InvalidStateException: Inventory version synchronization failed with: Cannot connect to vCenter ########-####-####-####-#########
of domain <domain_name> to complete inventory sync.
at com.vmware.vcf.versionsync.services.impl.VersionSyncServiceImpl.validateInventorySyncStatus(VersionSyncServiceImpl.java:89)
... 18 common frames omitted

Environment

  • VMware Cloud Foundation 5.x

Cause

This issue is typically caused by a mismatch between the physical state of the host and the records maintained in the SDDC Manager PostgreSQL database.

In this instance, the issue is caused due to presence of host IDs in the host table of the platform database with a status of 'ERROR', coupled with their absence from the vCenter inventory.

Resolution

Verification of Host Status:

  1. Establish an SSH session to the SDDC Manager as vcf then elevate to root. 

  2. Connect to the platform database:

    psql -h localhost -U postgres -d platform

  3. Check the status of the hosts in the database. Identify the hostnames and host IDs which need to be cleaned up.

    select id, hostname, status from host where status='ERROR' OR status='DEACTIVATING';

    Sample Output: 

                      id                  |       hostname        | status
    --------------------------------------+-----------------------+--------
     ########-####-####-####-############ | <hostfqdn>  | ERROR

  4. Based on the command output from step 3, the database inconsistencies require direct remediation of the underlying Postgres tables within the SDDC Manager instance.
    Because manual database modifications carry risk and can impact cluster management operations if executed improperly, specific updates must be performed under guidance.
    Please contact Broadcom Support to open a service request and initiate live, on-call troubleshooting assistance to resolve the database state.

Additional Information

An SDDC Manager log bundle may be required by Broadcom Support to assist with further analysis and troubleshooting.