[ejabberd] Handling Groups

Phil Stracchino phils at caerllewys.net
Sat Oct 26 17:19:58 MSK 2019


On 10/25/19 10:26 AM, Holger Weiß wrote:
> * Phil Stracchino <phils at caerllewys.net> [2019-10-25 10:14]:
> 
>> Can I configure how much history mod_mam saves?
> 
> No, but you can run a command such as the following from Cron to delete
> all MAM messages older than 100 days:
> 
> $ ejabberdctl delete-old-mam-messages all 100


I tried this but it failed; error below.  Any suggestions of what I'm
doing wrong here?  Other ejabberdctl commands (for instance, ejabberdctl
reload-config) appear to work, and the node name ejabberd at localhost is
correct (left at default, no reason to change it).




minbar:root:~:2 # ejabberdctl delete-old-mam-messages all 100
Failed RPC connection to the node ejabberd at localhost: {'EXIT',
                                                       {undef,
                                                        [{erl_error,
                                                          format_exception,
                                                          [2,error,
                                                           {case_clause,
                                                            {'EXIT',
                                                             {undef,

[{io_lib_fread,
                                                                fread,

["~d","100"],
                                                                []},

{ejabberd_ctl,

format_arg2,2,
                                                                [{file,

"src/ejabberd_ctl.erl"},

{line,397}]},

{ejabberd_ctl,

'-format_args/2-fun-0-',
                                                                2,
                                                                [{file,

"src/ejabberd_ctl.erl"},

{line,379}]},
                                                               {lists,foldl,
                                                                3,
                                                                [{file,

"lists.erl"},

{line,1263}]},

{ejabberd_ctl,

call_command,
                                                                4,
                                                                [{file,

"src/ejabberd_ctl.erl"},

{line,348}]},

{ejabberd_ctl,

try_call_command,
                                                                4,
                                                                [{file,

"src/ejabberd_ctl.erl"},

{line,320}]},

{ejabberd_ctl,
                                                                process2,4,
                                                                [{file,

"src/ejabberd_ctl.erl"},

{line,273}]},

{ejabberd_ctl,
                                                                process,2,
                                                                [{file,

"src/ejabberd_ctl.erl"},
                                                                 {line,

251}]}]}}},
                                                           [{ejabberd_ctl,
                                                             call_command,4,
                                                             [{file,

"src/ejabberd_ctl.erl"},
                                                              {line,348}]},
                                                            {ejabberd_ctl,

try_call_command,
                                                             4,
                                                             [{file,

"src/ejabberd_ctl.erl"},
                                                              {line,320}]},
                                                            {ejabberd_ctl,
                                                             process2,4,
                                                             [{file,

"src/ejabberd_ctl.erl"},
                                                              {line,273}]},
                                                            {ejabberd_ctl,
                                                             process,2,
                                                             [{file,

"src/ejabberd_ctl.erl"},
                                                              {line,251}]},
                                                            {rpc,

'-handle_call_call/6-fun-0-',
                                                             5,

[{file,"rpc.erl"},
                                                              {line,197}]}],

#Fun<misc.8.81564526>,

#Fun<misc.9.81564526>],
                                                          []},
                                                         {ejabberd_ctl,

try_call_command,4,
                                                          [{file,

"src/ejabberd_ctl.erl"},
                                                           {line,338}]},
                                                         {ejabberd_ctl,
                                                          process2,4,
                                                          [{file,

"src/ejabberd_ctl.erl"},
                                                           {line,273}]},
                                                         {ejabberd_ctl,
                                                          process,2,
                                                          [{file,

"src/ejabberd_ctl.erl"},
                                                           {line,251}]},
                                                         {rpc,

'-handle_call_call/6-fun-0-',
                                                          5,
                                                          [{file,"rpc.erl"},
                                                           {line,197}]}]}}

Commands to start an ejabberd node:
  start      Start an ejabberd node in server mode
  debug      Attach an interactive Erlang shell to a running ejabberd node
  iexdebug   Attach an interactive Elixir shell to a running ejabberd node
  live       Start an ejabberd node in live (interactive) mode
  iexlive    Start an ejabberd node in live (interactive) mode, within
an Elixir shell
  foreground Start an ejabberd node in server mode (attached)

Optional parameters when starting an ejabberd node:
  --config-dir dir   Config ejabberd:    /etc/jabber
  --config file      Config ejabberd:    /etc/jabber/ejabberd.yml
  --ctl-config file  Config ejabberdctl: /etc/jabber/ejabberdctl.cfg
  --logs dir         Directory for logs: /var/log/jabber
  --spool dir        Database spool dir: /var/spool/jabber
  --node nodename    ejabberd node name: ejabberd at localhost



-- 
  Phil Stracchino
  Babylon Communications
  phils at caerllewys.net
  phil at co.ordinate.org
  Landline: +1.603.293.8485
  Mobile:   +1.603.998.6958


More information about the ejabberd mailing list