EMQ 问答社区

创建规则引擎时无法创建响应动作

问题描述

创建规则引擎时无法创建响应动作,点击“添加动作”无反应

环境信息

  • EMQ X 版本:4.2.5
  • 操作系统及版本:Ubuntu 18
  • 其他

详细日志

ubuntu@VM-0-12-ubuntu:~$ sudo emqx restart
EMQ X Enterprise 4.2.5 is stopped: ok
=ERROR REPORT==== 28-Mar-2021::10:04:50.310202 ===
[Plugins] Plugin emqx_rule_engine is not started
EMQ X Enterprise 4.2.5 is started successfully!
ubuntu@VM-0-12-ubuntu:~$

Start http:dashboard listener on 18083 successfully.
2021-03-28 10:05:07.197 [error] [Plugins] Load plugin emqx_rule_engine failed, cannot start plugin emqx_rule_engine for {bad_return,{{emqx_rule_engine_app,start,[normal,[]]},{'EXIT',{{bad_type,{action,data_to_webserver,data_forward,'$any',emqx_web_hook,[web_hook],emqx_web_hook_actions,on_action_create_data_to_webserver,undefined,false,#{'$resource' => #{description => #{en => <<"Bind a resource to this action">>,zh => <<231,187,153,229,138,168,228,189,156,231,187,145,229,174,154,228,184,128,228,184,170,232,181,132,230,186,144>>},order => 0,required => true,title => #{en => <<"Resource ID">>,zh => <<232,181,132,230,186,144,32,73,68>>},type => string},payload_tmpl => #{default => <<>>,description => #{en => <<"The payload template, variable interpolation is supported. If using empty template (default), then the payload will be all the available vars in JSON format">>,zh => <<230,182,136,230,129,175,229,134,133,229,174,185,230,168,161,230,157,191,239,188,140,230,148,175,230,140,129,229,143,152,233,135,143,227,128,130,232,139,165,228,189,191,231,148,168,231,169,186,230,168,161,230,157,191,239,188,136,233,187,152,232,174,164,239,188,137,239,188,140,230,182,136,230,129,175,229,134,133,229,174,185,228,184,186,32,74,83,79,78,32,230,160,188,229,188,143,231,154,132,230,137,128,230,156,137,229,173,151,230,174,181>>},input => textarea,order => 1,required => false,title => #{en => <<"Payload Template">>,zh => <<230,182,136,230,129,175,229,134,133,229,174,185,230,168,161,230,157,191>>},type => string}},#{en => <<"Data to Web Server">>,zh => <<229,143,145,233,128,129,230,149,176,230,141,174,229,136,176,32,87,101,98,32,230,156,141,229,138,161>>},#{en => <<"Forward Messages to Web Server">>,zh => <<229,176,134,230,149,176,230,141,174,232,189,172,229,143,145,231,187,153,32,87,101,98,32,230,156,141,229,138,161>>}}},[{emqx_rule_registry,trans,2,[{file,"emqx_rule_registry.erl"},{line,425}]},{emqx_rule_engine,load_provider,1,[{file,"emqx_rule_engine.erl"},{line,80}]},{emqx_rule_engine,'-load_providers/0-lc$^0/1-0-',1,[{file,"emqx_rule_engine.erl"},{line,75}]},{emqx_rule_engine,load_providers,0,[{file,"emqx_rule_engine.erl"},{line,75}]},{emqx_rule_engine_app,start,2,[{file,"emqx_rule_engine_app.erl"},{line,32}]},{application_master,start_it_old,4,[{file,"application_master.erl"},{line,277}]}]}}}}
EMQ X Enterprise 4.2.5 is running now!

常见问题了。

你可能是在同一个目录下安装过不同的 emqx 版本,导致 data/mnesia 下面的数据的 schema 不一致,所以会有 bad_type 错误。

解决办法:删掉 data/mnesia/ 目录下的所有目录和文件。重新启动 emqx。