processone / ejabberd

Robust, Ubiquitous and Massively Scalable Messaging Platform (XMPP, MQTT, SIP Server)
https://www.process-one.net/en/ejabberd/
Other
6.01k stars 1.5k forks source link

Crash on startup after updating to 23.10 #4115

Closed AMDG2 closed 7 months ago

AMDG2 commented 8 months ago

Environment

Configuration (only if needed): grep -Ev '^$|^\s*#' ejabberd.yml

Its seems the issue appears even before the configuration can be parsed by ejabberd. So I'm not attaching it, but if you need some configuration information let me know.

Errors from error.log/crash.log

error.log & crash.log are not written to. Only erlcrash****.dump files are created (atttached below).

Bug description

After updating ejabberd to version 23.10, it does not start anymore. It crashes on startup. Unfortunately my knowledge of Erlang is very weak, and I'm not sure how I can provide more relevant information to debug this issue. Please let me know if you need more information.

When running through the systemd service or through ejabberdctl foreground, I get the following output:

{{bad_heart_flag,log_rotate_size},{heart,check_start_heart,[]}}
System process <0.0.0> terminated: {badarg,[{erlang,exit,[false,kill],[{error_info,#{module=>erl_erts_errors}}]},{init,kill_em,1,[]},{init,clear_system,3,[]},{init,new_kernelpid,3,[]},{init,boot_loop,2,[]}]}
(no logger present) unexpected logger message: {log,error,"Error in process ~p with exit value:~n~p~n",[<0.0.0>,{badarg,[{erlang,exit,[false,kill],[{error_info,#{module=>erl_erts_errors}}]},{init,kill_em,1,[]},{init,clear_system,3,[]},{init,new_kernelpid,3,[]},{init,boot_loop,2,[]}]}],#{error_logger=>#{emulator=>true,tag=>error},pid=><0.0.0>,time=>1699860493142625,gl=><0.0.0>}}

Crash dump is being written to: /var/log/ejabberd/erl_crash_20231113-082813.dump...done

The crash dump is available here: erl_crash_20231113-082813.dump.txt

licaon-kter commented 8 months ago

Read https://github.com/processone/ejabberd/issues/4109#issuecomment-1779209127 ?

AMDG2 commented 8 months ago

This seems indeed related, I had this:

EJABBERD_OPTS="-heart -env HEART_BEAT_TIMEOUT 120 -env ERL_CRASH_DUMP_SECONDS 60"

I replaced it with EJABBERD_OPTS="", and now ejabberd starts without any issue.

However, this seems like a workaround, and not like a proper fix.

licaon-kter commented 8 months ago

/close as duplicate, was fixed in HEAD, so until a new release it's a workaround :)

AMDG2 commented 7 months ago

/close as duplicate