[ejabberd] Problems with ejabberd and odbc

Sascha Bendix scrubb at localroot.de
Thu Nov 20 19:38:44 MSK 2008


Hi everybody,

I have a jabberd server which I want to migrate to ejabberd. For this I
tested ejabberd 2.0.1-5 on a debian testing system. As long as I use the
integrated mnesia database all works well. But I wanted to switch to
postgresql/odbc and run into some bugs. After I tried the trunk and
1.0-tagged version of the pgsql erlang module, I set up a mysql database
with the the same results.

First of all I used the command 'ejabberdctl import-dir
/var/spool/jabber/domain.tld/' to import the old data. When using odbc
the users will only imported as users instead of users at domain.tld.
ejabberd interpretes this as users which are registered on all
configfired domains.

The second problem I got is, that the roster isn't imported at all when
using mod_roster_odbc. When using mod_roster this works fine.

Here is my ejabberd configuration:
{acl, admin, {user, "scrubb", "nova.fem.tu-ilmenau.de"}}.
{hosts, ["nova.fem.tu-ilmenau.de","n251.fem.tu-ilmenau.de","fem-net.de"]}.
{loglevel, 5}.
{listen,
 [
  {5222, ejabberd_c2s, [
                        {access, c2s},
                        {shaper, c2s_shaper},
                        {max_stanza_size, 65536},
                        starttls, {certfile, "/etc/ejabberd/ejabberd.pem"}
                       ]},
  {5223, ejabberd_c2s, [
                        {access, c2s},
                        {shaper, c2s_shaper},
                        {max_stanza_size, 65536},
                        tls, {certfile, "/etc/ejabberd/ejabberd.pem"}
                       ]},
  {5269, ejabberd_s2s_in, [
                           {shaper, s2s_shaper},
                           {max_stanza_size, 131072}
                          ]},
  %% Jabber ICQ Transport
  {5555, ejabberd_service, [
                            {ip, {127, 0, 0, 1}},
                            {access, all},
                            {shaper_rule, fast},
                            {hosts, ["icq.n251.fem.tu-ilmenau.de",
"sms.n251.fem.tu-ilmenau.de"],
                                       [{password, "secret"}]}
                            ]},
  %% AIM Transport
  {5556, ejabberd_service, [
                            {ip, {127, 0, 0, 1}},
                            {access, all},
                            {shaper_rule, fast},
                            {host, "aim.n251.fem.tu-ilmenau.de",
[{password, "secret"}]}
                            ]},
  %% MSN Transport
  {5557, ejabberd_service, [
                            {ip, {127, 0, 0, 1}},
                            {access, all},
                            {shaper_rule, fast},
                            {host, "msn.n251.fem.tu-ilmenau.de",
[{password, "secret"}]}
                            ]},
  {5280, ejabberd_http, [
                         http_poll,
                         web_admin
                        ]}
 ]}.
{s2s_use_starttls, true}.
{s2s_certfile, "/etc/ejabberd/ejabberd.pem"}.
{auth_method, odbc}.
{odbc_server, {mysql, "127.0.0.1", "ejabberd", "ejabberd", "password"}}.
{shaper, normal, {maxrate, 1000}}.
{shaper, fast, {maxrate, 50000}}.
{acl, local, {user_regexp, ""}}.
{access, max_user_sessions, [{10, all}]}.
{access, local, [{allow, local}]}.
{access, c2s, [{deny, blocked},
               {allow, all}]}.
{access, c2s_shaper, [{none, admin},
                      {normal, all}]}.
{access, s2s_shaper, [{fast, all}]}.
{access, announce, [{allow, admin}]}.
{access, configure, [{allow, admin}]}.
{access, muc_admin, [{allow, admin}]}.
{access, muc, [{allow, all}]}.
{access, register, [{deny, all}]}.
{access, pubsub_createnode, [{allow, all}]}.
{language, "en"}.
{modules,
 [
  {mod_adhoc,    []},
  {mod_announce, [{access, announce}]}, % requires mod_adhoc
  {mod_caps,     []},
  {mod_configure,[]}, % requires mod_adhoc
  {mod_ctlextra, []},
  {mod_disco, [{extra_domains, ["icq.n251.fem.tu-ilmenau.de",
                                "msn.n251.fem.tu-ilmenau.de",
                                "aim.n251.fem.tu-ilmenau.de"]}]},
  {mod_irc,      []},
  {mod_last_odbc,     []},
  {mod_muc,      [
                  {access, muc},
                  {access_create, muc},
                  {access_persistent, muc},
                  {access_admin, muc_admin},
                  {max_users, 500}
                 ]},
  {mod_offline_odbc,  []},
  {mod_privacy_odbc,  []},
  {mod_private_odbc,  []},
  {mod_proxy65,  [
                  {access, local},
                  {shaper, c2s_shaper}
                 ]},
  {mod_pubsub,   [ % requires mod_caps
                  {access_createnode, pubsub_createnode},
                  {plugins, ["default", "pep"]}
                 ]},
  {mod_register, [
                  {welcome_message, {"Welcome!",
                                     "Welcome to a Jabber service
powered by Debian. "
                                     "For information about Jabber visit "
                                     "http://www.jabber.org"}},
                  {access, register}
                 ]},
  {mod_roster,   []},
  {mod_stats,    []},
  {mod_time,     []},
  {mod_vcard_odbc,    []},
  {mod_version,  []}
 ]}.

It would be very nice if you can give me some help or tell me how I  can
proceed debugging it.

Regards,

Sascha Bendix



More information about the ejabberd mailing list