VMware Cloud Community
pnarducci
Contributor
Contributor
Jump to solution

Short Hostname Resolution Failure

When I try to enable HA on a cluster, all of my hosts get the following error:

"hostmisconfigured: failed to resolve hostname/ip by using short hostname <[i]host[/i]>"

I can ping each host from the other hosts, virtual center, and my laptop (running the VIC). I can also successfully resolve the names using nslookup from each machine.

I have added entries in the hosts file on each ESX server in the following format:

10.X.X.X <[i]hostname[/i]>.<[i]domain[/i]>.<[i]com[/i]> <[i]host[/i]>

The DNS and Routing section in the VIC is correct for each server.

Thanks in advance.

Reply
0 Kudos
1 Solution

Accepted Solutions
VirtualKenneth
Virtuoso
Virtuoso
Jump to solution

Well I'm unsure of that, can't imagen but maybe you can try to change it?

Can you also ping the ESX server from and to each other using shortname? (guess so seeing you hosts file)

Can you try to edit the /etc/resolv.conf and comment out the nameservers there so that the only resolution on the system is being based on the hosts file? (I know that the hosts file is always first in line but just for troubleshooting purposes)

Alternately can you try to create a second cluster, place 2 ESX hosts in there and try to enable HA on that cluster?

Seen instances in where the whole cluster needed to be recreated

View solution in original post

Reply
0 Kudos
13 Replies
VirtualKenneth
Virtuoso
Virtuoso
Jump to solution

Do the dnsdomainname and hostname commands give back correct information?

pnarducci
Contributor
Contributor
Jump to solution

Yes they do. Does capitalization matter? The hostname command returns the name in uppercase, but the error in the VIC shows lowercase.

Reply
0 Kudos
VirtualKenneth
Virtuoso
Virtuoso
Jump to solution

Well I'm unsure of that, can't imagen but maybe you can try to change it?

Can you also ping the ESX server from and to each other using shortname? (guess so seeing you hosts file)

Can you try to edit the /etc/resolv.conf and comment out the nameservers there so that the only resolution on the system is being based on the hosts file? (I know that the hosts file is always first in line but just for troubleshooting purposes)

Alternately can you try to create a second cluster, place 2 ESX hosts in there and try to enable HA on that cluster?

Seen instances in where the whole cluster needed to be recreated

Reply
0 Kudos
pnarducci
Contributor
Contributor
Jump to solution

Creating the 2nd cluster and moving the hosts into it worked. Thanks for your help.

Reply
0 Kudos
VirtualKenneth
Virtuoso
Virtuoso
Jump to solution

No problem, that's what we're for Smiley Happy

Reply
0 Kudos
J4MESD
Contributor
Contributor
Jump to solution

I am having the exact same problem with the exception that I am not using a hosts file. I have two servers, one of which works, and the other doesn't.

The only difference between the two is that the one which doesn't work and which reports the message "failed to resolve hostname\ip using shortname ", has been manually assigned an IP address and DNS Server IPs whereas the other one is on DHCP.

I am sure I have got all the settings correct in regards to IPs as all the servers can see each other and the names resolve to IP addresses and are correct.

I have tried everything posted above plus a few other things I have found searching the internet but nothing seems to work.

If anyone has any other suggestions then they are greatly appreciated.

James

Reply
0 Kudos
corpsolv
Contributor
Contributor
Jump to solution

Guys,

I have seen this before many times and I agree that most of the the time adding the short name to the /etc/hosts file works great. But as mentioned in this thread, /etc/resolv.conf is important. I was going insane checking everything. I assumed since I was able to ping shortname from anywhere and everywhere that all was ok. I checked hostname, dnsdomainname commands and alls was good.

After double checking hosts, I decided to check /etc/resolv.conf and I fatfingered it using:

ddomain.com instead of domain.com

I fixed it and like magic, it worked. Here is a little checklist.

1. ping shortname from, host, and VIC and other hosts in cluster as well.

2. If have not done so or if you have problems resolving from VIC, either make a lmhosts entry or add the domain of the VI Hosts to your DNS Suffix in TCPIP settings>DNS

4. Try hostname and dnsdomainname command at the host. if there is a problem here, type:

\# hostname host.domain.com

5. Check /etc/hosts for

hostname.domain.com hostname (Do not remove localhost.localdomain localhost line)

6. Check /etc/resolv.conf for

domain.com

Thats a good start for a list anyway.!

Ray

Reply
0 Kudos
uma_kits
Contributor
Contributor
Jump to solution

Thank you very much. I also found this problem.

hostmisconfigured

failed to resolve hostname/ip using short hostname ...... cmd remove failed

I solve this problem follow by above suggestion and I add alias after FQDN all ip address

1. check domain in /etc/resolve.conf

2. nano /etc/hosts

###add all hosts in cluster in this file such as

192.168.2.1 vmserver.domain.com vmserver

Reply
0 Kudos
mfoacs
Contributor
Contributor
Jump to solution

Another point to the checklist above :

7. vi (or nano) /etc/sysconfig/network and check if there is no discrepancy between your DNS entries, /etc/hosts and HOSTNAME entry in that file. It MUST be the FQDN in order to name resolution work properly.

Therefore, even if all other settings are set all right, name resolution will fail your HA configuration.

regards

Reply
0 Kudos
mowgus
Enthusiast
Enthusiast
Jump to solution

I was using a hosts file only and didn't realize the ESX servers needed to resolve each other. I thought it would be done through VC. Anyhow, I had to add all the servers in the cluster to the hosts file on every server. Normally I would have used DNS and had no issues but this is an isolated environment.

The problem I experienced was that the first server would set up fine but I couldn't configure HA on any others (because the ESX server couldn't resolve the shortname directly...not through VC). This post helped me figure out the problem so thanks guys.

Reply
0 Kudos
Timber_Wolf
Contributor
Contributor
Jump to solution

Try this

I made a list of everything i need to check prior to clustering some of my servers, this is to standardise my network configuration on all my hosts, hope this helps somebody

Ensure network configuration is correct in the following config files

1. Putty into ESX host

2. Logon as Root

The following you can copy and past as is

3. vi /etc/sysconfig/network

4. vi /etc/hosts

5. vi /etc/resolv.conf

6. service network restart

7. In the VI client go to configuration, Software - Routing.. Ensure that configuration matches what you changed above.

PS it would seem that case does matter.

8. Migrate all guests off the host.

9. Restart esx server

Any suggestions of comments will be welcome

Reply
0 Kudos
SvenG
Contributor
Contributor
Jump to solution

I had the same problem. Everything was up and running for 6 months. Then suddenly this error message came up.

For me the problem was solved by bringing the host that had the error message into maintainance mode and then bring it back up again.

The plan from the beginning was to move it to another cluster group as suggested in a previous post. But it was enough with the above action.

/Sven

Reply
0 Kudos
ericdamwhite
Contributor
Contributor
Jump to solution

I've just experienced this problem, I was able to resolve the problem by adding Host Records in DNS, then I logged into each host via SSH and was able to perform an NSLOOK up on both host, finally I right click on the Host server and choose reconfigured HA and it was able to resolve the ip address and enable HA.

Reply
0 Kudos