You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @cxk502401673, we detect non-English characters in the issue. This comment is an auto translation from @sentinel-bot to help other users to understand this issue. We encourage you to describe your issue in English which is more friendly to other users.
convert 0 rules but there are 1 rules from datasource . RuleCLass: FlowRule
sentinel convert 0 rules but there are 1 rules from datasource . RuleCLass: FlowRule
Activity
sentinel-bot commentedon Jun 18, 2019
convert 0 rules but there are 1 rules from datasource . RuleCLass: FlowRule
sentinel convert 0 rules but there are 1 rules from datasource . RuleCLass: FlowRule
What caused this?
sczyh30 commentedon Jun 18, 2019
Could you please provide some detail information (e.g. your Sentinel version and use case)?
And please check whether your fastjson version is too low.
fangjian0423 commentedon Jun 18, 2019
And provider your flow rule json, maybe the json is invalid.
dingdongliang commentedon Jun 19, 2019
convert error: convert 0 rules but there are 2 rules from datasource. RuleClass: FlowRule
我也遇到这个问题,环境说明:sentinel1.6.0版本
写了个demo,用于sentinel-dashboard写限流规则保存到nacos中,保存完以后,类似的规则是这样的:
[{
"app":"sentinel-learn",
"clusterConfig":{
"fallbackToLocalWhenFail":true,
"sampleCount":10,
"strategy":0,
"thresholdType":0,
"windowIntervalMs":1000
},
"clusterMode":false,
"controlBehavior":0,
"count":34,
"gmtCreate":1560935223271,
"gmtModified":1560935223271,
"grade":1,
"id":8,
"ip":"192.168.1.84",
"limitApp":"default",
"port":8720,
"resource":"user",
"strategy":0
}]
然后,启动一个springboot程序拉取nacos的限流规则,就出现这个错误
如果保存在nacos的限流规则是类似这样的
[{
"resource":"user",
"controlBehavior":0,
"count":2,
"grade":1,
"limitApp":"default",
"clusterMode":false,
"strategy":"0"
}]
就可以成功拉取过来
fangjian0423 commentedon Jun 19, 2019
@dingdongliang @cxk502401673 refer alibaba/spring-cloud-alibaba#569
dingdongliang commentedon Jun 20, 2019
搞定了,多谢@fangjian0423