alibaba / Sentinel

A powerful flow control component enabling reliability, resilience and monitoring for microservices. (面向云原生微服务的高可用流控防护组件)
https://sentinelguard.io/
Apache License 2.0
22.32k stars 8k forks source link

The interface cannot be called normally after the dubbo project is accessed. #691

Closed cookiejoo closed 5 years ago

cookiejoo commented 5 years ago

我用了Dubbo2.7.1版本,没有接入Sentinel是可以正常调用的,只要引用了Sentinel的maven包后客户端调用就异常了。

org.springframework.boot spring-boot-starter-web org.springframework.boot spring-boot-starter-test test org.apache.dubbo dubbo-spring-boot-starter 2.7.1 org.springframework.cloud spring-cloud-starter-alibaba-sentinel 0.2.1.RELEASE org.apache.dubbo dubbo 2.7.1 org.apache.zookeeper zookeeper 3.4.14 org.apache.curator curator-framework 4.2.0 org.apache.curator curator-recipes 4.2.0 com.alibaba.csp sentinel-web-servlet 1.5.1 com.alibaba.csp sentinel-transport-simple-http 1.5.1 com.alibaba.csp sentinel-dubbo-adapter 1.5.1 com.alibaba.csp sentinel-annotation-aspectj 1.5.1 com.alibaba.csp
sentinel-bot commented 5 years ago

Hi @cookiejoo, we detect non-English characters in the issue. This comment is an auto translation from @sentinel-bot to help other users to understand this issue. We encourage you to describe your issue in English which is more friendly to other users.

The interface cannot be called normally after the dubbo project is accessed.

I used Dubbo 2.7.1 version. It can be called normally without accessing Sentinel. As long as the Sentinel maven package is referenced, the client call is abnormal.

org.springframework.boot spring-boot-starter-web org.springframework.boot spring-boot-starter-test test org.apache.dubbo dubbo-spring-boot-starter 2.7.1 org.springframework.cloud spring-cloud-starter-alibaba-sentinel 0.2.1.RELEASE org.apache.dubbo dubbo 2.7.1 org.apache.zookeeper zookeeper 3.4.14 org.apache.curator curator-framework 4.2.0 org.apache.curator curator-recipes 4.2.0 com.alibaba.csp sentinel-web-servlet 1.5.1 com.alibaba.csp sentinel-transport-simple-http 1.5.1 com.alibaba.csp sentinel-dubbo-adapter 1.5.1 com.alibaba.csp sentinel-annotation-aspectj 1.5.1 com.alibaba.csp
cookiejoo commented 5 years ago

2019-04-19 18:26:32.416 ERROR 45480 --- [nio-8086-exec-4] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.apache.dubbo.rpc.RpcException: Failed to invoke the method sayHello in the service com.demo.provider.service.IMyService. Tried 3 times of the providers [10.254.115.204:20881] (1/4) from the registry 10.94.30.167:2181 on the consumer 10.254.115.204 using the dubbo version 2.7.1. Last error is: com.alibaba.dubbo.rpc.RpcContext.getContext()Lcom/alibaba/dubbo/rpc/RpcContext;] with root cause

sczyh30 commented 5 years ago

Hi, for Dubbo 2.7.x you need to use sentinel-apache-dubbo-adapter instead of sentinel-dubbo-adapter. You can refer to the document: https://github.com/alibaba/Sentinel/wiki/Adapters-to-Popular-Framework#dubbo

Duplicate with #669

cookiejoo commented 5 years ago

Hi, for Dubbo 2.7.x you need to use sentinel-apache-dubbo-adapter instead of sentinel-dubbo-adapter. You can refer to the document: https://github.com/alibaba/Sentinel/wiki/Adapters-to-Popular-Framework#dubbo

Duplicate with #669

thank you very mush