public String getServerBindAddressAsString() {
    try {
      if (getServerBindAddress() != null) {
        return getServerBindAddress().getCanonicalHostName();
      }

      return LocalHostUtil.getCanonicalLocalHostName();
    } catch (UnknownHostException handled) {
      // Returning localhost/127.0.0.1 implies the serverBindAddress was null and no IP address
      // for localhost could be found
      return "localhost/127.0.0.1";
    }
  }
Gets the host, as either hostname or IP address, on which the Server was bound and running. An
attempt is made to get the canonical hostname for IP address to which the Server was bound for
accepting client requests. If the server bind address is null or localhost is unknown, then a
default String value of "localhost/127.0.0.1" is returned.

Note, this information is purely information and should not be used to re-construct state or
for other purposes.

@return the hostname or IP address of the host running the Server, based on the bind-address,
        or 'localhost/127.0.0.1' if the bind address is null and localhost is unknown.
@see InetAddress
@see #getServerBindAddress()
geode-core/src/main/java/org/apache/geode/distributed/ServerLauncher.java