Ejabberd crashing on startup - "Problem starting the module mod_cron for host localhost"

Hi

Ejabberd 17.07 crashes on startup:

2017-07-11 15:01:57.847 [critical] <0.200.0>@gen_mod:maybe_halt_ejabberd:293 ejabberd initialization was aborted because a module start failed.
2017-07-11 15:04:12.882 [critical] <0.197.0>@gen_mod:start_module:211 Problem starting the module mod_cron for host localhost
options: []
error: []
[{gen_mod,start_module,4,[{file,"src/gen_mod.erl"},{line,202}]},
{lists,foreach,2,[{file,"lists.erl"},{line,1337}]},
{gen_mod,start_link,0,[{file,"src/gen_mod.erl"},{line,78}]},
{supervisor,do_start_child,2,[{file,"supervisor.erl"},{line,358}]},
{supervisor,start_children,3,[{file,"supervisor.erl"},{line,341}]},
{supervisor,init_children,2,[{file,"supervisor.erl"},{line,307}]},
{gen_server,init_it,6,[{file,"gen_server.erl"},{line,328}]},
{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,240}]}]
2017-07-11 15:04:12.882 [critical] <0.197.0>@gen_mod:maybe_halt_ejabberd:293 ejabberd initialization was aborted because a module start failed.

And what did you do to make

And what did you do to make this problem happen? I mean, when you installed ejabberd, it started correctly, what has changed that it crashes now?

Thank you for your

Thank you for your reply.

First I forgot to mention I upgraded our dev server from 17.01 to 17.07.
When I started that it worked nicely like you said. We worked with that for an hour or so then in the day after it just stopped working with no actions from our end.

This is the last thing I see in the error log:

2017-07-11 14:46:53.787 [error] <0.3039.0>@ejabberd_hooks:safe_apply:383 Hook c2s_filter_send crashed when running mod_client_state:filter_other/1:
** Reason = {error,undef,[{maps,take,[],[{<<"tycoon_102803168">>,<<"localhost">>},#{}]},{mod_client_state,queue_take,[{file,"src/mod_client_state.erl"},{line,362}],2},{mod_client_state,dequeue_sender,[{file,"src/mod_client_state.erl"},{line,289}],2},{mod_client_state,filter_other,[{file,"src/mod_client_state.erl"},{line,250}],1},{ejabberd_hooks,safe_apply,[{file,"src/ejabberd_hooks.erl"},{line,380}],4},{ejabberd_hooks,run_fold1,[{file,"src/ejabberd_hooks.erl"},{line,364}],4},{ejabberd_c2s,send,[{file,"src/ejabberd_c2s.erl"},{line,128}],2},{ejabberd_hooks,safe_apply,[{file,"src/ejabberd_hooks.erl"},{line,380}],4}]}
** Arguments = [{{presence,<<>>,available,<<"en">>,{jid,<<"tycoon_102803168">>,<<"localhost">>,<<"51773264847317138715491">>,<<"tycoon_102803168">>,<<"localhost">>,<<"51773264847317138715491">>},{jid,<<"tycoon_102803168">>,<<"localhost">>,<<"51773264847317138715491">>,<<"tycoon_102803168">>,<<"localhost">>,<<"51773264847317138715491">>},undefined,[],undefined,[],#{}},#{socket => {socket_state,gen_tcp,#Port<0.18237>,<0.3038.0>},jid => {jid,<<"tycoon_102803168">>,<<"localhost">>,<<"51773264847317138715491">>,<<"tycoon_102803168">>,<<"localhost">>,<<"51773264847317138715491">>},tls_verify => false,tls_required => false,lserver => <<"localhost">>,stream_compressed => false,sid => {{1499,784167,64},<0.3039.0>},ip => {{0,0,0,0,0,65535,21109,56334},42040},access => c2s,pres_t => {1,{{<<"tycoon_102803168">>,<<"localhost">>,<<>>},nil,nil}},auth_module => ejabberd_auth_sql,shaper => c2s_shaper,stream_direction => in,server => <<"localhost">>,stream_timeout => infinity,pres_f => {1,{{<<"tycoon_102803168">>,<<"localhost">>,<<>>},nil,nil}},stream_encrypted => false,stream_state => established,resource => <<"51773264847317138715491">>,mod => ejabberd_c2s,pres_a => {1,{{<<"tycoon_102803168">>,<<"localhost">>,<<>>},nil,nil}},resend_offline => false,privacy_list => {userlist,none,[],false},csi_queue => {0,0,#{}},stream_version => {1,0},stream_restarted => true,zlib => true,pres_last => {presence,<<>>,available,<<"en">>,{jid,<<"tycoon_102803168">>,<<"localhost">>,<<"51773264847317138715491">>,<<"tycoon_102803168">>,<<"localhost">>,<<"51773264847317138715491">>},{jid,<<"tycoon_102803168">>,<<"localhost">>,<<>>,<<"tycoon_102803168">>,<<"localhost">>,<<>>},undefined,[],undefined,[],#{}},conn => c2s,stream_header_sent => true,sockmod => ejabberd_socket,tls_options => [compression_none,{protocol_options,<<"no_sslv3">>},{certfile,<<"/etc/ejabberd/ejabberd.pem">>}],owner => <0.3039.0>,tls_enabled => true,user => <<"tycoon_102803168">>,socket_monitor => #Ref<0.0.2.12697>,stream_authenticated => true,lang => <<"en">>,pres_timestamp => {1499,784413,784957},csi_state => active,xmlns => <<"jabber:client">>,stream_id => <<"9727283898252478331">>,caps_resources => {0,nil}}}]

I also uploaded the dump file here:
https://www.dropbox.com/s/kqtxt8azugy3js8/erl_crash_20170712-110933.dump...

Let me know what else I can provide to solve this.

Thanks.

more info: I tried to

more info:

I tried to completely uninstall ejabberd using:
sudo apt-get remove --purge ejabberd

still crashing with this:

2017-07-13 16:25:09.162 [critical] <0.196.0>@gen_mod:start_module:211 Problem starting the module mod_cron for host localhost
options: []
exit: {aborted,
{bad_type,
{ejabberd_commands,cron_list,
[cron],
"List tasks scheduled in a host",[],mod_cron,cron_list,
[{host,string}],
{tasks,
{list,{task,{tuple,[{id,integer},{task,string}]}}}}}}}
[{mnesia,abort,1,[{file,"mnesia.erl"},{line,313}]},
{lists,foreach,2,[{file,"lists.erl"},{line,1337}]},
{ejabberd_commands,register_commands,1,
[{file,"src/ejabberd_commands.erl"},{line,323}]},
{mod_cron,start,2,[]},
{gen_mod,start_module,4,[{file,"src/gen_mod.erl"},{line,199}]},
{lists,foreach,2,[{file,"lists.erl"},{line,1337}]},
{gen_mod,start_link,0,[{file,"src/gen_mod.erl"},{line,78}]},
{supervisor,do_start_child,2,[{file,"supervisor.erl"},{line,358}]}]
2017-07-13 16:25:09.162 [critical] <0.196.0>@gen_mod:maybe_halt_ejabberd:293 ejabberd initialization was aborted because a module start failed.

sorry meant: sudo apt

sorry meant:
sudo apt autoremove --purge ejabberd

Notice that this purge may

Notice that this purge may keep the Mnesia spool dir. When ejabberd is installed, search for those files, then purge ejabberd, and check the files are removed.

Thanks for all the help.

Thanks for all the help. Eventually I locate all the ejabbered files, deleted them and installed a fresh version of 17.07 and it seems to work nicely.

Syndicate content