alibaba / alibaba/Sentinel

[BUG] 使用nacos作为规则数据源时,获取初始化配置失败

Open
#3,401 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
23.1k
Forks
8.1k
PR merge metrics
No merged PRs in 30d

Description

## Issue Description

Type: *bug report*

### Describe what happened
当spring boot应用使用nacos作为sentinel数据源时,启动时会到nacos server获取一次初始化配置,但是由于nacos账号密码配置在此时还没有初始化到SecurityProxy中,导致初始化配置读取失败

### Describe what you expected to happen
nacos账号密码配置在读取远程初始化配置前初始化完成

### How to reproduce it (as minimally and precisely as possible)

1. spring boot 2.6.14版本
2. spring-cloud-starter-alibaba-sentinel 2021.0.5.0版本,使用nacos作为数据源
3. nacos client 1.4.7版本
4. 简单spring boot应用,配置使用nacos作为规则数据源即可验证

### Tell us your environment
如上

### Anything else we need to know?

Contributor guide

Open the contributing guide

Research direction

Start with the Spring Boot startup path for the Sentinel Nacos data source and trace how SecurityProxy is initialized before the remote initialization configuration is fetched. Reproduce with the listed Spring Boot, Spring Cloud Alibaba Sentinel, and Nacos client versions; done means the Nacos credentials are available before the initial configuration read succeeds.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring-boot
Domain
backend, distributed-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.