code: private String lookupLocalAddress()
    {
      long timeout = 120 * 1000L;
      
      long expireTime = CurrentTime.currentTime() + timeout;
      
      String address;
      
      while ((address = allocateLocalAddress()) == null
             && CurrentTime.currentTime() < expireTime) {
        try {
          Thread.sleep(1000);
        } catch (Exception e) {
        }
      }
      
      if (address == null) {
        throw new ConfigException(L.l("Cannot find an internal local IP address for server {0}, external IP {1} within 120s."
                                      + " 'external-address=true' is used for cloud networks where the internal address is allocated dynamically."
                                      + " Check that the persistent address has been assigned in the cloud configuration or DNS.",
                                      _serverBartender.getId(),
                                      _serverBartender.getAddress()));
      }
      
      return address;
    }
docs: Looks up the local address when given an external address, e.g. for
  cloud systems that dynamically allocate local addresses.