the consumers cant get available Invoker and throw exception
If there is an exception, please attach the exception trace:
ava.lang.IllegalStateException: Failed to check the status of the service com.earthchen.rpc.lib.MyService. No provider available for the service com.earthchen.rpc.lib.MyService from the url dubbo://192.168.1.185/com.earthchen.rpc.lib.MyService?application=test-dubbo-consumer&check=true&dubbo=2.0.2&interface=com.earthchen.rpc.lib.MyService&metadata-type=remote&methods=sayHello,sayHelloAsync&pid=28374&qos.enable=false®ister.ip=192.168.1.185&release=3.0.2&revision=3.0.2&side=consumer&sticky=false&timeout=4000×tamp=1629297754008 to the consumer 192.168.1.185 use dubbo version 3.0.2
at org.apache.dubbo.config.ReferenceConfig.checkInvokerAvailable(ReferenceConfig.java:444) ~[dubbo-3.0.2.jar:3.0.2]
at org.apache.dubbo.config.ReferenceConfig.init(ReferenceConfig.java:337) ~[dubbo-3.0.2.jar:3.0.2]
at org.apache.dubbo.config.ReferenceConfig.get(ReferenceConfig.java:204) ~[dubbo-3.0.2.jar:3.0.2]
at org.apache.dubbo.config.utils.ReferenceConfigCache.lambda$get$3(ReferenceConfigCache.java:113) ~[dubbo-3.0.2.jar:3.0.2]
at java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1660) ~[na:1.8.0_275]
at org.apache.dubbo.config.utils.ReferenceConfigCache.get(ReferenceConfigCache.java:112) ~[dubbo-3.0.2.jar:3.0.2]
at org.apache.dubbo.config.bootstrap.DubboBootstrap.lambda$referServices$12(DubboBootstrap.java:1459) ~[dubbo-3.0.2.jar:3.0.2]
at java.util.concurrent.ConcurrentHashMap$ValuesView.forEach(ConcurrentHashMap.java:4707) ~[na:1.8.0_275]
at org.apache.dubbo.config.bootstrap.DubboBootstrap.referServices(DubboBootstrap.java:1438) ~[dubbo-3.0.2.jar:3.0.2]
at org.apache.dubbo.config.bootstrap.DubboBootstrap.doStart(DubboBootstrap.java:1153) ~[dubbo-3.0.2.jar:3.0.2]
at org.apache.dubbo.config.bootstrap.DubboBootstrap.start(DubboBootstrap.java:1119) ~[dubbo-3.0.2.jar:3.0.2]
at org.apache.dubbo.config.spring.context.DubboBootstrapApplicationListener.onContextRefreshedEvent(DubboBootstrapApplicationListener.java:109) ~[dubbo-3.0.2.jar:3.0.2]
at org.apache.dubbo.config.spring.context.DubboBootstrapApplicationListener.onApplicationContextEvent(DubboBootstrapApplicationListener.java:101) ~[dubbo-3.0.2.jar:3.0.2]
at org.apache.dubbo.config.spring.context.DubboBootstrapApplicationListener.onApplicationEvent(DubboBootstrapApplicationListener.java:78) ~[dubbo-3.0.2.jar:3.0.2]
at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172) ~[spring-context-5.2.15.RELEASE.jar:5.2.15.RELEASE]
at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165) ~[spring-context-5.2.15.RELEASE.jar:5.2.15.RELEASE]
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139) ~[spring-context-5.2.15.RELEASE.jar:5.2.15.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:404) ~[spring-context-5.2.15.RELEASE.jar:5.2.15.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:361) ~[spring-context-5.2.15.RELEASE.jar:5.2.15.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:898) ~[spring-context-5.2.15.RELEASE.jar:5.2.15.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:554) ~[spring-context-5.2.15.RELEASE.jar:5.2.15.RELEASE]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:143) ~[spring-boot-2.3.12.RELEASE.jar:2.3.12.RELEASE]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:755) [spring-boot-2.3.12.RELEASE.jar:2.3.12.RELEASE]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747) [spring-boot-2.3.12.RELEASE.jar:2.3.12.RELEASE]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:402) [spring-boot-2.3.12.RELEASE.jar:2.3.12.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:312) [spring-boot-2.3.12.RELEASE.jar:2.3.12.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1247) [spring-boot-2.3.12.RELEASE.jar:2.3.12.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1236) [spring-boot-2.3.12.RELEASE.jar:2.3.12.RELEASE]
at com.test.DubboConsumer.main(DubboConsumer.java:14) [main/:na]
Environment
Steps to reproduce this issue
use
dubbo-spring-boot-starter
andspring-boot-starter-web
build producers and consumers.first run producers
second run consumers
Case 1 (correct)
run with unit test,everything is ok
Case 2 (error)
run with web controller, an error will occur
config like this
if you disabled
dubbo.consumer.check
,The error will occur at call timeExpected Result
good running
Actual Result
the consumers cant get available Invoker and throw exception
If there is an exception, please attach the exception trace: