dubbo icon indicating copy to clipboard operation
dubbo copied to clipboard

Bug occurs when publish config to nacos:timeouts can't be negative

Open laddcn opened this issue 6 years ago • 0 comments

  • [x] I have searched the issues of this repository and believe that this is not a duplicate.
  • [x] I have checked the FAQ of this repository and believe that this is not a duplicate.

Environment

  • Dubbo version: 2.7.6-SNAPSHOT(current master branch)
  • Operating System version: mac os
  • Java version: 1.8

Steps to reproduce this issue

  1. config nacos as register and metadata center as following <dubbo:registry address="nacos://127.0.0.1:8848"/> <dubbo:metadata-report address="nacos://127.0.0.1:8848"/>

  2. run Application in dubbo-demo-xml-provider and bug occurs [19/01/20 22:59:10:949 CST] main WARN metadata.DynamicConfigurationServiceNameMapping: [DUBBO] timeouts can't be negative, dubbo version: , current host: ...

Pls. provide [GitHub address] to reproduce this issue.

Expected Result

What do you expected from the above steps?

Metadata are published to nacos

Actual Result

What actually happens?

Publish failed with this bug Just put your stack trace here!

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.<init>(ClassPathXmlApplicationContext.java:139)
	at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:83)
	at org.apache.dubbo.demo.provider.Application.main(Application.java:23)

laddcn avatar Jan 19 '20 15:01 laddcn