<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.6.5</li>
</ul>
<h3 dir="auto">Confusion</h3>
<p dir="auto">the code below  create a <code class="notranslate">connectionMonitor</code> instance, but <code class="notranslate">Start</code> method seems not called</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="@Override
    protected &lt;T&gt; T doRefer(Class&lt;T&gt; serviceType, URL url) throws RpcException {
        if (connectionMonitor == null) {
            connectionMonitor = new ConnectionMonitor();
        }
      ...
    }"><pre class="notranslate"><code class="notranslate">@Override
    protected &lt;T&gt; T doRefer(Class&lt;T&gt; serviceType, URL url) throws RpcException {
        if (connectionMonitor == null) {
            connectionMonitor = new ConnectionMonitor();
        }
      ...
    }
</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/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/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.4.1</li>
<li>Operating System version: CentOS 7.5</li>
<li>Java version: jdk8</li>
<li>spring-cloud-alibaba: 2.2.0-RELEASE</li>
</ul>
<h3 dir="auto">Steps to reproduce this issue</h3>
<p dir="auto">配置服务端和消费端的注册中心为nacos：<br>
1.服务端参数：dubbo.protocol.name=dubbo，dubbo.protocol.port=28801，dubbo.scan.base-packages=xx.xx.xx，dubbo.registry.address=nacos://127.0.0.1:8848<br>
2.消费端参数：dubbo.consumer.check=false，dubbo.registry.address=nacos://127.0.0.1:8848<br>
3. 启动服务端和消费端<br>
4.修改服务端dubbo监听端口为： dubbo.protocol.port=28802<br>
5.重启服务端<br>
6. 消费端服务端业务正常。但消费端持续不断每隔1分钟连接服务端旧的28801端口。</p>
<p dir="auto">配置服务端和消费端的注册中心为zookeeper：<br>
1.服务端参数：dubbo.protocol.name=dubbo，dubbo.protocol.port=28801，dubbo.scan.base-packages=xx.xx.xx，dubbo.registry.address=zookeeper://127.0.0.1:2181<br>
2.消费端参数：dubbo.consumer.check=false，dubbo.registry.address=zookeeper://127.0.0.1:2181<br>
3. 启动服务端和消费端<br>
4.修改服务端dubbo监听端口为： dubbo.protocol.port=28802<br>
5.重启服务端<br>
6. 消费端不会连接服务端旧的28801端口。消费端服务端业务正常。</p>
<p dir="auto">以上场景模拟在docker容器中的场景，在docker容器中，微服务经常重新启动，重启微服务以后，其ip地址会发生变化（此处用端口变化模拟地址变化，道理是一样的）。</p>
<p dir="auto">结论：<br>
1、zookeeper作为服务注册中心，没有问题，<br>
2、nacos作为服务注册中心，当服务端掉线（服务实例改变事件）并未处理该通道，造成重连任务不断进行。原因可能是spring-cloud-alibaba没有把服务实例改变消息传递进dubbo，也有可能是dubbo没有处理这个消息</p>
<p dir="auto">Pls. provide [GitHub address] to reproduce this issue.</p>
<h3 dir="auto">Expected Result</h3>
<p dir="auto">What do you expected from the above steps？</p>
<h3 dir="auto">Actual Result</h3>
<p dir="auto">What actually happens?</p>
<p dir="auto">If there is an exception, please attach the exception trace:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Just put your stack trace here!"><pre class="notranslate"><code class="notranslate">Just put your stack trace here!
</code></pre></div>