<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have searched the <a href="https://github.com/apache/incubator-dubbo/issues">issues</a> of this repository and believe that this is not a duplicate.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have checked the <a href="https://github.com/apache/incubator-dubbo/blob/master/FAQ.md">FAQ</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h3 dir="auto">Environment</h3>
<ul dir="auto">
<li>Dubbo version: 2.6.6</li>
<li>Operating System version: MacOS 10.14.3</li>
<li>Java version: 1.8.0_151</li>
</ul>
<h3 dir="auto">Steps to reproduce this issue</h3>
<ol dir="auto">
<li>sh bin/start.sh</li>
</ol>
<h3 dir="auto">Expected Result</h3>
<p dir="auto">The dubbo jar can not start.</p>
<h3 dir="auto">Actual Result</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="sh bin/start.sh
: No such file or directoryin
: No such file or directory.
: command not found7:
: command not found13:
bin/start.sh: line 93: syntax error: unexpected end of file"><pre class="notranslate"><code class="notranslate">sh bin/start.sh
: No such file or directoryin
: No such file or directory.
: command not found7:
: command not found13:
bin/start.sh: line 93: syntax error: unexpected end of file
</code></pre></div>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/apache/incubator-dubbo/issues">issues</a> of this repository and believe that this is not a duplicate.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/apache/incubator-dubbo/blob/master/FAQ.md">FAQ</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h3 dir="auto">Environment</h3>
<ul dir="auto">
<li>Dubbo version: 2.7.1</li>
<li>Operating System version: CentOS Linux release 7.6.1810 (Core)</li>
<li>Java version: 1.8</li>
</ul>
<h3 dir="auto">Steps to reproduce this issue</h3>
<ol dir="auto">
<li>yml配置文件</li>
</ol>
<div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="dubbo:
  application:
    name: bessky-boot-service
  protocol:
    name: dubbo
    port: 28300
  scan:
    basePackages: com.bessky
  registry:
    address: zookeeper://192.168.99.230:2181"><pre class="notranslate"><span class="pl-ent">dubbo</span>:
  <span class="pl-ent">application</span>:
    <span class="pl-ent">name</span>: <span class="pl-s">bessky-boot-service</span>
  <span class="pl-ent">protocol</span>:
    <span class="pl-ent">name</span>: <span class="pl-s">dubbo</span>
    <span class="pl-ent">port</span>: <span class="pl-c1">28300</span>
  <span class="pl-ent">scan</span>:
    <span class="pl-ent">basePackages</span>: <span class="pl-s">com.bessky</span>
  <span class="pl-ent">registry</span>:
    <span class="pl-ent">address</span>: <span class="pl-s">zookeeper://192.168.99.230:2181</span></pre></div>
<ol start="2" dir="auto">
<li>测试接口</li>
</ol>
<div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="public interface HelloService {
	String hello(String name);
}"><pre class="notranslate"><span class="pl-k">public</span> <span class="pl-k">interface</span> <span class="pl-smi">HelloService</span> {
	<span class="pl-smi">String</span> <span class="pl-en">hello</span>(<span class="pl-smi">String</span> <span class="pl-s1">name</span>);
}</pre></div>
<ol start="3" dir="auto">
<li>接口实现类</li>
</ol>
<div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="@Service
public class HelloServiceImpl implements HelloService {
	@Override
	public String hello(String name) {
		System.out.println(name);
		return &quot;Hello, &quot; + name;
	}
}"><pre class="notranslate"><span class="pl-c1">@</span><span class="pl-c1">Service</span>
<span class="pl-k">public</span> <span class="pl-k">class</span> <span class="pl-smi">HelloServiceImpl</span> <span class="pl-k">implements</span> <span class="pl-smi">HelloService</span> {
	<span class="pl-c1">@</span><span class="pl-c1">Override</span>
	<span class="pl-k">public</span> <span class="pl-smi">String</span> <span class="pl-en">hello</span>(<span class="pl-smi">String</span> <span class="pl-s1">name</span>) {
		<span class="pl-smi">System</span>.<span class="pl-s1">out</span>.<span class="pl-en">println</span>(<span class="pl-s1">name</span>);
		<span class="pl-k">return</span> <span class="pl-s">"Hello, "</span> + <span class="pl-s1">name</span>;
	}
}</pre></div>
<p dir="auto">4.启动类</p>
<div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="@SpringBootApplication
public class BesskyBootServiceApplication {
	public static void main(String[] args) {
		SpringApplication.run(BesskyBootServiceApplication.class, args);
	}
}"><pre class="notranslate"><span class="pl-c1">@</span><span class="pl-c1">SpringBootApplication</span>
<span class="pl-k">public</span> <span class="pl-k">class</span> <span class="pl-smi">BesskyBootServiceApplication</span> {
	<span class="pl-k">public</span> <span class="pl-k">static</span> <span class="pl-smi">void</span> <span class="pl-en">main</span>(<span class="pl-smi">String</span>[] <span class="pl-s1">args</span>) {
		<span class="pl-smi">SpringApplication</span>.<span class="pl-en">run</span>(<span class="pl-smi">BesskyBootServiceApplication</span>.<span class="pl-k">class</span>, <span class="pl-s1">args</span>);
	}
}</pre></div>
<p dir="auto">5.将Spring BOOT工程打包上传到CentOS服务器测试</p>
<p dir="auto">问题1：注册到ZK上的地址变成了127.0.0.1，回退到Dubbo的2.7.0版本是能正确获取到网卡IP地址的。<br>
执行hostname命令结果是localhost.localdomain<br>
/etc/hosts文件内容是<br>
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4<br>
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6<br>
这种配置在2.7.0上是可以正确获取到网卡IP地址的</p>
<p dir="auto">问题2：注册到ZK上的服务都变成了静态服务</p>
<p dir="auto">Pls. provide [GitHub address] to reproduce this issue.</p>
<h3 dir="auto">Expected Result</h3>
<p dir="auto">1、正常获取到网卡IP地址<br>
2、动态服务</p>
<h3 dir="auto">Actual Result</h3>
<p dir="auto">服务地址:	dubbo://127.0.0.1:28300/com.bessky.hello.service.HelloService?anyhost=true&amp;application=bessky-boot-service&amp;bean.name=providers:dubbo:com.bessky.hello.service.HelloService&amp;default.deprecated=false&amp;default.dynamic=false&amp;default.register=true&amp;deprecated=false&amp;dubbo=2.0.2&amp;dynamic=false&amp;generic=false&amp;interface=com.bessky.hello.service.HelloService&amp;methods=hello&amp;pid=181167®ister=true&amp;release=2.7.1&amp;side=provider×tamp=1553819455170<br>
主机名:	(localhost)127.0.0.1:28300<br>
所属端:	provider<br>
方法列表:	hello<br>
release:	2.7.1<br>
deprecated:	false<br>
Dubbo版本:	2.0.2<br>
进程号:	181167<br>
default.dynamic:	false<br>
接口名:	com.bessky.hello.service.HelloService<br>
generic:	false<br>
default.deprecated:	false<br>
应用名:	bessky-boot-service<br>
default.register:	true<br>
动态:	false<br>
绑定所有IP:	true<br>
bean.name:	providers:dubbo:com.bessky.hello.service.HelloService<br>
申请注册:	true<br>
时间戳:	2019-03-29 08:30:55 (1553819455170)<br>
类型:	静态<br>
状态:	已启用<br>
检查:	  警告</p>