apache / apache/dubbo

用nacos作为注册中心,consumer报no provider

Open
#11,286 9 comments 0 reactions 0 assignees View on GitHub
type/bug
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.

### Environment

* Dubbo version: 2.7.18
* Operating System version: Ubuntu 20.04.5 LTS
* Java version: 1.8.0_202

### Steps to reproduce this issue

1. 配置dubboreference
2. 启动服务
3. 调用服务,报no provider

Pls. provide [GitHub address] to reproduce this issue.

### 服务调用成功

### 调用异常,报no provider

1. 服务启动时,服务注册consumer后 , dubbo收到nacos下发的当前服务的consumer信息变更事件,dubbo会用empty协议的本地provider变更服务provider注册信息
2. 如果此事件处理在正常实例下发事件处理之后,此时变更实例数为1,导致注册中的forbidden设置为true;则后续调用会产生no provider异常。
![image](https://user-images.githubusercontent.com/3817110/211776437-88eafd30-ff30-46ae-8f82-3b1cbbca6a5b.png)

![image](https://user-images.githubusercontent.com/3817110/211775187-450ec3ad-6ba9-4a00-89bf-6652608e6fdd.png)

```
Just put your stack trace here!
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.