报错
2021-08-19T11:05:24.419017+08:00 [error] Generic server emqx_rule_registry terminating. Reason: {{bad_type,{rule,<<"rule:032750">>,[<<"t/#">>],<<"SELECT\n payload.msg as msg\nFROM\n \"t/#\"\nWHERE\n "...>>,false,[{as,{path,[{key,<<"payload">>},{key,<<"msg">>}]},{var,<<"msg">>}}],[],{},{'=',{var,<<"msg">>},{const,<<"hello">>}},continue,[{action_instance,<<"inspect_"...>>,inspect,[],...}],true,1629342324418,<<>>,normal}},[{emqx_rule_registry,trans,2,[{file,"emqx_rule_registry.erl"},{line,480}]},{emqx_rule_registry,handle_call,3,[{file,"emqx_rule_registry.erl"},{line,443}]},{gen_server,try_handle_call,4,[{file,"gen_server.erl"},{line,715}]},{gen_server,handle_msg,6,[{file,"gen_server.erl"},{line,744}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,226}]}]}. Last message: {add_rules,[{rule,<<"rule:032750">>,[<<"t/#">>],<<"SELECT\n payload.msg as msg\nFROM\n \"t/#\"\nWHERE\n "...>>,false,[{as,{path,[{key,<<"payload">>},{key,<<"msg">>}]},{var,<<"msg">>}}],[],{},{'=',{var,<<"msg">>},{const,<<"hello">>}},continue,[{action_instance,<<"inspect_"...>>,inspect,[],...}],true,1629342324418,<<>>,normal}]}. State: #{}. Client <0.8916.7> stacktrace: [{gen,do_call,4,[{file,"gen.erl"},{line,208}]},{gen_server,call,3,[{file,"gen_server.erl"},{line,242}]},{emqx_rule_engine,create_rule,1,[{file,"emqx_rule_engine.erl"},{line,186}]},{emqx_rule_engine_api,do_create_rule,1,[{file,"emqx_rule_engine_api.erl"},{line,214}]}].
2021-08-19T11:05:24.419541+08:00 [error] crasher: initial call: emqx_rule_registry:init/1, pid: <0.8795.7>, registered_name: emqx_rule_registry, error: {{bad_type,{rule,<<"rule:032750">>,[<<"t/#">>],<<"SELECT\n payload.msg as msg\nFROM\n \"t/#\"\nWHERE\n "...>>,false,[{as,{path,[{key,<<"payload">>},{key,<<"msg">>}]},{var,<<"msg">>}}],[],{},{'=',{var,<<"msg">>},{const,<<"hello">>}},continue,[{action_instance,<<"inspect_"...>>,inspect,[],...}],true,1629342324418,<<>>,normal}},[{emqx_rule_registry,trans,2,[{file,"emqx_rule_registry.erl"},{line,480}]},{emqx_rule_registry,handle_call,3,[{file,"emqx_rule_registry.erl"},{line,443}]},{gen_server,try_handle_call,4,[{file,"gen_server.erl"},{line,715}]},{gen_server,handle_msg,6,[{file,"gen_server.erl"},{line,744}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,226}]}]}, ancestors: [emqx_rule_engine_sup,<0.1776.0>], message_queue_len: 0, messages: [], links: [<0.1777.0>], dictionary: [], trap_exit: false, status: running, heap_size: 10958, stack_size: 28, reductions: 16941; neighbours:
2021-08-19T11:05:24.420113+08:00 [error] Supervisor: {local,emqx_rule_engine_sup}. Context: child_terminated. Reason: {{bad_type,{rule,<<"rule:032750">>,[<<"t/#">>],<<"SELECT\n payload.msg as msg\nFROM\n \"t/#\"\nWHERE\n "...>>,false,[{as,{path,[{key,<<"payload">>},{key,<<"msg">>}]},{var,<<"msg">>}}],[],{},{'=',{var,<<"msg">>},{const,<<"hello">>}},continue,[{action_instance,<<"inspect_"...>>,inspect,[],...}],true,1629342324418,<<>>,normal}},[{emqx_rule_registry,trans,2,[{file,"emqx_rule_registry.erl"},{line,480}]},{emqx_rule_registry,handle_call,3,[{file,"emqx_rule_registry.erl"},{line,443}]},{gen_server,try_handle_call,4,[{file,"gen_server.erl"},{line,715}]},{gen_server,handle_msg,6,[{file,"gen_server.erl"},{line,744}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,226}]}]}. Offender: id=emqx_rule_registry,pid=<0.8795.7>.
2021-08-19T11:05:24.420290+08:00 [error] POST /api/v4/rules error: {{{bad_type,{rule,<<"rule:032750">>,[<<"t/#">>],<<"SELECT\n payload.msg as msg\nFROM\n \"t/#\"\nWHE"...>>,false,[{as,{path,[{key,<<"payl"...>>},{key,<<...>>}]},{var,<<"msg">>}}],[],{},{'=',{var,<<"msg">>},{const,<<"hell"...>>}},continue,[{action_instance,<<"insp"...>>,inspect,...}],true,1629342324418,<<>>,normal}},[{emqx_rule_registry,trans,2,[{file,"emqx_rule_registry.erl"},{line,480}]},{emqx_rule_registry,handle_call,3,[{file,"emqx_rule_registry.erl"},{line,443}]},{gen_server,try_handle_call,4,[{file,"gen_server.erl"},{line,715}]},{gen_server,handle_msg,6,[{file,"gen_server.erl"},{line,744}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,226}]}]},{gen_server,call,[emqx_rule_registry,{add_rules,[{rule,<<"rule:032750">>,[<<"t/#">>],<<"SELECT\n payload.msg"...>>,false,[{as,{...},...}],[],{},{...},...}]},10000]}}, stacktrace:, [{gen_server,call,3,[{file,"gen_server.erl"},{line,246}]},{emqx_rule_engine,create_rule,1,[{file,"emqx_rule_engine.erl"},{line,186}]},{emqx_rule_engine_api,do_create_rule,1,[{file,"emqx_rule_engine_api.erl"},{line,214}]},{minirest_handler,dispatch,2,[{file,"minirest_handler.erl"},{line,90}]},{minirest,handle_request,2,[{file,"minirest.erl"},{line,116}]},{minirest,init,2,[{file,"minirest.erl"},{line,108}]},{cowboy_handler,execute,2,[{file,"cowboy_handler.erl"},{line,41}]},{cowboy_stream_h,execute,3,[{file,"cowboy_stream_h.erl"},{line,320}]},{cowboy_stream_h,request_process,3,[{file,"cowboy_stream_h.erl"},{line,302}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,226}]}]