我试图为我的ejabberd测试mod_rest。收到了' OK'结果但有警告:"警告:未定义的回调函数取决于/ 2 (行为' gen_mod')"在安装模块期间。当我尝试测试使用REST客户端安装的mod_rest时,日志中有 CRASH REPORT 。
ejabberd version :16.08.23
ejabberd.yml
hosts:
- "localhost"
- "192.168.88.88"
- "127.0.0.1"
listen:
-
port: 5280
module: ejabberd_http
request_handlers:
"/websocket": ejabberd_http_ws
"/rest": mod_rest
web_admin: true
http_bind: true
captcha: true
modules:
mod_rest: {}
安装信息
$/sbin/ejabberdctl module_install mod_rest
src/mod_rest.erl:27: Warning: undefined callback function depends/2 (behaviour 'gen_mod')
ok
ejabberd.log
2016-08-24 11:14:31.516 [错误]< 0.3683.0>崩溃报告流程 < 0.3683.0>与0个邻居坠毁的原因:电话中的错误参数 erlang:binary_to_list({127,0,0,1})in str:tokens / 2 line 242
CRASH.LOG
2016-08-24 14:42:20 = CRASH REPORT ==== 不速之客: 初始调用:ejabberd_http:init / 2 pid:< 0.3274.0> registered_name:[] 异常错误:错误参数:[{erlang,binary_to_list,[{127,0,0,1}],[]},{str,tokens,2,[{file," src / str.erl&#34 ;},{线,242}]},{ACL,parse_ip_netmask,1,[{文件," SRC / acl.erl"},{线,536}]},{mod_rest,&#39 ; -ip_matches / 2-乐趣0 - ',2,[{文件," SRC / mod_rest.erl"},{线,144}]},{列表,任何,2, [{文件," lists.erl"},{线,1225}]},{mod_rest,check_member_option,3,[{文件," SRC / mod_rest.erl"},{线,134}]},{mod_rest,过程,2,[{文件," SRC / mod_rest.erl"},{线,55}]},{ejabberd_http,过程,如图5所示,[{文件" SRC / ejabberd_http.erl"},{线,363}]}] 祖先:[< 0.3190.0>,ejabberd_listeners,ejabberd_sup,< 0.2578.0>] 消息:[] 链接:[#Port< 0.35648>] 字典:[] trap_exit:false 状态:正在运行 heap_size:1598 stack_size:27 减少:1894年 邻居: