添加没有持久性的新降级规则将导致监视器失败
2018-08-22 09:48:43 receive rule change:degrade 2018-08-22 09:48:43 [{"count":1.0,"cut":false,"grade":0,"limitApp":"default","passCount":0,"resource":"pact","timeWindow":2}] 2018-08-22 09:48:43 SentinelProperty, config is real updated to: [DegradeRule{resource=null, grade=0, count=1.0, limitApp=null, timeWindow=2}] 2018-08-22 09:48:43 null java.lang.NullPointerException at java.util.concurrent.ConcurrentHashMap.hash(ConcurrentHashMap.java:333) at java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:988) at com.alibaba.csp.sentinel.slots.block.degrade.DegradeRuleManager$RulePropertyListener.loadDegradeConf(DegradeRuleManager.java:150) at com.alibaba.csp.sentinel.slots.block.degrade.DegradeRuleManager$RulePropertyListener.configUpdate(DegradeRuleManager.java:120) at com.alibaba.csp.sentinel.slots.block.degrade.DegradeRuleManager$RulePropertyListener.configUpdate(DegradeRuleManager.java:116) at com.alibaba.csp.sentinel.property.DynamicSentinelProperty.updateValue(DynamicSentinelProperty.java:57) at com.alibaba.csp.sentinel.slots.block.degrade.DegradeRuleManager.loadRules(DegradeRuleManager.java:110) at com.alibaba.csp.sentinel.command.handler.ModifyRulesCommandHandler.handle(ModifyRulesCommandHandler.java:110) at com.alibaba.csp.sentinel.transport.command.http.HttpEventTask.run(HttpEventTask.java:89) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745)
原提问者GitHub用户zhangguorong1989
请确认您的项目中是否使用了 fastjson,若引入了 fastjson 请确保其与 Sentinel 相关依赖中的 fastjson 版本一致(e.g. 0.1.1 -> 1.2.47)。
原回答者GitHub用户sczyh30
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。
阿里云拥有国内全面的云原生产品技术以及大规模的云原生应用实践,通过全面容器化、核心技术互联网化、应用 Serverless 化三大范式,助力制造业企业高效上云,实现系统稳定、应用敏捷智能。拥抱云原生,让创新无处不在。