private static void refreshIp() {
        
        String tmpSelfIp = getNacosIp();
        
        if (StringUtils.isBlank(tmpSelfIp)) {
            tmpSelfIp = getPreferHostnameOverIP();
        }
        
        if (StringUtils.isBlank(tmpSelfIp)) {
            tmpSelfIp = Objects.requireNonNull(findFirstNonLoopbackAddress()).getHostAddress();
        }
        
        if (InternetAddressUtil.PREFER_IPV6_ADDRESSES && !tmpSelfIp.startsWith(InternetAddressUtil.IPV6_START_MARK)
                && !tmpSelfIp.endsWith(InternetAddressUtil.IPV6_END_MARK)) {
            tmpSelfIp = InternetAddressUtil.IPV6_START_MARK + tmpSelfIp + InternetAddressUtil.IPV6_END_MARK;
            if (StringUtils.contains(tmpSelfIp, InternetAddressUtil.PERCENT_SIGN_IN_IPV6)) {
                tmpSelfIp = tmpSelfIp.substring(0, tmpSelfIp.indexOf(InternetAddressUtil.PERCENT_SIGN_IN_IPV6))
                        + InternetAddressUtil.IPV6_END_MARK;
            }
        }
        if (!Objects.equals(selfIP, tmpSelfIp) && Objects.nonNull(selfIP)) {
            IPChangeEvent event = new IPChangeEvent();
            event.setOldIP(selfIP);
            event.setNewIP(tmpSelfIp);
            NotifyCenter.publishEvent(event);
        }
        selfIP = tmpSelfIp;
    }
@Test
    void testRefreshIp() throws InterruptedException {
        assertEquals("1.1.1.1", InetUtils.getSelfIP());
        
        System.setProperty(NACOS_SERVER_IP, "1.1.1.2");
        TimeUnit.MILLISECONDS.sleep(300L);
        
        assertTrue(StringUtils.equalsIgnoreCase(InetUtils.getSelfIP(), "1.1.1.2"));
        
    }