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

Symptoms:

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

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

Environment

VMware ESXi 7.x

VMware ESXi 8.x

Cause

Pinging from another ESXi host

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

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

** server can't find 103.10.###.###.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:         ###.###.###.####
Address:        ###.###.###.90:53

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

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

[root@test02:] ping ###.###.10.103
PING ###.###.10.103 (###.###.10.103) 56(84) bytes of data.
64 bytes from ###.###.10.103: icmp_seq=1 ttl=64 time=0.017 ms
64 bytes from ###.###.10.103: icmp_seq=2 ttl=64 time=0.038 ms
64 bytes from ###.###.10.103: icmp_seq=3 ttl=64 time=0.028 ms
64 bytes from ###.###.10.103: icmp_seq=4 ttl=64 time=0.032 ms
64 bytes from ###.###.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 ###.###.10.103
Pinging ###.###.10.103 with 32 bytes of data:
Reply from ###.###.10.103: bytes=32 time<1ms TTL=64
Reply from ###.###.10.103: bytes=32 time<1ms TTL=64
Reply from ###.###.10.103: bytes=32 time<1ms TTL=64
Reply from ###.###.10.103: bytes=32 time<1ms TTL=64

Ping statistics for ###.###.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:  ###.###.5.103

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

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

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

Port(s) 902 or port 443 may be blocked by the firewall.

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 "

Additional Information

If the above steps do not resolve the issue, involve the customers firewall team to fix the connectivity issues between the vCenter and the ESXi host when using the FQDN.