VMware Cloud Community
bigusdadius
Contributor
Contributor

Error connecting: Host address lookup for server <servername> failed

Anyone ever see this one? I recently changed the DNS configuration on all of my ESX servers and when I attempt to power on newly created VM for the OS install I receive the following error -

"Error connecting: Host address lookup for server failed: The requested name is valid and found in the database, but it does not have the correct associated data being resolved for"

These servers are in a DRS/HA cluster and the agents are fine, the output from the hostname command is correct and the /etc/hosts file is correct. I can also ping by FQDN and shortname from each of the ESX servers...any ideas?

0 Kudos
20 Replies
waynegrow
Expert
Expert

Have you done an nslookup on your Domain to see if there is a DNS conflict?

bigusdadius
Contributor
Contributor

This is actually in my new lab and I just setup a new MS DNS server with new lookup zones, but I just did an nslookup to be sure and the entries are fine.

My ESX servers were connected to the corporate DNS servers, then I made the switch over to my lab server complete with new DNS names. I'm able to boot and reboot existing VMs, but two new ones have resulted in this error message...

0 Kudos
waynegrow
Expert
Expert

Are your old VMs still pointed to the Corp DNS servers?

0 Kudos
bigusdadius
Contributor
Contributor

None...except VC...kinda, it has the first DNS server entry is the new DNS server, but I have an old corporate DNS server as the second entry...you think this may be casuing some confusion?

0 Kudos
waynegrow
Expert
Expert

If for some reason DNS is not configured properly in the New DNS, it could be the cause.

0 Kudos
bigusdadius
Contributor
Contributor

I checked both the forward and reverse lookup zones and everything is as it should be, I'm going to reboot VC to see if it clears it up...maybe something is hanging out in the DB still...thanks for the suggestions so far!

0 Kudos
bggb29
Expert
Expert

i would also check the hosts files on the servers giving you problems.

Are the dns servers in the resolv.conf file correctly

Depending on how your dns is setup , if one dns server does not resolve the address it will only go to the root servers not another internal dns server unless it is specifically setup as a forwarder for a zone or al zones.

secondary and tertiary dns are only there if the primary fails to respond to a query.

bigusdadius
Contributor
Contributor

It looks like a reboot of the VC VM took care of it, probably should have just stopped and started the VC service or even just flucshed the DNS cache on the server...good thing it's the lab...

Thanks to all for the feedback!

0 Kudos
bigusdadius
Contributor
Contributor

CORRECTION: After further testing I still experienced this error and had to eventually re-install VC to clear it up.

0 Kudos
bigusdadius
Contributor
Contributor

Believe it or not, I still see this error once and a while and cannot track down the cause. On the ESX servers I've checked the resolv.conf and hosts files and they are correct. I also checked my DNS server and the entries are correct. Can anyone think of anything else?

Addition - It seems that now I cannot even open a console session with any VM...new or old.

Addition #2 - When I connect directly to the ESX server with the VI client I can open a session and no error.

Looks like another VC rebuild and new DB....I'll update this post with my results.

0 Kudos
R_lamothe
Contributor
Contributor

I had the same problem and find a solution.

I didn't use a DNS server only configure the host file on the VC and the ESX

I had the problem when I connect from my laptop to VC normal since my host file on laptop was not configure. If I try directly on the VC server it work.

hope this help

Rick

0 Kudos
bigusdadius
Contributor
Contributor

Thanks for the reply...actually, I found the issue.

Unfortunately, my lab is remote and I have to VPN in and I was using the VI client from my local machine trying to connect to my VI3 test environment. My laptop is in the corporate DNS domain and my lab is completely isolated and has it's own DNS server. Once I connected from a VI client in the lab I no longer could duplicate this issue.

0 Kudos
titaniumlegs
Enthusiast
Enthusiast

Let me guess. You were using IP addresses for everything (added ESX servers by IP) originally and now you're following "best practices" and using FQDN...?

The "Error connecting ... lookup failed" is coming from your PC, not VC or the VM.

VMs and actual computers in the lab will work because their DNS config points to the DNS in the lab.

Your desktop/laptop is pointing at corp DNS. Even if you list the lab DNS after all the corp ones, it still won't resolve to the lab unless it can't get to corp.

Put the lab DNS first in the list. If Windows, open Network Connections --> Right-click Your NIC ("Local Area Connection 1" or whatever) --> Properties --> Internet Protocol (TCP/IP) --> Properties --> Advanced --> DNS tab --> Add ...

Enter the DNS server for your lab, if it's not already listed.

Promote the lab DNS to the top of the list using the little green up arrow button. OK, OK, OK.

(Pardon if you already knew. Somebody else reading this later might not.)

Now try it.

Trick is, even if you connect to the VC server using IP, the VI client still tries to resolve the ESX host on which the VM lives using the exact info with which the ESX host was registered in VC. WHen you used IP, VIC used IP. When you registered with FQDN, VIC tries to use FQDN and since your PC wasn't set up to resolve hostnames against the DNS in the lab. Of course, now your PC isn't going to directly check the corp DNS unless it can't get to the lab, but if your lab DNS is configured to pass requests it can't resolve to corp, then you'll still get everywhere else.

At least, that all works for me.

Smiley Wink

Share and enjoy! Peter If this helped you, please award points! Or beer. Or jump tickets.
0 Kudos
bigusdadius
Contributor
Contributor

Thanks for the reply.

Actually, I'm cleaning up a lab that the person I replaced setup sometime ago....and yes I'm applying best practices and have corrected this issue.

0 Kudos
ElGarufo
Enthusiast
Enthusiast

Hi,

I had the same problem. I only log out from the VIC (logged to the VC), then I re-logged again but putting the FQDN in the login dialog, and then It works !!!

bye !

0 Kudos
jsola
Contributor
Contributor

We have the same problem here at our workplace because we are using static IP addresses and static dns routing in the ESX server host files. My simple fix was to add the static routes to my local windows xp box that is using Vi Client to talk to the servers, and that resolved the problem. We dont have control of our DNS servers here and although it seems like not best practices we have no choice,... Politics.......

0 Kudos
judy_w
Contributor
Contributor

Can you explain how you added the statics routes to your local windows pc that is using VI Client to connect the servers?

0 Kudos
jsola
Contributor
Contributor

Judy,

edit your hosts file in windows:

C:\WINDOWS\system32\drivers\etc\hosts

to reflect your environment, but look similar to this:

  1. For example:

#

  1. 102.54.94.97 rhino.acme.com # source server

  2. 38.25.63.10 x.acme.com # x client host

127.0.0.1 localhost

10.10.10.10 Hostname1.YourDomain.com Hostname1

10.10.10.11 Hostname2.YourDomain.com Hostname2

10.10.10.12 Hostname3.YourDomain.com Hostname3

10.10.10.13 Hostname4.YourDomain.com Hostname4

I hope this helps.

0 Kudos
grittyminder
Contributor
Contributor

Great thread, it solved my problem. If I could mod up threads as far as usefulness I would certainly mod this one up.

0 Kudos