vSphere Replication Management Server is attempting to establish connection to ESXI hosts that have been decommissioned
search cancel

vSphere Replication Management Server is attempting to establish connection to ESXI hosts that have been decommissioned

book

Article ID: 392932

calendar_today

Updated On:

Products

VMware Live Recovery VMware vSphere ESXi

Issue/Introduction

Symptoms:

  • ESXI hosts have been decommissioned from environment and are no longer present in the vCenter server.
  • 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!)'.

Environment

  • VMware Live Recovery

  • vSphere Replication 8.x

  • VCF Protection & Recovery 9.1.1

Cause

  • 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. 

  • From the logs located at /opt/vmware/hms/logs/hms.log it can be observed that the vSphere Replication Management Server (VRMS) cannot connect to the ESXi host:

####-##-## 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:  ####

  • The VRMS is unable to connect because the hosts are decommissioned and the IPs are stale entries in its vrmsdb.

Resolution

  1. Confirm the host has been removed from vCenter and removed from inventory:

    1. If so reboot the vSphere Replication appliance and check the status afterwards.

    2. A reboot of vSphere Replication will re-read the inventory from vCenter.

  2. 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:

    1. Snapshot Replication appliance on the site in which you have decommissioned ESXI host.

    2. Take note of ESXI host IP address from error message.

    3. SSH into vSphere replication appliance using Username - admin and change access to root account with command:
      $sudo -i


    4. Stop the vSphere replication appliance management service:
      $service hms stop


    5. Access the postgres database:

      $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

    6. Make the tables easier to read with the following command
      \x

    7. Run the following command to verify if ESXI host is still present in list of Replication Servers. Replace ## symbols with host IP address.
      select * from hbrserverentity where vsrv_address = '##.##.##.##' AND NOT EXISTS (select hbrserver_movalue from secondarygroupentity where hbrserverentity.movalue = secondarygroupentity.hbrserver_movalue);

      One record will be returned for the ESXI host.
      Example:


    8. Find the Entity ID for the entry that corresponds to ip address of the ESXI host in the Fault Entity table,
      select * from faultentity;

    9. Contact Broadcom Support to remove entries from database safely.