processone / docker-ejabberd

Set of ejabberd Docker images
95 stars 77 forks source link

Alpine 3.11 Version Upgrade in Dockerfile causes elixir startup issue with `stun_not_compiled` #56

Closed mangalakader closed 3 years ago

mangalakader commented 4 years ago

I tried to startup ejabberd with elixir and faced this issue:

ejabberd_gitsrc_server | 2020-05-16 07:18:42.133117+00:00 [info] Loading configuration from config/ejabberd.yml
ejabberd_gitsrc_server | 2020-05-16 07:18:42.191853+00:00 [critical] Listening module ejabberd_stun is not available: ejabberd is not compiled with STUN/TURN support
ejabberd_gitsrc_server | 2020-05-16 07:18:42.199395+00:00 [critical] Failed to start ejabberd application: Exception occurred during configuration processing. This is mo
st likely due to faulty/incompatible validator in third-party code. If you are not running any third-party code, please report the bug with ejabberd configuration file a
ttached and the following stacktrace included:
ejabberd_gitsrc_server | ** exception error: stun_not_compiled
ejabberd_gitsrc_server |    in function  ejabberd_stun:fail/0 (src/ejabberd_stun.erl, line 38)
ejabberd_gitsrc_server |    in call from ejabberd_listener:validator/2 (src/ejabberd_listener.erl, line 527)
ejabberd_gitsrc_server |    in call from ejabberd_listener:'-validator/0-fun-1-'/1 (src/ejabberd_listener.erl, line 521)
ejabberd_gitsrc_server |    in call from yconf:'-list/2-fun-0-'/3 (/app/ejabberd/deps/yconf/src/yconf.erl, line 541)
ejabberd_gitsrc_server |    in call from lists:mapfoldl/3 (lists.erl, line 1354)
ejabberd_gitsrc_server |    in call from lists:mapfoldl/3 (lists.erl, line 1355)
ejabberd_gitsrc_server |    in call from yconf:'-list/2-fun-1-'/3 (/app/ejabberd/deps/yconf/src/yconf.erl, line 537)
ejabberd_gitsrc_server |    in call from yconf:'-and_then/2-fun-0-'/3 (/app/ejabberd/deps/yconf/src/yconf.erl, line 616)
Host OS and Version: Ubuntu 20.04

Docker Image Details

Erlang Version: Erlang/OTP 22 [erts-10.5] [source] [64-bit]
Elixir Version: 1.9.2 installed by Dockerfile automatically
Steps Followed:

I searched here and many other places, trying to find a solution and finally found that downgrading the alpine version to 3.9 and rebuilding the docker image, installed Erlang/OTP 21 and elixir 1.7.4.

Then, the docker image started without stun compilation issues. I'm not sure, if this is the right way to handle it, so just curious to see if there are other alternative solutions to this issue.

With Alpine 3.11, the available elixir version is only 1.9.2, I can also source compile elixir 1.7.4 directly, haven't tried that yet.

badlop commented 3 years ago

elixir startup issue with stun_not_compiled

I tried to startup ejabberd with elixir

How exactly do you start ejabberd with elixir? I mean, by following the README file of this ejabberd/ecs image, there is no mention to Elixir at all...

badlop commented 3 years ago

If the problem appears again, please reopen this issue.