最近重装了系统（Linux系统）后，发现dubbo在注册中心注册的地址为180.168.41.175，介于之前组内其他人也出现过dubbo所获取的IP为180.168.41.175的问题，于是翻了翻源码，找到了获得IP的出处：InetAddress.getLocalHost()。而Java的这个方法依赖于本地的hostname和hosts文件。而我的系统默认的hosts文件中并不存在hostname所对应的记录，结果InetAddress.getLocalHost()就解析成了180.168.41.175。
我看到QA(http://dubbo.io/faq.html) 中有条和我的情况类似的（第17条，说是Dubbo1.0.7以上版本不会出现这个问题，但是我这里出现了，虽然不是127.0.0.1）。
我有个不成熟的小建议，可否优化一下IP获取的方式，让其更加精准；或则增加一个明显一点的配置说明。毕竟不同的Linux发行版有不同的hosts配置，出现这种问题让新手很是蒙蔽。。
望大神回复。
/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.apache.dubbo.config;
import org.apache.dubbo.common.Constants;
import org.apache.dubbo.common.URL;
import org.apache.dubbo.common.Version;
import org.apache.dubbo.common.config.Environment;
import org.apache.dubbo.common.extension.ExtensionLoader;
import org.apache.dubbo.common.utils.Assert;
import org.apache.dubbo.common.utils.CollectionUtils;
import org.apache.dubbo.common.utils.ConfigUtils;
import org.apache.dubbo.common.utils.NetUtils;
import org.apache.dubbo.common.utils.ReflectUtils;
import org.apache.dubbo.common.utils.StringUtils;
import org.apache.dubbo.common.utils.UrlUtils;