protected static void assertPortAvailable(final InetAddress bindAddress, final int port)
      throws BindException {
    if (!AvailablePort.isPortAvailable(port, AvailablePort.SOCKET, bindAddress)) {
      throw new BindException(
          String.format("Network is unreachable; port (%1$d) is not available on %2$s.", port,
              bindAddress != null ? bindAddress.getCanonicalHostName() : "localhost"));
    }
  }
Asserts that the specified port is available on the specified network interface, indicated by
it's assigned IP address, on this local system.

@param bindAddress an InetAddress indicating the bounded network interface to determine whether
       the service port is available or not.
@param port an integer indicating the network port to listen for client network requests.
@throws BindException if the network address and port are not available. Address defaults to
        localhost (or all network interfaces on the local system) if null.
@see AvailablePort
geode-core/src/main/java/org/apache/geode/distributed/AbstractLauncher.java