processone / ejabberd

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

Setting log_rotate_size: 10485760 or log_rotate_count: 1 in ejabberd.yml causes a crash #4109

Closed estolman closed 11 months ago

estolman commented 11 months ago

Environment

Errors from error.log/crash.log

errors could not be written, only the dump file was available, which did not help me resolve the issue. I switched to the default config, which did start, and added my own config line by line until i idenified which lines were causing the issue.

Bug description

In my ejabberd.yml, I am setting log_rotate_size: 10485760 and log_rotate_count: 1. This causes the service to crash when the service is started / restarted. Then it tries to restart every 5 seconds.

Commenting out these two settings allows ejabberd to run without issues.

This is possibly related to setting the default value for these two fields, though this worked in versions 23.04 and in 20.03

prefiks commented 11 months ago

As a workaround, please edit your ejabberdctl.cfg, and look for EJABBERD_OPTS variable, replace it with EJABBERD_OPTS=""

estolman commented 11 months ago

@prefiks , thank you for your reply! I've got my configuration running by disabling the two lines that i mentioned above, and since these are also the default values, i don't see the issue with disabling the lines.

I just wanted to report the issue, as setting a default value in the configuration should not cause an app to crash

prefiks commented 11 months ago

I totally agree, that this shouldn't crash, i just seen report about this last week, and traced it to being issue with EJABBERD_OPTS having -heart option in it. Just wanted to give you a way to fix this issue for now, i'll be working on better fix that would not require any changes.

prefiks commented 11 months ago

This should be fixed by commit 841d5c029905d5feabe07ab5a4db3aacfeedefb6