SimpleScheduler in the backend calls HostnameToIpAddrs() to resolve a host to a list of its IP addresses and then picks the first non-localhost one to identify the host. The underlying call to getaddrinfo() might return multiple IP addresses to the same host in a different order on subsequent calls. The relevant RFC3484 only defines a partial order. A small test program confirmed that the order is not static. As a fix we can sort the result of HostnameToIpAddrs() before picking one.