VMware Cloud Community
sommert
Contributor
Contributor

multiple short hostnames when adding host to HA cluster

I tried some of the suggestions in the forums and I cant seem to get around this problem.

When I add one of my ESX servers to the HA cluster I get mutipleshorthostnames:Multiple short hostnames configured for host: myserver and MYSERVER

I do not use DNS since this installation is a lab. I have checked the hosts file in ESX and everything is in upper case. In VC, the hostname in the DNS/Routing page also shows uppercase. However, when I add the hostname to virtual center it does come back in lower case - not sure if that's a problem.

I have tried removing the host from VC and also taking it in and out of the cluster. Nothing seems to help. If I do a hostname -i and hostname -s it returns the right IP and the name in upper case.

What else is there to check?

0 Kudos
9 Replies
oreeh
Immortal
Immortal

Always use lowercase for hostnames and FQDNs.

0 Kudos
sommert
Contributor
Contributor

Thanks for the suggestion. I changed to lower case using VC and made sure the host file was updated. I booted and tried again and got the same result. I will also add that the other server in the cluster had no issues with HA and is all uppercase, but I do understand it's best practice to use lower. Any other ideas?

0 Kudos
jshelly
Enthusiast
Enthusiast

Set the name of your hosts with the command: hostname <name>

(Lowercase of course)

0 Kudos
sommert
Contributor
Contributor

No luck with that either unfortunately.

0 Kudos
sommert
Contributor
Contributor

Thanks - tried that as well.

0 Kudos
DrewDennis
Contributor
Contributor

the hostname command fixed mine! Thanks!

0 Kudos
jebarber
Enthusiast
Enthusiast

FYI, changing the host name with the hostname command will only work until the next reboot.

I think, but not sure that at boot it gets the hostname from /etc/hosts.

0 Kudos
sommert
Contributor
Contributor

I finally opened a service ticket. Turns out I needed to update my hosts file on both HA ESX hosts in the following format.

127.0.0.1 localhost.localdomain localhost

192.168.1.2 myserver1.domain.com myserver1

192.168.1.3 myserver2.domain.com myserver2

0 Kudos
Ultim8
Contributor
Contributor

Thanks, i just needed to change characters from uppercase to lowercase in /etc/hosts and all went fine.

0 Kudos