Erlang (SMP,ASYNC_THREADS,HIPE) (BEAM) emulator version 10.2.110:24:33.360 [critical] Failed to start ejabberd application: Invalid value of option modules: unknown ejabberd module: mod_statsdx. Did you mean mod_statsdx?
10:23:04.997 [error] Configuration reload aborted: Configuration error: duplicated option: modules
I'm trying to run docker image and append custom modules located under .ejabberd-modules
I used the command:
podman run -d --network=host --name ejabberd -v $(pwd)/conf/ejabberd.yml:/home/ejabberd/conf/ejabberd.yml -v $(pwd)/.ejabberd-modules:/home/ejabberd/.ejabberd-modules ejabberd/ecs:latest
I'm facing to bugs:
1- if there is a conf directory in custom module I'm getting
10:23:04.997 [error] Configuration reload aborted: Configuration error: duplicated option: modules
2- if I put the module name under the modules option in yaml file I'm getting
10:24:33.360 [critical] Failed to start ejabberd application: Invalid value of option modules: unknown ejabberd module: mod_statsdx. Did you mean mod_statsdx?
Thank you for your help
Probably related to https://github.com/processone/ejabberd/issues/3013 (see the latest comments).
I was able to check and install the module using ejabberdctl module_check(install) mod_statsdx
if there is a problem with the module path, it wont compiled right??
I think this error happens on startup only. If you start ejabberd without a module and then edit ejabberd.yml and put it there and reload the config - it will work (see #3013).
I'm editing the yml file but it didn't get reloaded with the new options it seems I having problem with container in general (something in containers not clear to me yet)
I don't know, maybe the container author can say more.
Same issue here with ejabberd version 19.09. I installed a custom module without problem, I can reload the cofiguration and the module works well, but I can't restart ejabberd as I have this critical error :
[critical] Failed to start ejabberd application: Invalid value of option modules: unknown ejabberd module: mod_XXX. Did you mean mod_XXX?
Hi All,
Just make sure you are adding "mod_options" to your custom module
depends(_Host, _Opts) ->
[].
mod_options(_Host) ->
[].
I have these two functions in my module but still get the " Invalid value of option modules" error :/
That error message usually appears when ejabberd has not loaded the module beam file when it starts. Make sure you copy the compiled beam file with all the other ejabberd beam files. Maybe you have two ejabberd installations (and you are copying that beam file to the old unused installation). Or maybe the file is unreadable by ejabberd, because it's read-only for root. Or maybe the source code you wrote is missing something, as moekur mentioned. Or maybe... It is almost impossible to diagnose this for us with no information about what you installed, how is it installed, if the installation is messed, your code, etc. Right now only you can solve this.
Most helpful comment
Same issue here with ejabberd version 19.09. I installed a custom module without problem, I can reload the cofiguration and the module works well, but I can't restart ejabberd as I have this critical error :
[critical] Failed to start ejabberd application: Invalid value of option modules: unknown ejabberd module: mod_XXX. Did you mean mod_XXX?