processone / ejabberd-contrib

Growing and curated ejabberd contributions repository - PR or ask to join !
http://ejabberd.im
248 stars 137 forks source link

mod_post_log crashing #300

Closed cC-Xx closed 3 years ago

cC-Xx commented 3 years ago

ejabberd 21.01 latest mod_post_log nothing is logged

2021-02-05 02:33:42.676 [error] <0.507.0>@ejabberd_hooks:safe_apply:240
 Hook user_send_packet crashed when running mod_post_log:log_user_send/1:
** exception error: no function clause matching 
                 httpc:request(post,
                               {"http://127.0.0.2/messages",
                                [{<<"X-Message-Timestamp">>,
                                  "2021-02-04 23:33:42.673442Z"},
                                 {<<"X-Message-From">>,
                                  "user1@jabber.org/test"},
                                 {<<"X-Message-To">>,"user2@jabber.org"}],
                                <<"text/xml">>,
                                [...
badlop commented 3 years ago

Apparently, the commit 21d78a74c1a71d3523ce7129adc16646efe9ef4e that I made some months ago does in fact break the module.

I've reverted it, tested, and now it doesn't report that error message. But I haven't tested the module functionality itself...

If you can update the modules source code, reinstall and test it, please comment here if this or any other problem appears with that module.

ejabberdctl module_uninstall mod_post_log
ejabberdctl modules_update_specs
ejabberdctl module_install mod_post_log
cC-Xx commented 3 years ago

thanks not crashing anymore will try to use it in production