【问题标题】:ejabberd 2.01's module "mod_eventful" could not be loaded无法加载 ejabberd 2.01 的模块“mod_eventful”
【发布时间】:2017-03-02 16:34:06
【问题描述】:

我们使用的是 Ubuntu 14.04.5 LTS,我们在其上安装了 ejabbered 2.1,但给定插件 mod_eventful 无法正常工作。

我们检查了var/www/ejabbered/ejabberd.log下的错误日志,发现下面的错误日志

{'module could not be loaded',
[{http,request,
[post,
{"http://192.168.1.60/messages",
[{"Authorization",
"Basic SFRUUCBCQVNJQyBVU0VSTkFNRTpIVFRQIEJBU0lDIFBBU1NXT1JE"}],
"application/x-www-form-urlencoded",
"from=kandhal%40192.168.1.60/15310114851488363705601144&to=hitesh%40192.168.1.60&type=chat&subject=&body=%7B%22isdownload%22:false%2C%22issent%22:false%2C%22fromuserid%22:%22kandhal%40192.168.1.60%22%2C%22ptopid%22:%22%22%2C%22messageid%22:%221488363577548%22%2C%22message_time%22:%221488363577911%22%2C%22mediathumb%22:%22%22%2C%22is_read%22:false%2C%22isseen%22:false%2C%22fromprofilepic%22:%22%22%2C%22isread%22:false%2C%22messagesource%22:%22VGhlIG9ubHkgcHJvYmxlbSBJIGhhZCB3YXM%3D%22%2C%22messagetype%22:%22text%22%2C%22fromusername%22:%22Kandhal%20AB%22%7D&thread="},
[],
[{sync,false},{stream,self}]],
[]},
{mod_eventful,handle_call,3,
[{file,"src/web/mod_eventful.erl"},{line,188}]},
{gen_server,handle_msg,5,[{file,"gen_server.erl"},{line,585}]},
{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,239}]}]}

任何帮助将不胜感激。

【问题讨论】:

    标签: php erlang ejabberd


    【解决方案1】:

    你读过this post吗?

    错误消息显示无法加载http:request/4。 因为http:request/4 在 R15B 中被删除了。

    也许您会看到如下警告消息,

    src/web/mod_eventful.erl:139:警告:调用 http:request/4 将失败,因为它已在 R15B 中删除; 使用 httpc:request/4

    很遗憾,这个模块好像支持ejabberd 2.1.x,这个模块的创建者已经不再支持了。

    【讨论】:

    • 似乎 http:request/4 将在(根据插件要求)erlang 版本 R14B04 中可用,并且应该支持模块 mod_eventful?或者我们应该将 erlang 的版本从 R16B04 降级到 R14B04 吗?或者是否有任何可用于相同目的的插件?
    • 我不能推荐你的问题,因为我没有测试过R14B04的版本。但是,有两种选择。首先,你为什么不制作自己的模块?您已经拥有源文件mod_eventful.erl。其次,为什么不在你的另一台测试机上测试R14B04 + ejabberd 2.1.x?(虽然版本太旧了。)
    • 我们尝试将 erlang 版本从 R16B04 降级到 R14B04 仍然无法在用户 A 使用 mod_evenful 模块向用户 B 发送消息时调用消息挂钩。我们的调试日志看起来像ibb.co/d4Jw5a
    猜你喜欢
    • 2016-01-13
    • 2021-07-15
    • 2011-03-08
    • 1970-01-01
    • 2016-01-12
    • 2015-02-21
    • 2021-01-03
    • 2021-01-11
    • 2015-02-09
    相关资源
    最近更新 更多