<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.6-SNAPSHOT(current master branch)</li>
<li>Operating System version: mac os</li>
<li>Java version: 1.8</li>
</ul>
<h3 dir="auto">Steps to reproduce this issue</h3>
<ol dir="auto">
<li>
<p dir="auto">config nacos as register and metadata center as following<br>
&lt;dubbo:registry address="nacos://127.0.0.1:8848"/&gt;<br>
&lt;dubbo:metadata-report address="nacos://127.0.0.1:8848"/&gt;</p>
</li>
<li>
<p dir="auto">run Application in dubbo-demo-xml-provider and bug occurs<br>
[19/01/20 22:59:10:949 CST] main  WARN metadata.DynamicConfigurationServiceNameMapping:  [DUBBO] timeouts can't be negative, dubbo version: , current host: <em><strong>.</strong></em>.<em><strong>.</strong></em></p>
</li>
</ol>
<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>
<p dir="auto">Metadata are published to nacos</p>
<h3 dir="auto">Actual Result</h3>
<p dir="auto">What actually happens?</p>
<p dir="auto">Publish failed with this bug<br>
Just put your stack trace here!</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="java.lang.IllegalArgumentException: timeouts can't be negative
	at sun.net.www.protocol.http.HttpURLConnection.setReadTimeout(HttpURLConnection.java:3231)
	at com.alibaba.nacos.client.config.impl.HttpSimpleClient.httpGet(HttpSimpleClient.java:59)
	at com.alibaba.nacos.client.config.http.ServerHttpAgent.httpGet(ServerHttpAgent.java:80)
	at com.alibaba.nacos.client.config.http.MetricsHttpAgent.httpGet(MetricsHttpAgent.java:48)
	at com.alibaba.nacos.client.config.impl.ClientWorker.getServerConfig(ClientWorker.java:234)
	at com.alibaba.nacos.client.config.NacosConfigService.getConfigInner(NacosConfigService.java:173)
	at com.alibaba.nacos.client.config.NacosConfigService.getConfig(NacosConfigService.java:122)
	at org.apache.dubbo.configcenter.support.nacos.NacosDynamicConfiguration.publishConfig(NacosDynamicConfiguration.java:263)
	at org.apache.dubbo.common.config.configcenter.wrapper.CompositeDynamicConfiguration.publishConfig(CompositeDynamicConfiguration.java:72)
	at org.apache.dubbo.metadata.DynamicConfigurationServiceNameMapping.lambda$map$0(DynamicConfigurationServiceNameMapping.java:59)
	at org.apache.dubbo.metadata.DynamicConfigurationServiceNameMapping.execute(DynamicConfigurationServiceNameMapping.java:92)
	at org.apache.dubbo.metadata.DynamicConfigurationServiceNameMapping.map(DynamicConfigurationServiceNameMapping.java:58)
	at org.apache.dubbo.config.event.listener.ServiceNameMappingListener.lambda$onEvent$0(ServiceNameMappingListener.java:52)
	at java.util.ArrayList.forEach(ArrayList.java:1257)
	at org.apache.dubbo.config.event.listener.ServiceNameMappingListener.onEvent(ServiceNameMappingListener.java:47)
	at org.apache.dubbo.config.event.listener.ServiceNameMappingListener.onEvent(ServiceNameMappingListener.java:39)
	at org.apache.dubbo.event.AbstractEventDispatcher.lambda$null$5(AbstractEventDispatcher.java:130)
	at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)
	at java.util.ArrayList.forEach(ArrayList.java:1257)
	at java.util.stream.SortedOps$RefSortingSink.end(SortedOps.java:390)
	at java.util.stream.Sink$ChainedReference.end(Sink.java:258)
	at java.util.stream.Sink$ChainedReference.end(Sink.java:258)
	at java.util.stream.Sink$ChainedReference.end(Sink.java:258)
	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)
	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
	at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151)
	at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174)
	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
	at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418)
	at org.apache.dubbo.event.AbstractEventDispatcher.lambda$dispatch$6(AbstractEventDispatcher.java:122)
	at org.apache.dubbo.event.AbstractEventDispatcher.dispatch(AbstractEventDispatcher.java:120)
	at org.apache.dubbo.config.ServiceConfig.dispatch(ServiceConfig.java:704)
	at org.apache.dubbo.config.ServiceConfig.doExport(ServiceConfig.java:295)
	at org.apache.dubbo.config.ServiceConfig.export(ServiceConfig.java:205)
	at org.apache.dubbo.config.bootstrap.DubboBootstrap.lambda$exportServices$13(DubboBootstrap.java:876)
	at java.util.HashMap$Values.forEach(HashMap.java:981)
	at org.apache.dubbo.config.bootstrap.DubboBootstrap.exportServices(DubboBootstrap.java:864)
	at org.apache.dubbo.config.bootstrap.DubboBootstrap.start(DubboBootstrap.java:706)
	at org.apache.dubbo.config.spring.context.DubboBootstrapApplicationListener.onContextRefreshedEvent(DubboBootstrapApplicationListener.java:52)
	at org.apache.dubbo.config.spring.context.DubboBootstrapApplicationListener.onApplicationContextEvent(DubboBootstrapApplicationListener.java:45)
	at org.apache.dubbo.config.spring.context.OneTimeExecutionApplicationContextEventListener.onApplicationEvent(OneTimeExecutionApplicationContextEventListener.java:40)
	at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172)
	at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165)
	at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139)
	at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:393)
	at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:347)
	at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:883)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:546)
	at org.springframework.context.support.ClassPathXmlApplicationContext.&lt;init&gt;(ClassPathXmlApplicationContext.java:139)
	at org.springframework.context.support.ClassPathXmlApplicationContext.&lt;init&gt;(ClassPathXmlApplicationContext.java:83)
	at org.apache.dubbo.demo.provider.Application.main(Application.java:23)"><pre class="notranslate"><code class="notranslate">java.lang.IllegalArgumentException: timeouts can't be negative
	at sun.net.www.protocol.http.HttpURLConnection.setReadTimeout(HttpURLConnection.java:3231)
	at com.alibaba.nacos.client.config.impl.HttpSimpleClient.httpGet(HttpSimpleClient.java:59)
	at com.alibaba.nacos.client.config.http.ServerHttpAgent.httpGet(ServerHttpAgent.java:80)
	at com.alibaba.nacos.client.config.http.MetricsHttpAgent.httpGet(MetricsHttpAgent.java:48)
	at com.alibaba.nacos.client.config.impl.ClientWorker.getServerConfig(ClientWorker.java:234)
	at com.alibaba.nacos.client.config.NacosConfigService.getConfigInner(NacosConfigService.java:173)
	at com.alibaba.nacos.client.config.NacosConfigService.getConfig(NacosConfigService.java:122)
	at org.apache.dubbo.configcenter.support.nacos.NacosDynamicConfiguration.publishConfig(NacosDynamicConfiguration.java:263)
	at org.apache.dubbo.common.config.configcenter.wrapper.CompositeDynamicConfiguration.publishConfig(CompositeDynamicConfiguration.java:72)
	at org.apache.dubbo.metadata.DynamicConfigurationServiceNameMapping.lambda$map$0(DynamicConfigurationServiceNameMapping.java:59)
	at org.apache.dubbo.metadata.DynamicConfigurationServiceNameMapping.execute(DynamicConfigurationServiceNameMapping.java:92)
	at org.apache.dubbo.metadata.DynamicConfigurationServiceNameMapping.map(DynamicConfigurationServiceNameMapping.java:58)
	at org.apache.dubbo.config.event.listener.ServiceNameMappingListener.lambda$onEvent$0(ServiceNameMappingListener.java:52)
	at java.util.ArrayList.forEach(ArrayList.java:1257)
	at org.apache.dubbo.config.event.listener.ServiceNameMappingListener.onEvent(ServiceNameMappingListener.java:47)
	at org.apache.dubbo.config.event.listener.ServiceNameMappingListener.onEvent(ServiceNameMappingListener.java:39)
	at org.apache.dubbo.event.AbstractEventDispatcher.lambda$null$5(AbstractEventDispatcher.java:130)
	at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)
	at java.util.ArrayList.forEach(ArrayList.java:1257)
	at java.util.stream.SortedOps$RefSortingSink.end(SortedOps.java:390)
	at java.util.stream.Sink$ChainedReference.end(Sink.java:258)
	at java.util.stream.Sink$ChainedReference.end(Sink.java:258)
	at java.util.stream.Sink$ChainedReference.end(Sink.java:258)
	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)
	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
	at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151)
	at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174)
	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
	at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418)
	at org.apache.dubbo.event.AbstractEventDispatcher.lambda$dispatch$6(AbstractEventDispatcher.java:122)
	at org.apache.dubbo.event.AbstractEventDispatcher.dispatch(AbstractEventDispatcher.java:120)
	at org.apache.dubbo.config.ServiceConfig.dispatch(ServiceConfig.java:704)
	at org.apache.dubbo.config.ServiceConfig.doExport(ServiceConfig.java:295)
	at org.apache.dubbo.config.ServiceConfig.export(ServiceConfig.java:205)
	at org.apache.dubbo.config.bootstrap.DubboBootstrap.lambda$exportServices$13(DubboBootstrap.java:876)
	at java.util.HashMap$Values.forEach(HashMap.java:981)
	at org.apache.dubbo.config.bootstrap.DubboBootstrap.exportServices(DubboBootstrap.java:864)
	at org.apache.dubbo.config.bootstrap.DubboBootstrap.start(DubboBootstrap.java:706)
	at org.apache.dubbo.config.spring.context.DubboBootstrapApplicationListener.onContextRefreshedEvent(DubboBootstrapApplicationListener.java:52)
	at org.apache.dubbo.config.spring.context.DubboBootstrapApplicationListener.onApplicationContextEvent(DubboBootstrapApplicationListener.java:45)
	at org.apache.dubbo.config.spring.context.OneTimeExecutionApplicationContextEventListener.onApplicationEvent(OneTimeExecutionApplicationContextEventListener.java:40)
	at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172)
	at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165)
	at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139)
	at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:393)
	at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:347)
	at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:883)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:546)
	at org.springframework.context.support.ClassPathXmlApplicationContext.&lt;init&gt;(ClassPathXmlApplicationContext.java:139)
	at org.springframework.context.support.ClassPathXmlApplicationContext.&lt;init&gt;(ClassPathXmlApplicationContext.java:83)
	at org.apache.dubbo.demo.provider.Application.main(Application.java:23)
</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"> 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.3-SNAPSHOT</li>
<li>Operating System version: mac os 10.13.6</li>
<li>Java version: 1.8.0_171</li>
</ul>
<h3 dir="auto">Steps to reproduce this issue</h3>
<p dir="auto">org.apache.dubbo.remoting.etcd.jetcd.JEtcdClient.EtcdWatcher#closeWatchRequest will not cancel the watch request to EtcdClient, it will result the client continue to receive watch event after unsubscribe.</p>
<p dir="auto">The method <code class="notranslate">onCompleted()</code> just mean the client will not send message, it can not tell the server not send message.</p>
<p dir="auto">The right method should be send a WatchCancelRequest, just like write in org.apache.dubbo.remoting.etcd.jetcd.JEtcdClientTest#testCancelWatchWithGrpc</p>