Skip to main content

VMware ESXi 6.0 Update 2 – Host Client “Service Unavailable” error

I’ve recently upgraded my home lab ESXi hosts to ESXi 6.0 Update 2 (6.0u2).

One of the features added is the VMware Host Client – an HTML5 standalone web interface for managing an ESXi host. This has been available as a VMware Labs “Fling” for a while but it’s now part of the default installation. It allows you to manage a standalone ESXi server without needing vCenter or the Windows-only vSphere Client (aka the C# client).

ESXi Host Client screenshot

When I tried to access the new client (https://[yourhost-ip-or-name]/ui/) , I was faced with an error:

503 Service Unavailable (Failed to connect to endpoint: [N7Vmacore4Http16LocalServiceSpecE:0x1f0a2c70] _serverNamespace = /ui _isRedirect = false _port = 8308)

A bit of web searching brought me to a blog article by the ever-comprehensive William Lam about an issue with the original Fling when installing on a host which has been upgraded from ESXi 5.5 or earlier.

Part of the Reverse HTTP Proxy config does not get updated during the upgrade, leaving the new UI broken.

The fix is:

  1. Log on to your ESXi host (either via SSH or DCUI/ESXi Shell)
  2. Edit /etc/vmware/rhttpproxy/endpoints.conf
  3. Remove the line:
    /ui    local    8308    redirect    allow
  4. Now restart the rhttpproxy:
    /etc/init.d/rhttpproxy restart
  5. You should now be able to access the Host Client at https://[yourhost-ip-or-name]/ui/

ESXi Host Client login

Hostname/IP bug in ESXi 3.5 Update 3

Last week I was working on an HA cluster of VMware ESXi hosts.

Whatever I tried I couldn’t get the hosts to play nicely when HA was turned on. Further investigation showed that the hosts were resolving their own names to a previous IP address.

Checking the console on each host showed the correct information, but the error messages when turning HA on indicated that they were still resolving to their old incorrect addresses.

The usual problem with HA is that DNS records don’t match what is actually set up, but in this case DNS checked out fine.

It would appear that:

  1. ESXi uses a local ‘/etc/hosts’ file for resolving names in preference to DNS. You can view this file by pointing a browser at http://youresxservername/host/hosts
  2. The local hosts file doesn’t get updated when you change the settings using the console interface. It keeps whatever was in there the first time you set up the hostname and IP address for the host

Most of the time this doesn’t matter much as the host doesn’t often need to look itself up, but when VMware HA is turned on, name resolution becomes much more important.

There are two ways to edit the /etc/hosts file. Because ESXi doesn’t have a normal Console Operating System (COS) that full ESX enjoys, both methods are relatively awkwards.

  1. Use ‘unsupported’ mode to get a local root shell and edit using ‘vi /etc/hosts’
  2. Use the Remote CLI to change the file remotely.
    1. vifs.pl –sessionfile <yoursessionfile> –get /host/hosts C:\temp
    2. Edit the file with notepad
    3. vifs.pl –sessionfile <yoursessionfile> –put C:\temp\hosts /host/hosts

With that done HA started working again. Probably worth doing a reboot just to make sure it’s ‘taken’.