ESXi host disconnects from vCenter Server with the error: Agent can't send heartbeats because socket address structure initialization is failing
search cancel

ESXi host disconnects from vCenter Server with the error: Agent can't send heartbeats because socket address structure initialization is failing

book

Article ID: 306918

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

Symptoms:

  • ESXi host disconnects approximately 60 seconds after connecting to vCenter Server.
  • In the ESXi host summary tab, you see this message:

    Agent can't send heartbeats because socket address structure initialization is failing

  • In the vpxa.log file, located at /var/log/ on the ESXi host, you see error similar to:

    error 'Heartbeat' opID-SWI-e90acf6a Unable to get the socket address structure for the server address : x.x.x.x
    error 'Heartbeat' opID-SWI-e90acf6a Unable to get the socket address structure for the server address : x.x.x.x
    error 'Heartbeat' opID-SWI-e90acf6a Unable to get the socket address structure for the server address :x.x.x.x
    error 'Heartbeat' opID-SWI-e90acf6a Unable to get the socket address structure for the server address : x.x.x.x

  • The vpxa.cfg log file, located at /etc/vmware/vpxa/ on the ESXi host, lists different server IP address than the managing vCenter Server.

    For example:

    <serverIp>x.x.x.x</serverIp>



Environment

VMware vSphere ESXi 7.x
VMware vSphere ESXi 8.0

Cause

This issue occurs due to an incorrect IP address defined in the VirtualCenterManagedIP field within Advanced Settings of the vSphere Client.
 

Note: This is not referring to the vCenter Managed IP field in vCenter Server Settings > Runtime Settings

Resolution

To resolve this issue, update the VirtualCenterManagedIP with the correct IP address of vCenter Server.
 
To confirm the incorrect VirtualCenterManagedIP entry:
  1. Login to a console or SSH session to the host as root.
  2. Run this command:

    grep -i serverip /etc/vmware/vpxa/vpxa.cfg

  3. You see output similar to:

    <serverIp>x.x.x.x</serverIp>

  4. If the IP address displayed is different from IP address of the managing vCenter Server, VirtualCenterManagedIP entry is incorrect.
To change the VirtualCenterManagedIP entry:
  1. Login to a console or SSH session to the host as root.
  2. To stop the vpxa service, run this command:

    /etc/init.d/vpxa stop

    Note: This will cause the host to appear as disconnected from vCenter Server.

  3. Login to vCenter Server using the vSphere Web Client.
  4. Navigate to Administration>vCenter Server>Advanced Settings.
  5. Locate VirtualCenterManagedIP field and change the value to the current IP address of vCenter Server.
  6. Click OK.
  7. Right click on the disconnected host and select Reconnect.

    Note: It may be necessary to restart the vpxa service on the ESXi host by running the command:
    /etc/init.d/vpxa start