环境信息
- EMQX 版本:5.0.4
- 操作系统及版本:win10专业版
- 其他
问题描述
按照官方说明,运行https://github.com/emqx/emqx-extension-examples/tree/for-emqx-v5.0/exhook-svr-java ,运行起来后添加到emqx的后台管理中的 ExHook中,exhook-svr-java 中可打印onProviderLoaded类型的消息:
onProviderLoaded, request: broker {
version: “5.0.4”
sysdescr: “EMQX”
uptime: 1969325
datetime: “1970-07-12T13:04:23.592869871+08:00”
}
meta {
node: “emqx@127.0.0.1”
version: “5.0.4”
sysdescr: “EMQX”
cluster_name: “emqxcl”
}
但是emqx后台一直显示连接中且日志有报错。
配置文件及日志
报错日志如下:
2022-08-17T11:22:19.362000+08:00 [error] channel_name: <<“hook1”>>, line: 209, mfa: emqx_exhook_server:do_init/2, msg: failed_to_init_channel, reason: {unknown_hookpoint,{error,badarg}}, stacktrace: [{emqx_exhook_server,’-resolve_hookspec/1-fun-0-’,2,[{file,“emqx_exhook_server.erl”},{line,234}]},{lists,foldr,3,[{file,“lists.erl”},{line,1280}]},{emqx_exhook_server,do_init,2,[{file,“emqx_exhook_server.erl”},{line,201}]},{emqx_exhook_server,load,2,[{file,“emqx_exhook_server.erl”},{line,107}]},{emqx_exhook_mgr,do_load_server,1,[{file,“emqx_exhook_mgr.erl”},{line,325}]},{emqx_exhook_mgr,do_load_server,2,[{file,“emqx_exhook_mgr.erl”},{line,349}]},{emqx_exhook_mgr,handle_info,2,[{file,“emqx_exhook_mgr.erl”},{line,291}]},{gen_server,try_dispatch,4,[{file,“gen_server.erl”},{line,695}]},{gen_server,handle_msg,6,[{file,“gen_server.erl”},{line,771}]},{proc_lib,init_p_do_apply,3,[{file,“proc_lib.erl”},{line,226}]}]
2022-08-17T11:22:19.363000+08:00 [error] line: 338, mfa: emqx_exhook_mgr:do_load_server/1, msg: failed_to_load_exhook_callback_server, name: <<“hook1”>>, reason: {unknown_hookpoint,{error,badarg}}