You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2021/08/18 15:05:43 UTC
[GitHub] [dubbo] EarthChen opened a new issue #8539: [dubbo 3.0.2] dubbo with spring-boot-web cant get available Invoker
EarthChen opened a new issue #8539:
URL: https://github.com/apache/dubbo/issues/8539
- [ ] I have searched the [issues](https://github.com/apache/dubbo/issues) of this repository and believe that this is not a duplicate.
- [ ] I have checked the [FAQ](https://github.com/apache/dubbo/blob/master/FAQ.md) of this repository and believe that this is not a duplicate.
### Environment
* Dubbo version: 3.0.2
* Operating System version: macos
* Java version: 8
### Steps to reproduce this issue
1. use `dubbo-spring-boot-starter` and `spring-boot-starter-web` build producers and consumers.
2. first run producers
3. second run consumers
## Case 1 (correct)
run with unit test,everything is ok
```java
@org.junit.jupiter.api.Test
public void sayHello() {
try {
HelloReply helloReply = myServiceStub.sayHello(HelloRequest.newBuilder().setName("ssss").build());
System.out.println(helloReply);
} catch (Exception e) {
LocalDateTime now = LocalDateTime.now();
log.error("", e);
}
}
```
## Case 2 (error)
run with web controller, an error will occur
```java
@RestController
@RequestMapping("/test")
@Slf4j
public class TestController {
@DubboReference
private MyService myServiceStub;
@GetMapping
public Object test() {
log.info("------------test");
myServiceStub.sayHello(HelloRequest.newBuilder().build());
return "ok";
}
}
```
config like this
```
dubbo:
application:
name: ${spring.application.name}
registry:
address: zookeeper://127.0.0.1:2181
consumer:
timeout: 4000
check: true
```
if you disabled `dubbo.consumer.check` ,The error will occur at call time
>- version 3.0.1 is fine
>- https://github.com/EarthChen/dubbo-triple-demo/tree/dubbo3.0.2-bug
### Expected Result
good running
### Actual Result
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]
```
--
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: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo] EarthChen commented on issue #8539: [dubbo 3.0.2] dubbo with spring-boot-web cant get available Invoker
Posted by GitBox <gi...@apache.org>.
EarthChen commented on issue #8539:
URL: https://github.com/apache/dubbo/issues/8539#issuecomment-903518421
> So it turns out to be an IDE using issue?
yes, but this also is a bug
--
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: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo] EarthChen commented on issue #8539: [dubbo 3.0.2] dubbo with spring-boot-web cant get available Invoker
Posted by GitBox <gi...@apache.org>.
EarthChen commented on issue #8539:
URL: https://github.com/apache/dubbo/issues/8539#issuecomment-901713136
After various attempts, the findings are as follows:
- idea 2021.2 will add vm options `-noverify`
![image](https://user-images.githubusercontent.com/20179425/130034322-540f8ded-4e8b-4c29-af1f-0ddde31037d3.png)
- if you run without `-noverify`, everything is ok
--
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: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo] chickenlj commented on issue #8539: [dubbo 3.0.2] dubbo with spring-boot-web cant get available Invoker
Posted by GitBox <gi...@apache.org>.
chickenlj commented on issue #8539:
URL: https://github.com/apache/dubbo/issues/8539#issuecomment-903517399
So it turns out to be an IDE using issue?
--
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: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org