Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sentinel规则持久化到Nacos配置中心报错 #3362

Open
shining-stars-lk opened this issue Mar 20, 2024 · 3 comments
Open

Sentinel规则持久化到Nacos配置中心报错 #3362

shining-stars-lk opened this issue Mar 20, 2024 · 3 comments

Comments

@shining-stars-lk
Copy link

版本

  • sentinel 1.8.6
  • nacos 2.24

发生的时机

在使用Sentinel的后台管理时候,将配置的限流规则,持久化到nacos时,报错

失败:com.alibaba.nacos.api.exception.NacosException, <html><body><h1>Whitelabel Error Page</h1><p>This application has no explicit mapping for /error, so you are seeing this as a fallback.</p><div id='created'>Wed Mar 20 17:35:49 CST 2024</div><div>There was an unexpected error (type=Forbidden, status=403).</div><div>user not found!</div></body></html>

发生的原因

我知道这是nacos的权限功能的问题,在普通SpringBoot服务连接nacos的依赖是:

<dependency>
            <groupId>com.alibaba.cloud</groupId>
            <artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
        </dependency>

通过spring.cloud.nacos.usernamespring.cloud.nacos.password 配置项来连接nacos
但是sentinel没有这个配置,要怎么解决呢

@sirius19
Copy link

https://gitee.com/sirius19/sentinel-nacos 可以参考一下我改造的代码,dashboard把规则保存到nacos,以及规则反显

@thetcc
Copy link

thetcc commented Apr 11, 2024

MARK

@rowstop
Copy link

rowstop commented May 6, 2024

sentinel-dashboard-push 参考

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants