alibaba / spring-cloud-alibaba

Spring Cloud Alibaba provides a one-stop solution for application development for the distributed solutions of Alibaba middleware.
https://sca.aliyun.com
Apache License 2.0
27.95k stars 8.34k forks source link

nacos and zipkin exception #499

Closed Fyuxuan closed 5 years ago

Fyuxuan commented 5 years ago

我们鼓励使用英文,如果不能直接使用,可以使用翻译软件,您仍旧可以保留中文原文。 We recommend using English. If you are non-native English speaker, you can use the translation software.

Which Component Nacos

Describe what problem you have encountered

request data to zipkin success,but nacos exception

2019-03-28 14:11:48.637 ERROR [ins-user,,,] 43273 --- [com.alibaba.nacos.client.naming.updater] com.alibaba.nacos.client.naming : [] [] [CALL-SERVER] failed to req API:http://192.168.0.253:8848/nacos/v1/ns/api/srvIPXT. code:404 msg: dom not found: 192.168.0.251
2019-03-28 14:11:48.638 ERROR [ins-user,,,] 43273 --- [com.alibaba.nacos.client.naming.updater] com.alibaba.nacos.client.naming : [] [] [NA] req api:/nacos/v1/ns/api/srvIPXT failed, server(192.168.0.253:8848

com.alibaba.nacos.api.exception.NacosException: null
at com.alibaba.nacos.client.naming.net.NamingProxy.callServer(NamingProxy.java:304)
at com.alibaba.nacos.client.naming.net.NamingProxy.reqAPI(NamingProxy.java:327)
at com.alibaba.nacos.client.naming.net.NamingProxy.reqAPI(NamingProxy.java:310)
at com.alibaba.nacos.client.naming.net.NamingProxy.reqAPI(NamingProxy.java:257)
at com.alibaba.nacos.client.naming.core.HostReactor.updateServiceNow(HostReactor.java:340)
at com.alibaba.nacos.client.naming.core.HostReactor$UpdateTask.run(HostReactor.java:429)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

2019-03-28 14:11:48.715 ERROR [ins-user,,,] 43273 --- [com.alibaba.nacos.client.naming.updater] com.alibaba.nacos.client.naming : [] [] [CALL-SERVER] failed to req API:http://192.168.0.253:8849/nacos/v1/ns/api/srvIPXT. code:404 msg: dom not found: 192.168.0.251
2019-03-28 14:11:48.715 ERROR [ins-user,,,] 43273 --- [com.alibaba.nacos.client.naming.updater] com.alibaba.nacos.client.naming : [] [] [NA] req api:/nacos/v1/ns/api/srvIPXT failed, server(192.168.0.253:8849

com.alibaba.nacos.api.exception.NacosException: null
at com.alibaba.nacos.client.naming.net.NamingProxy.callServer(NamingProxy.java:304)
at com.alibaba.nacos.client.naming.net.NamingProxy.reqAPI(NamingProxy.java:327)
at com.alibaba.nacos.client.naming.net.NamingProxy.reqAPI(NamingProxy.java:310)
at com.alibaba.nacos.client.naming.net.NamingProxy.reqAPI(NamingProxy.java:257)
at com.alibaba.nacos.client.naming.core.HostReactor.updateServiceNow(HostReactor.java:340)
at com.alibaba.nacos.client.naming.core.HostReactor$UpdateTask.run(HostReactor.java:429)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

2019-03-28 14:11:48.716 ERROR [ins-user,,,] 43273 --- [com.alibaba.nacos.client.naming.updater] com.alibaba.nacos.client.naming : [] [] [NA] failed to update serviceName: 192.168.0.251

java.lang.IllegalStateException: failed to req API:/nacos/v1/ns/api/srvIPXT after all servers([192.168.0.253:8848, 192.168.0.253:8849, 192.168.0.253:8850]) tried
at com.alibaba.nacos.client.naming.net.NamingProxy.reqAPI(NamingProxy.java:335)
at com.alibaba.nacos.client.naming.net.NamingProxy.reqAPI(NamingProxy.java:310)
at com.alibaba.nacos.client.naming.net.NamingProxy.reqAPI(NamingProxy.java:257)
at com.alibaba.nacos.client.naming.core.HostReactor.updateServiceNow(HostReactor.java:340)
at com.alibaba.nacos.client.naming.core.HostReactor$UpdateTask.run(HostReactor.java:429)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

Describe what you expected to happen How to reproduce it (as minimally and precisely as possible)

  1. register center and config center by nacos,and have conf data gain

    cloud:
    nacos:
      discovery:
        server-addr: 192.168.0.253:8848,192.168.0.253:8849,192.168.0.253:8850
      config:
        server-addr: 192.168.0.253:8848,192.168.0.253:8849,192.168.0.253:8850
        file-extension: yaml
        shared-dataids: all-service-common.yaml 
        refreshable-dataids: all-service-common.yaml 
  2. add zipkin

    <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-zipkin</artifactId>
    </dependency>
    zipkin:
    discovery-client-enabled: false
    base-url: http://192.168.0.251:9411/
    sleuth:
    sampler:
      probability: 1
  3. arbitrarily springmvc request,appear Exception

Tell us your environment SpringBoot 2.1.3.RELEASE SpringCloud Greenwich.RELEASE spring-cloud-alibaba 0.2.1.RELEASE nacos-server 0.8

fangjian0423 commented 5 years ago

spring-cloud-alibaba 0.2.1.RELEASE is build in SpringCloud Finchley and spring boot version is 2.0.X.

Maybe degrade your spring boot/cloud version can resolve this problem.

Fyuxuan commented 5 years ago

@fangjian0423 me temp use low method fix exception,ask about next release version when is expected to be released?

fangjian0423 commented 5 years ago

It will be released in 4.8 - 4.12 this week.

Fyuxuan commented 5 years ago

well. thanks

flystar32 commented 5 years ago

I don't think this is a issue for Spring Cloud Alibaba Nacos.

resgister zipkin to service registry center, or add configuration to let zipkin to use ip address directly can resolve this problem.

Fyuxuan commented 5 years ago

@flystar32 you see my configuration, use ip address ,but can't ,still has exception

Fyuxuan commented 5 years ago

actually request data to zipkin success,but nacos continue exception

asdhh1234 commented 5 years ago

actually request data to zipkin success,but nacos continue exception

Has this problem been solved now, and I have encountered such a problem.

eacdy commented 5 years ago

@Fyuxuan @asdhh1234 @flystar32

这是个Spring Cloud Sleuth的Bug,我这篇文章详细分析了原因以及规避方案: 解决Spring Cloud Alibaba/Spring Cloud整合Zipkin之后的报错问题