Skip to content

convert 0 rules but there are 1 rules from datasource . RuleCLass: FlowRule #846

@cxk502401673

Description

@cxk502401673

sentinel convert 0 rules but there are 1 rules from datasource . RuleCLass: FlowRule

这是什么原因导致的?

Activity

sentinel-bot

sentinel-bot commented on Jun 18, 2019

@sentinel-bot
Collaborator

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

What caused this?

sczyh30

sczyh30 commented on Jun 18, 2019

@sczyh30
Member

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

fangjian0423 commented on Jun 18, 2019

@fangjian0423
Contributor

And provider your flow rule json, maybe the json is invalid.

dingdongliang

dingdongliang commented on Jun 19, 2019

@dingdongliang

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

fangjian0423 commented on Jun 19, 2019

@fangjian0423
Contributor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    integration/spring-cloudIssue related to Spring Cloud Alibaba integrationkind/questionCategory issues related to questions or problems

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @fangjian0423@sczyh30@dingdongliang@cxk502401673@sentinel-bot

        Issue actions

          convert 0 rules but there are 1 rules from datasource . RuleCLass: FlowRule · Issue #846 · alibaba/Sentinel