private static boolean isValidAddress(final InetAddress address) {
        if (address.isLoopbackAddress()) {
            return false;
        }

        final String name = address.getHostAddress();
        return (name != null && !"0.0.0.0".equals(name) && !"127.0.0.1".equals(name) && IP_PATTERN.matcher(name)
            .matches());
    }
Gets the first valid IP in the NIC
jraft-rheakv/rheakv-core/src/main/java/com/alipay/sofa/jraft/rhea/util/NetUtil.java