vSphere replication is presenting the error message shown below:<esxi_host_fqdn>: vSphere Replication Management Server could not establish connection to vSphere Replication Server at '##.##.##.##:443'.
Decommissioned ESXi host may still appear in list of Site Recovery UI > Site Pair > vSphere Replication > Replication Servers and show up as "Disconnected":
Site Recovery UI displays error such as below,
Error - Unable to retrieve pairs from extension server at https://##.##.#.###:8043.Unable to login to 'HBR Management Server at https://##.##.#.###:8043'.
or
Error - Unable to retrieve pairs from extension server at https://##.##.#.###:8043.A generic error occurred in the vSphere Replication Management Server. Exception details: 'Error creating bean with name 'com.vmware.hms.remote.HmsServerImpl': Unsatisfied dependency expressed through field 'repositoryFactory'; nested exception is org.springframework.beans.factory.BeanCreationNotAllowedException: Error creating bean with name 'repositoryFactory': Singleton bean creation not allowed while singletons of this factory are in destruction (Do not request a bean from a BeanFactory in a destroy method implementation!)'.
VMware Live Recovery
vSphere Replication 8.x
The current issue arises when stale entries of disconnected or discontinued hosts still exist in the vSphere Replication server database (vrmsdb).
The ESXi hosts removed by the vCenter Server is faster than the vSphere Replication appliance, This leads to the retention of stale entries.
####-##-## 02:43:33.940 ERROR com.vmware.hms.net.hbr.ping.svr.4c4c4544-0042-4d10-8033-############ [hms-main-thread-3] (..net.impl.PersistentConnection) [] | Failed to connect to server ##.##.##.###:443/hbr####-##-## 02:47:45.837 ERROR com.vmware.hms.net.hbr.ping.svr.4c4c4544-0039-4d10-8033-############ [hms-main-thread-2] (..net.impl.PersistentConnection) [] | Failed to connect to s erver ##.##.##.###:443/hbr####-##-## 02:48:15.833 ERROR com.vmware.hms.net.hbr.ping.svr.4c4c4544-0042-4d10-8033-############ [hms-main-thread-1] (..net.impl.PersistentConnection) [] | Failed to connect to s erver ##.##.##.###:443/hbr####-##-## 02:48:45.833 ERROR com.vmware.hms.net.hbr.ping.svr.4c4c4544-0042-4d10-8033-############ [hms-main-scheduled-thread-14] (..net.impl.PersistentConnection) [operationID=152 fcdc8-ec22-4321-aa36-c55b8185e597-HMSINT-2] | Failed to connect to server ##.##.##.###:443/hbr
From the logs located at /opt/vmware/hms/logs/hms-stderr.log:
com.vmware.hms.db.entities.LockingFailedException: Failed to write-lock object: ####
Confirm the host has been removed from vCenter and removed from inventory:
If so reboot the vSphere Replication appliance and check the status afterwards.
A reboot of vSphere Replication will re-read the inventory from vCenter.
If a reboot of the replication appliance is unsuccessful then it would be required to perform the following. The stale hosts entries will need to be removed from the vSphere replication appliance database.
To find the Stale Host Entries:
$sudo -i
$service hms stop$cd /opt/vmware/vpostgres/current/bin
$./psql -U vrmsdb
Enter vrmsdb Password :
Note: To access vrmsdb password run below command
/opt/vmware/hms/bin/embedded_db_connect.sh
select * from hbrserverentity where vsrv_address = '##.##.##.##' AND NOT EXISTS (select hbrserver_movalue from secondarygroupentity where hbrserverentity.movalue = secondarygroupentity.hbrserver_movalue);select * from faultentity;Contact Broadcom Support to remove entries from database safely.