processone / ejabberd-contrib

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

mod_s2s_log broken, prevents ejabberd 17.08 from starting #229

Closed debalance closed 7 years ago

debalance commented 7 years ago

I am running ejabberd 17.08 on Debian Stretch.

ejabberd.log:

2017-10-10 17:17:51.248 [warning] <0.258.0>@gen_mod:get_validators:495 module 'mod_s2s_log' doesn't export mod_opt_type/1

error.log :

2017-10-10 17:14:21.348 [critical] <0.236.0>@gen_mod:start_module:212 Problem starting the module mod_s2s_log for host [...] options: [{filename,<<"/var/log/ejabberd/s2s.log">>}] error: undef [{mod_s2s_log,start, [<<"[hostname]">>, [{filename,<<"/var/log/ejabberd/s2s.log">>}]], []}, {gen_mod,start_module,4,[{file,"src/gen_mod.erl"},{line,200}]}, {lists,foreach,2,[{file,"lists.erl"},{line,1338}]}, {gen_mod,start_link,0,[{file,"src/gen_mod.erl"},{line,79}]}, {supervisor,do_start_child,2,[{file,"supervisor.erl"},{line,365}]}, {supervisor,start_children,3,[{file,"supervisor.erl"},{line,348}]}, {supervisor,init_children,2,[{file,"supervisor.erl"},{line,314}]}, {gen_server,init_it,6,[{file,"gen_server.erl"},{line,328}]}] 2017-10-10 17:14:21.349 [critical] <0.236.0>@gen_mod:maybe_halt_ejabberd:294 ejabberd initialization was aborted because a module start failed.

zinid commented 7 years ago

The error means ejabberd doesn't see mod_s2s_log.beam file

debalance commented 7 years ago

It's in /usr/lib/x86_64-linux-gnu/ejabberd-17.08/ebin/ along with the rest. mod_statsdx.beam e.g. is working.

zinid commented 7 years ago

I have another issue by the way:

18:47:14.138 [critical] Problem starting the module mod_s2s_log for host 192.168.1.1 
 options: []
 error: true
[{gen_mod,start_module,4,[{file,"src/gen_mod.erl"},{line,203}]},
 {lists,foreach,2,[{file,"lists.erl"},{line,1338}]},
 {gen_mod,start_link,0,[{file,"src/gen_mod.erl"},{line,79}]},
 {supervisor,do_start_child,2,[{file,"supervisor.erl"},{line,365}]},
 {supervisor,start_children,3,[{file,"supervisor.erl"},{line,348}]},
 {supervisor,init_children,2,[{file,"supervisor.erl"},{line,314}]},
 {gen_server,init_it,2,[{file,"gen_server.erl"},{line,365}]},
 {gen_server,init_it,6,[{file,"gen_server.erl"},{line,333}]}]
zinid commented 7 years ago

Looking at the module, it won't work in recent versions for sure.

zinid commented 7 years ago

I'm checking if I can fix it quickly.

zinid commented 7 years ago

I fixed all the issues, but I have nowhere to test it. Volunteers? https://gist.github.com/zinid/9e91169be749fee9d6a86b99b2c84382

debalance commented 7 years ago

I'll give it a try soon

debalance commented 7 years ago

That gist is working perfectly!

zinid commented 7 years ago

Thanks for testing, I will commit it then :)

zinid commented 7 years ago

Fixed in https://github.com/processone/ejabberd-contrib/commit/6a4b9a08d53aea569a90b56ea0cd7212f301d413