diff --git a/core/src/main/java/com/alibaba/nacos/core/utils/InetUtils.java b/core/src/main/java/com/alibaba/nacos/core/utils/InetUtils.java index 59ca9046f..6705799cd 100644 --- a/core/src/main/java/com/alibaba/nacos/core/utils/InetUtils.java +++ b/core/src/main/java/com/alibaba/nacos/core/utils/InetUtils.java @@ -78,7 +78,7 @@ public class InetUtils { preferHostnameOverIp = Boolean.getBoolean(SYSTEM_PREFER_HOSTNAME_OVER_IP); if (!preferHostnameOverIp) { - preferHostnameOverIp = Boolean.parseBoolean(PREFER_HOSTNAME_OVER_IP); + preferHostnameOverIp = Boolean.parseBoolean(PropertyUtil.getProperty(PREFER_HOSTNAME_OVER_IP)); } if (preferHostnameOverIp) {