The hostd.log file contains the error: Address family not supported by protocol
search cancel

The hostd.log file contains the error: Address family not supported by protocol

book

Article ID: 306002

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

Symptoms:
  • The VMware ESX host is not responding in vCenter Server.
  • The vSphere Client cannot connect directly to the ESX host.
  • When running the command service mgmt-vmware restart, the VMware management agents do not restart successfully.
  • The /var/log/hostd.log file contains entries similar to:

    [14:26:26.220 F667D6D0 panic 'App'] error: Address family not supported by protocol
    [14:26:26.220 F667D6D0 panic 'App'] backtrace:
    [00] eip 0xf7cac925

    [13:00:49.314 F66DD6D0 panic 'App'] error: Cannot assign requested address
    [13:00:49.314 F66DD6D0 panic 'App'] backtrace:
    [00] eip 0xf7ced635 [01] eip 0xf7bda4e0


Environment

VMware ESX 4.1.x
VMware ESX 4.0.x

Resolution

This issue is caused by a corrupted /etc/hosts file on the VMware ESX host, when attempting to modify the service console networking information. For more information on changing the networking information of the service console, see Changing the IP address, default gateway, and hostname of the Service Console in ESX (4309499).
To resolve this issues, ensure that /etc/hosts contains the correct entries for Service Console:
  1. Log in to the ESX host service console.
  2. Run this command to determine the ESX hosts service console IP address and interface name:

    esxcfg-vswif -l

    You see an output similar to:

    Name Port Group/DVPort IP Family IP Address Netmask Broadcast Enabled TYPE
    vswif0 Service Console IPv4 10.21.48.137 255.255.252.0 10.21.51.255 true STATIC

    Note: In the example, the IP address is 10.21.48.137 and the interface name is vswif0.

  3. Run this command to determine the value of the GATEWAY and HOSTNAME in the network configuration file:

    cat /etc/sysconfig/network

    You see an output similar to:

    NETWORKING=yes
    HOSTNAME=esxhost.test.local
    GATEWAY=10.21.51.254
    GATEWAYDEV=vswif0
    IPV6_AUTOCONF=no
    NETWORKING_IPV6=no


  4. Run the route command.

    You see an output similar to:

    Kernel IP routing table
    Destination Gateway Genmask Flags Metric Ref Use Iface
    10.21.48.0 * 255.255.252.0 U 0 0 0 vswif0
    169.254.0.0 * 255.255.0.0 U 0 0 0 vswif0
    default 10.21.51.254 0.0.0.0 UG 0 0 0 vswif0


    Verify that the GATEWAY value from Step 3 matches the Gateway value.

  5. Update the /etc/hosts file so that it includes the HOSTNAME from Step 3 and the IP address from Step 2. For more information, see Editing configuration files in VMware ESXi and ESX (1017022). If not already present, include the line:

    127.0.0.1 localhost.localdomain localhost .

    Ensure the file looks similar to:

    # Do not remove the following line, or various programs
    # that require network functionality will fail.
    127.0.0.1 localhost.localdomain localhost
    10.21.48.137 esxhost.test.local esxhost
    10.21.48.5 vcenter.test.local vcenter

  6. To restart the management agents, run the command:

    service mgmt-vmware restart

    For more information, see Restarting the Management agents on an ESXi or ESX host (1003490).


Additional Information

Restarting the Management agents in ESXi
Editing configuration files in VMware ESXi and ESX
Changing the IP address, default gateway, and hostname of the Service Console in ESX