Reconnecting or adding an VMware ESXi host to VMware vCenter Server fails with the error: Agent can't send heartbeats because socket address structure initialization is failing
search cancel

Reconnecting or adding an VMware ESXi host to VMware vCenter Server fails with the error: Agent can't send heartbeats because socket address structure initialization is failing

book

Article ID: 327840

calendar_today

Updated On:

Products

VMware vSphere ESXi VMware vCenter Server

Issue/Introduction

Symptoms:

  • Reconnecting or adding VMware ESXi host to VMware vCenter Server completes the task but displays a warning with the error.
  • You see the error:

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


  • The file is located at /etc/vmware/vpx/vpxa.cfg on the host contains the fully qualified domain name of the vCenter Server.

    For example:

    <vpxa>
    <bundleVersion>1000000</bundleVersion>
    <datastorePrincipal>root</datastorePrincipal>
    <hostIp>host-ip</hostIp>
    <hostKey>xxxxxxx-xxx-xxxxxxx-xxxxxxxxxx</hostKey>
    <hostPort>443</hostPort>
    <licenseExpiryNotificationThreshold>15</licenseExpiryNotificationThreshold>
    <memoryCheckerTimeInSecs>30</memoryCheckerTimeInSecs>
    <serverIp>FQDNofvCenterServer</serverIp>
    <serverPort>902</serverPort>
    </vpxa>
    <workingDir>/var/log/vmware/vpx</workingDir>

  • The file is located at /var/log/vpxa/log contains the error similar to:

    YYYY-MM-DD TIME Z [FFC991A0 error 'Heartbeat' opID=SWI-885de201] Unable to get the socket address structure for the server address :FQDNofvCenterServer



Cause

This issue occurs when the vpxa.cfg file is created on the ESXi host using the fully qualified domain name of the vCenter Server from the managed_ip value within the vCenter Server database. This value is expected to be an IP address.

During the initial connection, vCenter Server connects to the ESXi host through the hostd process. Upon configuration, vCenter Server applies the necessary settings for the vpxa process which is used by vCenter Server to communicate to the host.

Resolution

To resolve this issue:


Additional Information

To verify the vCenter Server Managed IP address within the vCenter Server database, execute this SQL query:

select id,dns_name,management_ip from vpx_host where dns_name like 'vCenterFQDN'

To update the Managed IP address directly within the vCenter Server database:
  1. Take a backup of the vCenter Server database.
  2. Stop the vCenter Server service.
  3. Execute this SQL query on the vCenter Server database:

    update vpx_host set management_ip = 'Correct vCenter Server IP Address'

  4. Start the vCenter Server service.
  5. Reconnect the ESXi host(s).
Verifying the VMware vCenter Server Managed IP Address
VMware ESXi ホストを vCenter Server へ再接続または追加しようとすると失敗し、次のエラーが表示される: Agent can't send heartbeats because socket address structure initialization is failing