rajaluo opened a new issue, #15013:
URL: https://github.com/apache/dubbo/issues/15013

   ### Pre-check
   
   - [X] I am sure that all the content I provide is in English.
   
   
   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/dubbo/issues?q=is%3Aissue) and found no 
similar issues.
   
   
   ### Apache Dubbo Component
   
   Java SDK (apache/dubbo)
   
   ### Dubbo Version
   
   Dubbo Java 3.3.2, JDK 17, SpringBoot 3.2.3, spring.cloud 2023.0.0, Nacos 
2.4.3
   
   ### Steps to reproduce this issue
   
   **一、Provider:** 
   1.application.yml
   <img width="382" alt="image" 
src="https://github.com/user-attachments/assets/0acca377-1573-4159-93f9-9d629bb58217";
 />
   
   2.SpringCloudApplication
   <img width="635" alt="image" 
src="https://github.com/user-attachments/assets/e28947fa-f83c-413a-83eb-920ef6ce6a2b";
 />
   
   3.Controller
   <img width="998" alt="image" 
src="https://github.com/user-attachments/assets/e3f94cc3-321b-428a-82da-5707d04aea12";
 />
   
   4.Model
   <img width="570" alt="image" 
src="https://github.com/user-attachments/assets/66ad001c-9e86-4bb3-ae06-9f4519162749";
 />
   
   
   
   **二、Consumer:**
   1.application.yml
   <img width="427" alt="image" 
src="https://github.com/user-attachments/assets/6b220351-ee77-4d86-8a31-f4a16970ce88";
 />
   
   2.SpringCloudApplication
   <img width="624" alt="image" 
src="https://github.com/user-attachments/assets/ebc71672-c1d4-4a74-ab55-187b5f6a5138";
 />
   
   3.Controller
   <img width="811" alt="image" 
src="https://github.com/user-attachments/assets/c7497a2b-36f1-4edf-998d-5aadd5abae02";
 />
   
   4.Model
   <img width="571" alt="image" 
src="https://github.com/user-attachments/assets/655566b7-bc3d-4b80-9e24-bf66484e2226";
 />
   
   5.FeignClient
   <img width="822" alt="image" 
src="https://github.com/user-attachments/assets/f51eca01-50bc-4a76-b2c5-6afb2890f3da";
 />
   
   
   6.RestTemplate
   <img width="683" alt="image" 
src="https://github.com/user-attachments/assets/bb355893-0d64-4585-98af-0eb15752abc7";
 />
   
   
   **三、Nacos**
   <img width="1637" alt="image" 
src="https://github.com/user-attachments/assets/c5e24fb7-4aba-4faf-9dd4-d749547beea0";
 />
   
   **四、Results**
   1.Providers are OK
   <img width="521" alt="image" 
src="https://github.com/user-attachments/assets/d7185d54-db96-4b3d-a34b-a00fd4040888";
 />
   <img width="405" alt="image" 
src="https://github.com/user-attachments/assets/85e8fe9c-3ea5-4697-b2db-5be3c71dded7";
 />
   
   2.Consumers do not work healthy
   <img width="741" alt="image" 
src="https://github.com/user-attachments/assets/d1ef1a35-d0bb-41d1-a166-9fb6e1343e70";
 />
   
   `2024-12-24T00:21:57.105+08:00 ERROR 9109 --- [spring-cloud-consumer] 
[nio-7099-exec-7] o.a.c.c.C.[.[.[.[dispatcherServlet]      : Servlet.service() 
for servlet [dispatcherServlet] in context with path [] threw exception 
[Request processing failed: org.apache.dubbo.rpc.RpcException: No provider 
available from registry RegistryDirectory(registry: 
127.0.0.1:8848)-Directory(invokers: 0[], validInvokers: 0[], 
invokersToReconnect: 0[]) for service 
org.apache.dubbo.samples.microservices.sc.feign.UserServiceFeign on consumer 
192.168.2.5 use dubbo version 3.3.2, please check status of providers(disabled, 
not registered or in blocklist).] with root cause
   
   org.apache.dubbo.rpc.RpcException: No provider available from registry 
RegistryDirectory(registry: 127.0.0.1:8848)-Directory(invokers: 0[], 
validInvokers: 0[], invokersToReconnect: 0[]) for service 
org.apache.dubbo.samples.microservices.sc.feign.UserServiceFeign on consumer 
192.168.2.5 use dubbo version 3.3.2, please check status of providers(disabled, 
not registered or in blocklist).
        at 
org.apache.dubbo.registry.integration.DynamicDirectory.doList(DynamicDirectory.java:204)
 ~[dubbo-3.3.2.jar:3.3.2]
        at 
org.apache.dubbo.rpc.cluster.directory.AbstractDirectory.list(AbstractDirectory.java:232)
 ~[dubbo-3.3.2.jar:3.3.2]
        at 
org.apache.dubbo.rpc.cluster.support.AbstractClusterInvoker.list(AbstractClusterInvoker.java:452)
 ~[dubbo-3.3.2.jar:3.3.2]
        at 
org.apache.dubbo.rpc.cluster.support.AbstractClusterInvoker.invoke(AbstractClusterInvoker.java:355)
 ~[dubbo-3.3.2.jar:3.3.2]
        at 
org.apache.dubbo.rpc.cluster.router.RouterSnapshotFilter.invoke(RouterSnapshotFilter.java:46)
 ~[dubbo-3.3.2.jar:3.3.2]
        at 
org.apache.dubbo.rpc.cluster.filter.FilterChainBuilder$CopyOfFilterChainNode.invoke(FilterChainBuilder.java:349)
 ~[dubbo-3.3.2.jar:3.3.2]
        at 
org.apache.dubbo.monitor.support.MonitorFilter.invoke(MonitorFilter.java:109) 
~[dubbo-3.3.2.jar:3.3.2]
        at 
org.apache.dubbo.rpc.cluster.filter.FilterChainBuilder$CopyOfFilterChainNode.invoke(FilterChainBuilder.java:349)
 ~[dubbo-3.3.2.jar:3.3.2]
        at 
org.apache.dubbo.rpc.cluster.filter.support.MetricsClusterFilter.invoke(MetricsClusterFilter.java:57)
 ~[dubbo-3.3.2.jar:3.3.2]
        at 
org.apache.dubbo.rpc.cluster.filter.FilterChainBuilder$CopyOfFilterChainNode.invoke(FilterChainBuilder.java:349)
 ~[dubbo-3.3.2.jar:3.3.2]
        at 
org.apache.dubbo.rpc.protocol.dubbo.filter.FutureFilter.invoke(FutureFilter.java:53)
 ~[dubbo-3.3.2.jar:3.3.2]
        at 
org.apache.dubbo.rpc.cluster.filter.FilterChainBuilder$CopyOfFilterChainNode.invoke(FilterChainBuilder.java:349)
 ~[dubbo-3.3.2.jar:3.3.2]
        at 
org.apache.dubbo.spring.security.filter.ContextHolderParametersSelectedTransferFilter.invoke(ContextHolderParametersSelectedTransferFilter.java:40)
 ~[dubbo-3.3.2.jar:3.3.2]
        at 
org.apache.dubbo.rpc.cluster.filter.FilterChainBuilder$CopyOfFilterChainNode.invoke(FilterChainBuilder.java:349)
 ~[dubbo-3.3.2.jar:3.3.2]
        at 
org.apache.dubbo.metrics.filter.MetricsFilter.invoke(MetricsFilter.java:86) 
~[dubbo-3.3.2.jar:3.3.2]
        at 
org.apache.dubbo.rpc.cluster.filter.support.MetricsConsumerFilter.invoke(MetricsConsumerFilter.java:38)
 ~[dubbo-3.3.2.jar:3.3.2]
        at 
org.apache.dubbo.rpc.cluster.filter.FilterChainBuilder$CopyOfFilterChainNode.invoke(FilterChainBuilder.java:349)
 ~[dubbo-3.3.2.jar:3.3.2]
        at 
org.apache.dubbo.rpc.cluster.filter.support.ConsumerClassLoaderFilter.invoke(ConsumerClassLoaderFilter.java:40)
 ~[dubbo-3.3.2.jar:3.3.2]
        at 
org.apache.dubbo.rpc.cluster.filter.FilterChainBuilder$CopyOfFilterChainNode.invoke(FilterChainBuilder.java:349)
 ~[dubbo-3.3.2.jar:3.3.2]
        at 
org.apache.dubbo.tracing.filter.ObservationSenderFilter.invoke(ObservationSenderFilter.java:60)
 ~[dubbo-3.3.2.jar:3.3.2]
        at 
org.apache.dubbo.rpc.cluster.filter.FilterChainBuilder$CopyOfFilterChainNode.invoke(FilterChainBuilder.java:349)
 ~[dubbo-3.3.2.jar:3.3.2]
        at 
org.apache.dubbo.rpc.cluster.filter.support.ConsumerContextFilter.invoke(ConsumerContextFilter.java:119)
 ~[dubbo-3.3.2.jar:3.3.2]
        at 
org.apache.dubbo.rpc.cluster.filter.FilterChainBuilder$CopyOfFilterChainNode.invoke(FilterChainBuilder.java:349)
 ~[dubbo-3.3.2.jar:3.3.2]
        at 
org.apache.dubbo.rpc.cluster.filter.FilterChainBuilder$CallbackRegistrationInvoker.invoke(FilterChainBuilder.java:197)
 ~[dubbo-3.3.2.jar:3.3.2]
        at 
org.apache.dubbo.rpc.cluster.support.wrapper.AbstractCluster$ClusterFilterInvoker.invoke(AbstractCluster.java:101)
 ~[dubbo-3.3.2.jar:3.3.2]
        at 
org.apache.dubbo.rpc.cluster.support.wrapper.MockClusterInvoker.invoke(MockClusterInvoker.java:107)
 ~[dubbo-3.3.2.jar:3.3.2]
        at 
org.apache.dubbo.rpc.cluster.support.wrapper.ScopeClusterInvoker.invoke(ScopeClusterInvoker.java:171)
 ~[dubbo-3.3.2.jar:3.3.2]
        at 
org.apache.dubbo.registry.client.migration.MigrationInvoker.invoke(MigrationInvoker.java:294)
 ~[dubbo-3.3.2.jar:3.3.2]
        at 
org.apache.dubbo.rpc.proxy.InvocationUtil.invoke(InvocationUtil.java:64) 
~[dubbo-3.3.2.jar:3.3.2]
        at 
org.apache.dubbo.rpc.proxy.InvokerInvocationHandler.invoke(InvokerInvocationHandler.java:81)
 ~[dubbo-3.3.2.jar:3.3.2]
        at 
org.apache.dubbo.samples.microservices.sc.feign.UserServiceFeignDubboProxy0.getUsers(UserServiceFeignDubboProxy0.java)
 ~[classes/:?]
        at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
~[?:?]
        at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
 ~[?:?]
        at 
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 ~[?:?]
        at java.base/java.lang.reflect.Method.invoke(Method.java:569) ~[?:?]
        at 
org.apache.dubbo.config.spring.util.LazyTargetInvocationHandler.invoke(LazyTargetInvocationHandler.java:54)
 ~[dubbo-3.3.2.jar:3.3.2]
        at 
org.apache.dubbo.samples.microservices.sc.feign.UserServiceFeignDubboProxy0.getUsers(UserServiceFeignDubboProxy0.java)
 ~[classes/:?]
        at 
org.apache.dubbo.samples.microservices.sc.UserController.doRestAliveUsingFeign(UserController.java:58)
 ~[classes/:?]
        at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
~[?:?]
        at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
 ~[?:?]
        at 
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 ~[?:?]
        at java.base/java.lang.reflect.Method.invoke(Method.java:569) ~[?:?]
        at 
org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:259)
 ~[spring-web-6.1.4.jar:6.1.4]
        at 
org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:192)
 ~[spring-web-6.1.4.jar:6.1.4]
        at 
org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:118)
 ~[spring-webmvc-6.1.4.jar:6.1.4]
        at 
org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:920)
 ~[spring-webmvc-6.1.4.jar:6.1.4]
        at 
org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:830)
 ~[spring-webmvc-6.1.4.jar:6.1.4]
        at 
org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
 ~[spring-webmvc-6.1.4.jar:6.1.4]
        at 
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1089)
 ~[spring-webmvc-6.1.4.jar:6.1.4]
        at 
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:979)
 ~[spring-webmvc-6.1.4.jar:6.1.4]
        at 
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1014)
 ~[spring-webmvc-6.1.4.jar:6.1.4]
        at 
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:903)
 ~[spring-webmvc-6.1.4.jar:6.1.4]
        at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:564) 
~[tomcat-embed-core-10.1.19.jar:6.0]
        at 
org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:885)
 ~[spring-webmvc-6.1.4.jar:6.1.4]
        at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:658) 
~[tomcat-embed-core-10.1.19.jar:6.0]
        at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:205)
 ~[tomcat-embed-core-10.1.19.jar:10.1.19]
        at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149)
 ~[tomcat-embed-core-10.1.19.jar:10.1.19]
        at 
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51) 
~[tomcat-embed-websocket-10.1.19.jar:10.1.19]
        at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174)
 ~[tomcat-embed-core-10.1.19.jar:10.1.19]
        at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149)
 ~[tomcat-embed-core-10.1.19.jar:10.1.19]
        at 
org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100)
 ~[spring-web-6.1.4.jar:6.1.4]
        at 
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
 ~[spring-web-6.1.4.jar:6.1.4]
        at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174)
 ~[tomcat-embed-core-10.1.19.jar:10.1.19]
        at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149)
 ~[tomcat-embed-core-10.1.19.jar:10.1.19]
        at 
org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93)
 ~[spring-web-6.1.4.jar:6.1.4]
        at 
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
 ~[spring-web-6.1.4.jar:6.1.4]
        at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174)
 ~[tomcat-embed-core-10.1.19.jar:10.1.19]
        at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149)
 ~[tomcat-embed-core-10.1.19.jar:10.1.19]
        at 
org.springframework.web.filter.ServerHttpObservationFilter.doFilterInternal(ServerHttpObservationFilter.java:109)
 ~[spring-web-6.1.4.jar:6.1.4]
        at 
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
 ~[spring-web-6.1.4.jar:6.1.4]
        at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174)
 ~[tomcat-embed-core-10.1.19.jar:10.1.19]
        at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149)
 ~[tomcat-embed-core-10.1.19.jar:10.1.19]
        at 
org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)
 ~[spring-web-6.1.4.jar:6.1.4]
        at 
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
 ~[spring-web-6.1.4.jar:6.1.4]
        at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174)
 ~[tomcat-embed-core-10.1.19.jar:10.1.19]
        at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149)
 ~[tomcat-embed-core-10.1.19.jar:10.1.19]
        at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:167)
 [tomcat-embed-core-10.1.19.jar:10.1.19]
        at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:90)
 [tomcat-embed-core-10.1.19.jar:10.1.19]
        at 
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:482)
 [tomcat-embed-core-10.1.19.jar:10.1.19]
        at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:115) 
[tomcat-embed-core-10.1.19.jar:10.1.19]
        at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93) 
[tomcat-embed-core-10.1.19.jar:10.1.19]
        at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
 [tomcat-embed-core-10.1.19.jar:10.1.19]
        at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:344) 
[tomcat-embed-core-10.1.19.jar:10.1.19]
        at 
org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:391) 
[tomcat-embed-core-10.1.19.jar:10.1.19]
        at 
org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63)
 [tomcat-embed-core-10.1.19.jar:10.1.19]
        at 
org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:896)
 [tomcat-embed-core-10.1.19.jar:10.1.19]
        at 
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1744)
 [tomcat-embed-core-10.1.19.jar:10.1.19]
        at 
org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52) 
[tomcat-embed-core-10.1.19.jar:10.1.19]
        at 
org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)
 [tomcat-embed-core-10.1.19.jar:10.1.19]
        at 
org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
 [tomcat-embed-core-10.1.19.jar:10.1.19]
        at 
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:63)
 [tomcat-embed-core-10.1.19.jar:10.1.19]
        at java.base/java.lang.Thread.run(Thread.java:840) [?:?]
   `
   
   **org.apache.dubbo.rpc.RpcException: No provider available from registry 
RegistryDirectory(registry: 127.0.0.1:8848)-Directory(invokers: 0[], 
validInvokers: 0[], invokersToReconnect: 0[]) for service 
org.apache.dubbo.samples.microservices.sc.feign.UserServiceFeign on consumer 
192.168.2.5 use dubbo version 3.3.2, please check status of providers(disabled, 
not registered or in blocklist)**.
   
   It Seems that annotation DubboReference.providedBy takes no effect on 
version 3.3.2, it searched 
"org.apache.dubbo.samples.microservices.sc.feign.UserServiceFeign" but not 
"dubbo-provider-for-dubbo" which was given by DubboReference.providedBy as 
codes below:
   
   @DubboReference(providedBy = "dubbo-provider-for-dubbo", check = false)  
//RAJA
       private  UserServiceFeign userServiceFeign;
   
   ### What you expected to happen
   
   expected the annotation DubboReference.providedBy takes effect to search the 
given value 
   
   ### Anything else
   
   Every time it occurs, wish this will be fixed , because it is a good way to 
migrate from springcloud to dubbo with little effort(no need to rewrite the 
business codes which will have very much cost). Maybe I will submit a pull 
request, I'm not sure. 
   
   ### Are you willing to submit a pull request to fix on your own?
   
   - [ ] Yes I am willing to submit a pull request on my own!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to