环境信息
- EMQ X 版本:4.2.13
- 操作系统及版本:CentOS7.8
- 其他
问题描述
按照官方文档操作:
刚开始是安装的最新版的emqx
执行命令:
sudo yum install emqx
后面发现最新版的MQTT连接速度有点慢,所以卸载了,执行命令:
sudo yum remove emqx
然后重新安装4.2.13版本:
sudo yum install emqx-4.2.13
打开 dashboard 发现卸载前创建的规则和资源都还在。。。
然后打开规则页面发现报500错误了。
我尝试又卸载4.2.13版本然后删除 /etc/emqx 文件夹再重新安装4.2.13版本,发现还是存在这个问题。
使用 emqx console 命令启动发现存在报错:
配置文件及日志
[root@VM-0-8-centos ~]# emqx console
Exec: /usr/lib/emqx/erts-10.7/bin/erlexec -boot /usr/lib/emqx/releases/4.2.13/emqx -mode embedded -boot_var ERTS_LIB_DIR /usr/lib/emqx/erts-10.7/../lib -mnesia dir "/var/lib/emqx/mnesia/emqx@127.0.0.1" -config /var/lib/emqx/configs/app.2021.12.07.11.32.23.config -args_file /var/lib/emqx/configs/vm.2021.12.07.11.32.23.args -vm_args /var/lib/emqx/configs/vm.2021.12.07.11.32.23.args -start_epmd false -epmd_module ekka_epmd -proto_dist ekka -- console
Root: /usr/lib/emqx
/usr/lib/emqx
Erlang/OTP 22 [erts-10.7] [source] [64-bit] [smp:4:4] [ds:4:4:8] [async-threads:4] [hipe]
Starting emqx on node emqx@127.0.0.1
Start http:management listener on 8081 successfully.
Start http:dashboard listener on 18083 successfully.
Start mqtt:tcp listener on 127.0.0.1:11883 successfully.
Start mqtt:tcp listener on 0.0.0.0:1883 successfully.
Start mqtt:ws listener on 0.0.0.0:8083 successfully.
Start mqtt:ssl listener on 0.0.0.0:8883 successfully.
Start mqtt:wss listener on 0.0.0.0:8084 successfully.
EMQ X Broker 4.2.13 is running now!
Eshell V10.7 (abort with ^G)
(emqx@127.0.0.1)1> 2021-12-07 11:32:27.073 [error] GET /api/v4/rules error: function_clause, stacktrace:
[{emqx_rule_engine_api,record_to_map,
[{rule,<<"rule:473345">>,
[<<"$events/client_connected">>],
<<"SELECT\n *\nFROM\n \"$events/client_connected\"">>,false,
['*'],
[],{},{},continue,
[{action_instance,<<"data_to_webserver_1638787356243745920">>,
data_to_webserver,[],
#{<<"$resource">> => <<"resource:138075">>,<<"body">> => <<>>,
<<"headers">> =>
#{<<"content-type">> => <<"application/json">>},
<<"method">> => <<"POST">>,<<"path">> => <<>>}}],
true,1638785028944,
<<232,174,190,229,164,135,228,184,138,231,186,191,232,167,132,229,
136,153>>,
normal}],
[{file,"emqx_rule_engine_api.erl"},{line,407}]},
{emqx_rule_engine_api,maybe_record_to_map,2,
[{file,"emqx_rule_engine_api.erl"},{line,394}]},
{emqx_rule_engine_api,return_all,1,
[{file,"emqx_rule_engine_api.erl"},{line,390}]},
{minirest_handler,dispatch,2,[{file,"minirest_handler.erl"},{line,84}]},
{minirest,handle_request,2,[{file,"minirest.erl"},{line,113}]},
{minirest,init,2,[{file,"minirest.erl"},{line,105}]},
{cowboy_handler,execute,2,[{file,"cowboy_handler.erl"},{line,41}]},
{cowboy_stream_h,execute,3,[{file,"cowboy_stream_h.erl"},{line,320}]}]
请问是否是没有完全卸载干净导致的?但我是按照官方文档的卸载命令操作的。。
这个问题请问要如何处理呢?