消费端需要启动两次No provider available for the service
- Dominant language
- Java
- Stars
- 41.6k
- Forks
- 26.4k
- Avg merge
- 15h 13m
- Merged PRs (30d)
- 4
Description
- [ ] 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-SNAPSHOT
* Operating System version: maos
* Java version: jdk15
### 复现步骤
1. 先启动服务端
2. 启动消费端(check=false)
3. 调用接口消费服务报500错误,停止消费端服务(服务端保持开启)再重新启动 接口又访问正常。我每次服务重启一次,消费端都要这样重启两次才可以。
### 配置文件(provider和consumer 的dubbo配置方式相同)
dubbo:
consumer:
check: false
registry:
address: nacos://${nacos.host}:${nacos.port}/?username=${nacos.username}&password=${nacos.password}
application:
register-mode: instance
service-discovery:
migration: FORCE_APPLICATION
name: userConsumer
Pls. provide [GitHub address] to reproduce this issue.
### Expected Result
What do you expected from the above steps?
### Actual Result
What actually happens?
消费端异常消息如下:
Failed to invoke the method addUser in the service com.api.study.UserService. No provider available for the service com.api.study.UserService from registry 127.0.0.1:8848 on the consumer 172.16.11.8 using the dubbo version 3.0.2-SNAPSHOT. Please check if the providers have been started and registered.
Just put your stack trace here!
```
Contributor guide
Research direction
Start by reproducing the listed provider/consumer startup sequence with Dubbo 3.0.2-SNAPSHOT, JDK 15, Nacos, and the shown configuration, then trace the consumer's service-discovery and registry lookup path. Done means the first invocation succeeds after the provider starts, without restarting the consumer; add a regression test if the relevant test location can be identified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- distributed-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100