[ejabberd] Server drops random messages from muc with error 503.

Badlop badlop at gmail.com
Tue Jun 9 01:26:54 MSD 2009


2009/6/4 Stephan Maihöfer <sma at turtle-entertainment.de>:
> what would be a correct way to have one cluster serve
> many muc-services? something like:
>
>     private.conference.jabber.org
>     public.conference.jabber.org
>     chess.conference.jabber.org

In ejabberd, for each vhost only or no instance of a module can be defined.

You CANNOT set this:
{hosts, ["jabber.org"]}.
{modules, [
    {mod_muc, [ {host, "chat.conference.jabber.org"} ]},
    {mod_muc, [ {host, "chess.conference.jabber.org"} ]},
    {mod_muc, [ {host, "poker.conference.jabber.org"} ]},
    ...
]}.

Here is a workaround:
* Define one or more main hosts: localhost and localhost2
* Define several minimal hosts: minihost1, minihost2 and minihost3
* Each minimal host will only contain one module: mod_muc, and each
instance is configured with a different hostname.
* In mod_disco instances of main hosts tell to display those JIDs in
the Service Discovery.

With this setup, users can connect and use localhost and localhost2 as usual.
They will see three MUC services in the Service Discovery.

Here are the relevant options for ejabberd.cfg:

{hosts, ["localhost", "localhost2", "minihost1", "minihost2", "minihost3"]}.

{modules,
 [
  {mod_adhoc,    []},
  {mod_announce, [{access, announce}]}, % recommends mod_adhoc
  {mod_caps,     []},
  {mod_configure,[]}, % requires mod_adhoc
  {mod_disco,    [{extra_domains, ["chat.conference.localhost",
      "chess.conference.localhost", "poker.conference.localhost"]}]},
   ...
  %{mod_muc, [...]},   % No need to start MUC here.
  ...
]}.


{host_config, "minihost1",
 [{modules,
   [
    {mod_muc, [{host, "chat.conference.localhost"},
               {access, muc},
               {access_create, muc},
               {access_persistent, muc},
               {access_admin, muc_admin}
              ]}
   ]
  }
 ]}.

{host_config, "minihost2",
 [{modules,
   [
    {mod_muc, [{host, "chess.conference.localhost"},
               {access, muc},
               {access_create, muc},
               {access_persistent, muc},
               {access_admin, muc_admin}
              ]}
   ]
  }
 ]}.

{host_config, "minihost3",
 [{modules,
   [
    {mod_muc, [{host, "poker.conference.localhost"},
               {access, muc},
               {access_create, muc},
               {access_persistent, muc},
               {access_admin, muc_admin}
              ]}
   ]
  }
 ]}.

---
Badlop
ProcessOne


More information about the ejabberd mailing list