Error: "Unable to retrieve enhanced replication mappings data""A Runtime error occurred in the vSphere Replication Management Server. Exception deails: 'Duplicate key host-xxxx (attempted merging values 30004.0 and 30004.0)'.
Unable to retrieve pairs from extension server at https://vsphereReplication: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!)'. 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!)'.
Unable to retrieve pairs from extension server at https://Target-VR-FQDN:8043.Unable to connect to HBR Management Server at https://Target-VR-FQDN:8043. Reason: java.net.ConnectException: Connection refusedYYYY-MM-DD HH:MM:SS.### ERROR com.vmware.hms [main] (..vmware.hms.App) [] |
HMS SERVER ERROR
Caused by: org.hibernate.InstantiationException: could not instantiate test object : com.vmware.hms.db.entities.DiskEntity at org.hibernate.engine.internal.UnsavedValueFactory.instantiate(UnsavedValueFactory.java:43) ~[hibernate-core-#.#.#.Final.jar:#.#.#.Final] at org.hibernate.engine.internal.UnsavedValueFactory.getUnsavedIdentifierValue(UnsavedValueFactory.java:68) ~[hibernate-core-#.#.#.Final.jar:#.#.#.Final] at org.hibernate.tuple.PropertyFactory.buildIdentifierAttribute(PropertyFactory.java:62) ~[hibernate-core-#.#.#.Final.jar:#.#.#.Final] at orgCaused by: java.lang.reflect.InvocationTargetException at jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(Unknown Source) ~[?:?] at java.lang.reflect.Constructor.newInstanceWithCaller(Unknown Source
at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:641) ~[spring-beans-#.#.#.jar:#.#.#]Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'com.vmware.hms.db.entities.DiskEntity': Unsatisfied dependency expressed through field 'datastoreInfoMap'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'datastoreInfoMap': Unsatisfied dependency expressed through field 'hbrsrvuwMonitor'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hbrsrvuwMonitor' defined in com.vmware.hms.cfg.spring.ScaleOutEnabledConfiguration: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.vmware.hms.hbrsrvuw.HbrsrvuwMonitor]: Factory method 'hbrsrvuwMonitor' threw exception; nested exception is java.lang.IllegalStateException: Duplicate key host-###### (attempted merging values #########-####-####-####-############ and #######-####-####-####-###########)
vSphere Replication 9.x
Live Recovery 9.x
This issue occurs due to duplicate host entries in the vSphere Replication Server (VRMS) database, typically caused by:
hbrserverentity table.Log excerpt from /opt/vmware/log/hms.log:
2025-01-11 15:00:24.740 INFO com.vmware.hms.i18n.class com.vmware.hms.response.filter.I18nActivationResponseFilter [tcweb-35](..response.filter.I18nActivationResponseFilter) [operationID=e25ade59-70f0-4c48-adaa-2a4826974e97-HMS-1116092,sessionID=897A51D7] | The localized message is: A runtime error occurred in the vSphere Replication Management Server. Exception details: 'Duplicate key host-XXXXXX (attempted merging values 30004.0 and 30004.0)'.
Note: Ensure you have a valid backup or snapshot of the vSphere Replication appliances before making any database changes.
systemctl stop hms
For VLSR 9.0.1 and 9.0.2
/opt/vmware/hms/bin/embedded_db_connect.sh
For VLSR 9.0.3 (DPCA)
/opt/vmware/vpostgres/current/bin ]# ./psql -U vrmsdb -d vrmsdb
select hbrserver_movalue from hbrtagentity where hbrserver_movalue IN (select movalue from hbrserverentity where vsrv_port = 443 AND NOT EXISTS (select hbrserver_movalue from secondarygroupentity where hbrserverentity.movalue = secondarygroupentity.hbrserver_movalue));
select hbrservername,movalue from hbrserverentity where vsrv_port = 443 AND NOT EXISTS (select hbrserver_movalue from secondarygroupentity where hbrserverentity.movalue = secondarygroupentity.hbrserver_movalue);
delete from hbrtagentity where hbrserver_movalue IN (select movalue from hbrserverentity where vsrv_port = 443 AND NOT EXISTS (select hbrserver_movalue from secondarygroupentity where hbrserverentity.movalue = secondarygroupentity.hbrserver_movalue));
delete from hbrserverentity where vsrv_port = 443 AND NOT EXISTS (select hbrserver_movalue from secondarygroupentity where hbrserverentity.movalue = secondarygroupentity.hbrserver_movalue);
systemctl start hms