duplicated option: modules
wartjugger opened this issue · 10 comments
Running ejabberd 19.09.1 on Debian 9. Trying to use mod_log_chat. Did the following:
ejabberdctl` modules_update_specs
ejabberd.log file shows:
2019-11-06 06:28:01.499 [info] <0.4310.0>@ext_mod:update:162 Update packages from repo git@github.com:jadahl/mod_restful.git: ok
2019-11-06 06:28:02.105 [info] <0.4310.0>@ext_mod:update:162 Update packages from repo git@github.com:kongo2002/ejabberd-mod-mam.git: ok
2019-11-06 06:28:03.314 [info] <0.4310.0>@ext_mod:update:162 Update packages from repo git@github.com:lavrin/ejabberd-trace.git: ok
2019-11-06 06:28:04.553 [info] <0.4310.0>@ext_mod:update:162 Update packages from repo git@github.com:processone/ejabberd-contrib.git: ok
2019-11-06 06:28:05.140 [info] <0.4310.0>@ext_mod:update:162 Update packages from repo git@github.com:raelmax/mod_http_offline.git: ok
2019-11-06 06:28:06.042 [info] <0.4310.0>@ext_mod:update:162 Update packages from repo https://github.com/processone/ejabberd-contrib: ok
then
ejabberdctl module_install mod_log_chat
Returns "Error: conflict".
error.log:
2019-11-06 06:07:15.311 [error] <0.4146.0>@ejabberd_config:reload:114 Configuration reload aborted: Configuration error: duplicated option: modules
Nothing is created under ~/.ejabberd-modules (the dir isn't created either), and ejabberctl.cfg is all commented out (as is by default).
I stopped ejabberd, now can't start it at all. I get:
07:30:12.518 [critical] Failed to start ejabberd application: Configuration error: duplicated option: modules
I don't get what configuration error is that? my ejabberd.yml isn't changed, my ejabberdctl.cfg isn't changed. What does module_install change?
I don't get what configuration error is that? my ejabberd.yml isn't changed, my ejabberdctl.cfg isn't changed.
That's because the module comes with its own configuration file where modules
section is re-defined.
Ok, some progress, I now found mod_log_chat under /opt/ejabberd/.ejabberd-modules/ (not under ~/.ejabberd-modules/ as specified in the instructions and the comments in ejabberdctl.cfg). Does its modules clause conflict with the modules clause of ejabberd.yml?
I just commented out the modules section there and I can start ejabberd. How to proceed to use the mod without this conflict?
Put the module's configuration into main ejabberd.yml. Just like you would do for a built-in ejabberd module.
Put the module's configuration into main ejabberd.yml. Just like you would do for a built-in ejabberd module.
Thanks. I did it and the module wasn't recognized. I then copied the beam file and it works.
Perhaps the instructions in the README.md should be revised.
That's because the module comes with its own configuration file where modules section is re-defined.
Right, and that duplication is not allowed since processone/ejabberd@a02cff0
Which makes pretty useless the current code that allows loading external module configurations, since they always attempt to redefine modules section to add themselves as a new module. I guess that code should nowadays be removed, and admins should be instructed like this in ejabberd-contrib/README, right @zinid ?
Run
ejabberdctl module_install <module>
...Copy the contents of the configuration file provided in the
conf
directory of the
installed module to your main ejabberd configuration file, and update it to your needs.
I'm thinking on how to do this better. So far I tend to think we should accept multiple modules
options. I'll inspect external modules code ASAP.
And regarding external modules configuration, I improved the situation a bit in processone/ejabberd@e388805 - at least users will see the path to the external configurations in ejabberd.log...
e instructions in the READ
I also facing the same problem.
I have copied the beam file to the same location where other mod_* file is available in my case it s /opt/ejabberd-19.09.1/lib/ejabberd-19.09.1/ebin/
But after that as well it doesn't recognize the module and if I paste some conf into the main configuration server is failed to start.
Can you please let me know where exactly these files should be placed?
Hi. Even if you are facing the same problem, can you please create a new ticket? There you describe your ejabberd version, how you installed, what you are trying to do, the commands you enter, and what error messages you get. You can mention this issue if the problem is apparently similar.