Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
4.1.0-incubating
-
None
-
test and production
Description
*strong text*jmenv.tbsite.net may can not be reached in inner envirment when find it periodly
we can return null when application does not set the new wsAddr.
public final String fetchNSAddr(boolean verbose, long timeoutMills) { String url = this.wsAddr; try { if (this.wsAddr.equals(MixAll.WS_ADDR)) { return null; } if (!UtilAll.isBlank(this.unitName)) { url = url + "-" + this.unitName + "?nofix=1"; } HttpTinyClient.HttpResult result = HttpTinyClient.httpGet(url, null, null, "UTF-8", timeoutMills); if (200 == result.code) { String responseStr = result.content; if (responseStr != null) { return clearNewLine(responseStr); } else { log.error("fetch nameserver address is null"); } } else { log.error("fetch nameserver address failed. statusCode={}", result.code); } } catch (IOException e) { if (verbose) { log.error("fetch name server address exception", e); } } if (verbose) { String errorMsg = "connect to " + url + " failed, maybe the domain name " + MixAll.getWSAddr() + " not bind in /etc/hosts"; errorMsg += FAQUrl.suggestTodo(FAQUrl.NAME_SERVER_ADDR_NOT_EXIST_URL); log.warn(errorMsg); } return null; }