首页 > 解决方案 > 升级到 19.09.1 后 mod_lhcping 出错

问题描述

从 ejabberd 18.04 升级到 19.09.1 后出现以下错误 对 erlang 不熟悉,请帮助我调试此问题。

日志:

12:26:43.791 [error] CRASH REPORT Process <0.506.0> with 0 neighbours crashed with reason: call to undefined function gen_mod:get_opt(send_pings, #{ahenviroment => false,ahprotocol => "https://",basedomain => "sit3lhc.1atesting.in",iqdisc => no_queue,...}, #Fun<mod_lhcping.0.4469384>, false)
12:26:43.791 [critical] Failed to start module mod_lhcping: 
{error,{{undef,[{gen_mod,get_opt,
                         [send_pings,
                          #{ahenviroment => false,ahprotocol => "https://",
                            basedomain => "localhost",
                            iqdisc => no_queue,
                            ping_address =>
                                "https://localhost/xmppservice/operatorstatus",
                            ping_interval => 5,send_pings => true,
                            timeout_action => kill},
                          #Fun<mod_lhcping.0.4469384>,false],
                         []},
                {mod_lhcping,init,1,[{file,"src/mod_lhcping.erl"},{line,120}]},
                {gen_server,init_it,2,[{file,"gen_server.erl"},{line,374}]},
                {gen_server,init_it,6,[{file,"gen_server.erl"},{line,342}]},
                {proc_lib,init_p_do_apply,3,
                          [{file,"proc_lib.erl"},{line,249}]}]},
        {child,undefined,'mod_lhcping_localhost',
               {mod_lhcping,start_link,
                            [<<"localhost">>,
                             #{ahenviroment => false,ahprotocol => "https://",
                               basedomain => "localhost",
                               iqdisc => no_queue,
                               ping_address =>
                                   "https://localhost/xmppservice/operatorstatus",
                               ping_interval => 5,send_pings => true,
                               timeout_action => kill}]},
               transient,2000,worker,
               [mod_lhcping]}}}
12:26:43.792 [critical] ejabberd initialization was aborted because a module start failed.

提前致谢!

标签: erlangxmppejabberd

解决方案


该模块未更新到最近的 ejabberd 更改,这些更改更改了源代码中模块选项的定义方式。并且很可能该模块的其他部分与 ejabberd 当前的 API 不同步......


推荐阅读