src/main/java/org/firepick/ServiceResolver.java
public void resolve() {
    attempts++;
    config = null;
    Exception caughtException = null;
    String host = address == null ? "null" : address.getCanonicalHostName();
    if (url == null) {
      URL attemptUrl = null;
      int [] ports = {8080, 80};
      for (int i=0; i < ports.length; i++) {
	try {
	  attemptUrl = new URL("http", host, ports[i], "/firerest/config.json");
	  break;
	} catch (Exception e) {
	  attemptUrl = null;
	  caughtException = e;
	}
      }
      if (attemptUrl == null) {
	throw new FireRESTException("Could not resolve service at " + host, caughtException);
      }
      url = attemptUrl;
    }

    if (config == null) {
      logger.info("Resolving {}", url);
      config = new FireREST().withTimeout(msTimeout).getJSON(url);
    }
  }
public void resolve() {
    attempts++;
    config = null;
    Exception caughtException = null;
    String host = address == null ? "null" : address.getCanonicalHostName();
    if (url == null) {
      URL attemptUrl = null;
      int [] ports = {8080, 80};
      for (int i=0; i < ports.length; i++) {
	try {
	  attemptUrl = new URL("http", host, ports[i], "/firerest/config.json");
	  break;
	} catch (Exception e) {
	  attemptUrl = null;
	  caughtException = e;
	}
      }
      if (attemptUrl == null) {
	throw new FireRESTException("Could not resolve service at " + host, caughtException);
      }
      url = attemptUrl;
    }

    if (config == null) {
      logger.info("Resolving {}", url);
      config = new FireREST().withTimeout(msTimeout).getJSON(url);
    }
  }
(Re-)discover the service configuration

@return true if config.json was successfully obtained