Ejabberd runtime configuration

Aus Free Software
Zur Navigation springen Zur Suche springen

You can change lots of the configuration at runtime either via the webinterface or by attaching to the ejabberd node. You can do the latter by running "ejabberdctl debug", where you can run any of the following commands:

Check Syntax of file
p1_yaml:decode_from_file(<<"/etc/ejabberd/ejabberd.yml">>, [plain_as_atom]).
Reload config-file
Note that this only updates ACL and Shapers. Listening ports, virtual hosts, modules and all major options will not change.
Add codepath
Set loglevel

Note: A loglevel of 5 sometimes causes additional debug messages on stdout (which breaks munin plugins).
Get loglevel
Reload module
Where mod_version is the module you want to reload.
Recompile module
Where mod_version is the module you want to compile. You will still have to reload the module.


To execute e.g. mnesia:info():

#!/usr/bin/env escript
%%! -sname admin@titan

main(_Args) ->
    Node = 'ejabberd@titan',
    Module = mnesia,
    Function = info,
    Arguments = [],

    rpc:call(Node, Module, Function, Arguments).


List currently registered nodes
epmd -names

ejabberdctl -> nodedown

ejabberdctl's connection to ejabberd is quite fragile. If ejabberdctl can't connect, it will say

root@host: ~ $ ejabberdctl status
Failed RPC connection to the node ejabberd@host: nodedown

A few things to check for:

  • The host name configured by ERLANG_NODE must be resolveable. For example, ejabberd@somehost means that somehost should be set in /etc/hosts.
  • When you set e.g. INET_DIST_INTERFACE=, make sure that the hostname from ERLANG_NODE resolves to exactly that address. we hat titan (note the "1" i the third octet) and had to change it to

See also