emqx / emqx-rule-engine

EMQX Rule Engine
https://www.emqx.com
Apache License 2.0
70 stars 30 forks source link

Emqx rule crashes #159

Closed daadu closed 4 years ago

daadu commented 4 years ago
2020-06-02 13:07:19.873 [critical] Can not re-build rule <<"rule:0af78057">>: {resource_not_initialized,<<"resource:1d373635">>}. The rule is disabled.Fix the issue and enable it manually.
Stacktrace: [{emqx_rule_engine,with_resource_params,1,[{file,"/emqx_rel/_build/emqx/lib/emqx_rule_engine/src/emqx_rule_engine.erl"},{line,356}]},{emqx_rule_engine,'-refresh_actions/2-fun-0-',2,[{file,"/emqx_rel/_build/emqx/lib/emqx_rule_engine/src/emqx_rule_engine.erl"},{line,528}]},{lists,foreach,2,[{file,"lists.erl"},{line,1338}]},{emqx_rule_engine,'-refresh_rules/0-lc$^0/1-0-',1,[{file,"/emqx_rel/_build/emqx/lib/emqx_rule_engine/src/emqx_rule_engine.erl"},{line,306}]},{emqx_rule_engine,refresh_rules,0,[{file,"/emqx_rel/_build/emqx/lib/emqx_rule_engine/src/emqx_rule_engine.erl"},{line,314}]},{emqx_rule_engine_app,start,2,[{file,"/emqx_rel/_build/emqx/lib/emqx_rule_engine/src/emqx_rule_engine_app.erl"},{line,33}]},{application_master,start_it_old,4,[{file,"application_master.erl"},{line,277}]}]

Can some one explain the issue?

terry-xiaoyu commented 4 years ago

As the log message explained, the resource named 'resource:1d373635' cannot be started (may due to the connection cannot be established), so the associated rule 'rule:0af78057' cannot be rebuilt at emqx bootup.

You could establish the resource manually and then enable the rule in the dashboard.

daadu commented 4 years ago

Restarting emqx did the work. If its because of connection issue I will look into it. I am running it in a k8s cluster

daadu commented 4 years ago

Closing this issue as this issue did not reoccure