Ejabberd: Invalid value of option modules: unknown ejabberd module

Created on 12 Sep 2019  路  9Comments  路  Source: processone/ejabberd

Environment

  • ejabberd version: 19.8.0
  • Erlang version: Erlang (SMP,ASYNC_THREADS,HIPE) (BEAM) emulator version 10.2.1
  • OS: Linux (centos 7)
  • Installed from: docker image ejabberd/ecs:latest

Errors from error.log/crash.log

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?

10:23:04.997 [error] Configuration reload aborted: Configuration error: duplicated option: modules

Bug description

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

Bug Needs more info

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?

All 9 comments

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ibrahimkoujar picture ibrahimkoujar  路  3Comments

jjdp picture jjdp  路  3Comments

lgg picture lgg  路  4Comments

BoopathyRaja picture BoopathyRaja  路  3Comments

Vshnv picture Vshnv  路  4Comments