-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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上的文件 #315
Comments
转换不了指的是转换失败还是成功了但是规则没有生效。 可以详细说一下要转换什么类型的规则,规则的 json 以及 application.properties 配置文件信息等内容。 |
很抱歉回复晚了 我的环境:nacos在远端服务器,sentinel控制台和客户端都在本地 1、转换不了指的是nacos接收到了sentinel控制台发来限流规则的json,但sentinel客户端却认为是无效的的格式 Sentinel JsonConverter Source list size is not equals to Target List, maybe a part of json is invalid. Source List: [{app=fool-zuul, gmtModified=1548291859739, resource=/auth/oauth/token, grade=1, controlBehavior=0, count=2.0, id=1, limitApp=default, strategy=0, clusterMode=false}], Target List: [] 配置: |
Hi @naturalyui ,感谢关注 Spring Cloud Alibaba. Sentinel Starter 里的 目前最新的 0.2.1.RELEASE 版本中会对规则进行自动解析,判断 json 属于哪种规则,这种模式在某些情况下会存在 bug。 所以下个版本中去除了自动解析的方式,添加了一个新的字段 rule-type,表示是哪种规则。在最新的 sentinel-core-example 中有了例子。 |
十分感谢解答! |
sentinel-server是1.4.0版本和客户端的一致,
![image](https://user-images.githubusercontent.com/26024263/51595814-857e8d00-1f32-11e9-88ce-2c88f421a167.png)
![image](https://user-images.githubusercontent.com/26024263/51596050-0b9ad380-1f33-11e9-85a2-2c2405f1f0ea.png)
不知道为什么通过nacos触发就转换不了,也看不到具体异常
我将这部分代码单独抽出来请求是可以正常转换的
目前测试了一下只有这种格式可以被正常转换
![image](https://user-images.githubusercontent.com/26024263/51596109-266d4800-1f33-11e9-80e7-ca14aa2ac118.png)
但是从sentinel那边传过来的格式并不是这样的,需要我自己去过滤格式
The text was updated successfully, but these errors were encountered: