Error " Cannot contact host " when trying to add a host in vCenter
search cancel

Error " Cannot contact host " when trying to add a host in vCenter

book

Article ID: 432849

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

Receiving error " Cannot contact host " when trying to add a host in vCenter , reference screenshot below

Environment

VMware ESXi Server

Cause

When adding a host and you receive " Cannot contact host " error, but you are able to connect to the Local ESXi Web console by IP and you are able to ping the ESXi host by IP.

But when you use FQDN it fails to connect to Local ESXi Web console and ping by FQDN responds back but it shows the incorrect ESXi host IP.

Pinging from another ESXi host

When you attempt to run an nslookup against the current ESXi host IP and it fails

[root@test02:] nslookup xxx.xxx.10.103
Server:         xxx.xxx.xxx.90
Address:        xxx.xxx.xxx.90:53

** server can't find 103.10.xxx.xxx.in-addr.arpa: NXDOMAIN

When you attempt to run an nslookup with current ESXi FQDN but it returns a different IP from DNS record

[root@test02:] nslookup test03.domain.local
Server:         xxx.xxx.xxx.90
Address:        xxx.xxx.xxx.90:53

Name:   test03.domain.local
Address: xxx.xxx.5.103

When you ping the ESXi host by current IP and its successful

[root@test02:] ping xxx.xxx.10.103
PING xxx.xxx.10.103 (xxx.xxx.10.103) 56(84) bytes of data.
64 bytes from xxx.xxx.10.103: icmp_seq=1 ttl=64 time=0.017 ms
64 bytes from xxx.xxx.10.103: icmp_seq=2 ttl=64 time=0.038 ms
64 bytes from xxx.xxx.10.103: icmp_seq=3 ttl=64 time=0.028 ms
64 bytes from xxx.xxx.10.103: icmp_seq=4 ttl=64 time=0.032 ms
64 bytes from xxx.xxx.10.103: icmp_seq=5 ttl=64 time=0.035 ms

 

Pinging from local Windows client

When you ping the current ESXi host by IP and its successful

C:\>ping -a xxx.xxx.10.103

Pinging xxx.xxx.10.103 with 32 bytes of data:
Reply from xxx.xxx.10.103: bytes=32 time<1ms TTL=64
Reply from xxx.xxx.10.103: bytes=32 time<1ms TTL=64
Reply from xxx.xxx.10.103: bytes=32 time<1ms TTL=64
Reply from xxx.xxx.10.103: bytes=32 time<1ms TTL=64

Ping statistics for xxx.xxx.10.103:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 0ms, Maximum = 0ms, Average = 0ms

When you attempt to run a nslookup with current ESXi FQDN but it returns a different IP from DNS record

C:\>nslookup test03.domain.local
Server:  localhost
Address:  ::1

Name:    test03.domain.local
Address:  xxx.xxx.5.103

When you attempt to run an nslookup against the current ESXi host IP and it fails

C:\>nslookup xxx.xxx.10.103
Server:  localhost
Address:  ::1

*** localhost can't find xxx.xxx.10.103: Non-existent domain

 

 

 

Resolution

To resolve the issue you need to verify that your DNS record has the correct IP address to respond for the FQDN of the host.

  1. Access your DNS Server (e.g. Windows DNS Manager).
  2. Locate the Forward Lookup Zone and Reverse Lookup Zone for your management network.
  3. Open Forward Lookup Zone and search for the ESXi host's Name.
  4. Confirm the IP associated with ESXi host FQDN entry, if its incorrect update the DNS record to reflect the correct IP and make sure you select Checkbox for " Create associated pointer (PTR) record. This will update your Reverse DNS entry
  5. Ensure only One DNS record for the ESXi host exist there, as well as one reverse DNS entry for the ESXi host.
  6. Allow changes to replicate to other DNS servers in your environment and then try to run an nslookup with the current ESXi IP and nslookup with ESXi FQDN to validate that it returns with a the correct information.
  7. Try to Add the ESXI host to the vCenter and it should allow you to continue on past the " Cannot contact host "