Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#491664: ejabberd: problems with using postgresql as backend

9 views
Skip to first unread message

Gerfried Fuchs

unread,
Jul 21, 2008, 4:50:09 AM7/21/08
to
Package: ejabberd
Version: 2.0.1-2
Severity: normal

Hi!

I tried to use postgres through odbc. I did create the database tables
through the sql file available in the sources of ejabberd (would be nice
to have those in the binary package as example file, too).

I did set up my /etc/odbc.ini accordingly, and can connect through
"isql PSQLejabberd ejabberd pass" to the database, so the odbc part
works.

In ejabberd.cfg I change the following settings:

{auth_method, odbc}.
{odbc_server, "DSN=PSQLejabberd;UID=ejabberd;PWD=pass"}.

(and the suggested mod_last, mod_offline, mod_roster, mod_vcard to
their _odbc counterpart)

All I receive is an erl_crash.dump file in /var/log/ejabberd when I try
to start ejabberd after that. As that file isn't that small and I'm not
sure what it might contain I rather refrain from attaching it to the
bugreport - just give me a call if you could need it and you'll receive
it offsite.

Any suggestions are welcomed.
Rhonda

-- System Information:
Debian Release: lenny/sid
APT prefers testing
APT policy: (500, 'testing')
Architecture: powerpc (ppc)

Kernel: Linux 2.6.25-2-powerpc
Locale: LANG=de_AT.UTF-8, LC_CTYPE=de_AT.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages ejabberd depends on:
ii adduser 3.108 add and remove users and groups
ii debconf [debconf-2.0] 1.5.22 Debian configuration management sy
ii erlang-base [erlang-ab 1:12.b.3-dfsg-1 Concurrent, real-time, distributed
ii erlang-nox 1:12.b.3-dfsg-1 Concurrent, real-time, distributed
ii libc6 2.7-12 GNU C Library: Shared libraries
ii libexpat1 2.0.1-4 XML parsing C library - runtime li
ii libpam0g 0.99.7.1-6 Pluggable Authentication Modules l
ii libssl0.9.8 0.9.8g-10.1 SSL shared libraries
ii openssl 0.9.8g-10.1 Secure Socket Layer (SSL) binary a
ii ucf 3.007 Update Configuration File: preserv
ii zlib1g 1:1.2.3.3.dfsg-12 compression library - runtime

ejabberd recommends no packages.

-- debconf information:
ejabberd/nomatch:
* ejabberd/user: admin
* ejabberd/hostname: localhost

--
To UNSUBSCRIBE, email to debian-bugs-...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org

Sergei Golovan

unread,
Jul 21, 2008, 5:20:09 AM7/21/08
to
On 7/21/08, Gerfried Fuchs <rho...@debian.at> wrote:
>
> I tried to use postgres through odbc. I did create the database tables
> through the sql file available in the sources of ejabberd (would be nice
> to have those in the binary package as example file, too).

I'll add it to examples.

>
> All I receive is an erl_crash.dump file in /var/log/ejabberd when I try
> to start ejabberd after that. As that file isn't that small and I'm not
> sure what it might contain I rather refrain from attaching it to the
> bugreport - just give me a call if you could need it and you'll receive
> it offsite.

Could you show the first few lines of erl_crash.dump (a slogan could
be helpful) and a content of /var/log/ejabberd/sasl.log and
/var/log/ejabberd/ejabberd.log?

Also, could you try to start ejabberd attached to the terminal (just
run /usr/sbin/ejabberd as ejabberd user) and show the results (if
there's something interesting)?

> -- System Information:
> Debian Release: lenny/sid
> APT prefers testing
> APT policy: (500, 'testing')
> Architecture: powerpc (ppc)

It wouldn't be a big surprise to me if erlang odbc driver fails to
work on powerpc architecture. I bet it was never testing on it
thorouhly.

Cheers!
--
Sergei Golovan

Gerfried Fuchs

unread,
Jul 21, 2008, 5:50:14 AM7/21/08
to
* Sergei Golovan <sgol...@nes.ru> [2008-07-21 11:05:46 CEST]:

> On 7/21/08, Gerfried Fuchs <rho...@debian.at> wrote:
> > I tried to use postgres through odbc. I did create the database tables
> > through the sql file available in the sources of ejabberd (would be nice
> > to have those in the binary package as example file, too).
>
> I'll add it to examples.

Thanks.

> > All I receive is an erl_crash.dump file in /var/log/ejabberd when I try
> > to start ejabberd after that. As that file isn't that small and I'm not
> > sure what it might contain I rather refrain from attaching it to the
> > bugreport - just give me a call if you could need it and you'll receive
> > it offsite.
>
> Could you show the first few lines of erl_crash.dump (a slogan could
> be helpful) and a content of /var/log/ejabberd/sasl.log and
> /var/log/ejabberd/ejabberd.log?

sasl.log and ejabberd.log only contains stuff from starting previous to
my changes to ejabberd.cfg.

The first linkes from the dump are:

#v+
=erl_crash_dump:0.1
Mon Jul 21 10:43:25 2008
Slogan: Kernel pid terminated (application_controller) ({application_start_failure,kernel,{shutdown,{kernel,start,[normal,[]]}}})
System version: Erlang (BEAM) emulator version 5.6.3 [source] [async-threads:0] [kernel-poll:true]
Compiled: Wed Jun 18 07:45:21 2008
Atoms: 4118
#v-

> Also, could you try to start ejabberd attached to the terminal (just
> run /usr/sbin/ejabberd as ejabberd user) and show the results (if
> there's something interesting)?

#v+
ejabberd@edna:~$ /usr/sbin/ejabberd
Erlang (BEAM) emulator version 5.6.3 [source] [async-threads:0] [kernel-poll:false]

Eshell V5.6.3 (abort with ^G)
(ejabberd@edna)1>
=INFO REPORT==== 21-Jul-2008::11:38:37 ===
application: ejabberd
exited: {bad_return,
{{ejabberd_app,start,[normal,[]]},
{'EXIT',
{badarg,
[{ejabberd_check,'-get_db_used/0-fun-0-',2},
{ejabberd_check,get_db_used,0},
{ejabberd_check,check_database_modules,0},
{ejabberd_app,start,2},
{application_master,start_it_old,4}]}}}}
type: temporary
#v-

> > -- System Information:
> > Debian Release: lenny/sid
> > APT prefers testing
> > APT policy: (500, 'testing')
> > Architecture: powerpc (ppc)
>
> It wouldn't be a big surprise to me if erlang odbc driver fails to
> work on powerpc architecture. I bet it was never testing on it
> thorouhly.

That's a pitty then because that's the only way you offer it. Do you
guess it might be an endianness bug? There are other architectures that
would also be affected by that.

Could you maybe be so kind to offer the direct postgres modules instead
of requiring people to use odbc for a workaround?

My jabber-ID is btw. rho...@jabber.noreply.org if you want to get in
more direct contact. That is running on a different system using a
different server so it's not affected by the problem. ;)

So long,
Rhonda
P.S.: Interesting that your spam system tagged the bugreport as spam.
Can you investigate what did that and maybe repair it? I am not so
much worried about my own bugreports but maybe others that might end
up in your spam box?

Sergei Golovan

unread,
Jul 21, 2008, 6:50:15 AM7/21/08
to
On 7/21/08, Gerfried Fuchs <rho...@deb.at> wrote:
>
> The first linkes from the dump are:
>
> #v+
> =erl_crash_dump:0.1
> Mon Jul 21 10:43:25 2008
> Slogan: Kernel pid terminated (application_controller) ({application_start_failure,kernel,{shutdown,{kernel,start,[normal,[]]}}})
> System version: Erlang (BEAM) emulator version 5.6.3 [source] [async-threads:0] [kernel-poll:true]
> Compiled: Wed Jun 18 07:45:21 2008
> Atoms: 4118
> #v-

It means that ejabberd failed to even start.

>
> > Also, could you try to start ejabberd attached to the terminal (just
> > run /usr/sbin/ejabberd as ejabberd user) and show the results (if
> > there's something interesting)?
>
> #v+
> ejabberd@edna:~$ /usr/sbin/ejabberd
> Erlang (BEAM) emulator version 5.6.3 [source] [async-threads:0] [kernel-poll:false]
>
> Eshell V5.6.3 (abort with ^G)
> (ejabberd@edna)1>
> =INFO REPORT==== 21-Jul-2008::11:38:37 ===
> application: ejabberd
> exited: {bad_return,
> {{ejabberd_app,start,[normal,[]]},
> {'EXIT',
> {badarg,
> [{ejabberd_check,'-get_db_used/0-fun-0-',2},
> {ejabberd_check,get_db_used,0},
> {ejabberd_check,check_database_modules,0},
> {ejabberd_app,start,2},
> {application_master,start_it_old,4}]}}}}
> type: temporary
> #v-

It likely means that you have some invalid {odbc_server, ???} entry in
local_config table. Try to uncomment override_local directive in
ejabberd.cfg and start ejabberd again. If it will not work then I's
likely a bug in ejabberd_check module and I'll try to find it.

>
> > > -- System Information:
> > > Debian Release: lenny/sid
> > > APT prefers testing
> > > APT policy: (500, 'testing')
> > > Architecture: powerpc (ppc)
> >
> > It wouldn't be a big surprise to me if erlang odbc driver fails to
> > work on powerpc architecture. I bet it was never testing on it
> > thorouhly.
>
> That's a pitty then because that's the only way you offer it. Do you
> guess it might be an endianness bug? There are other architectures that
> would also be affected by that.

As far as I can see from your report there's still no evidence which
supports my words about odbc driver. I know definitely that it wasn't
working properly on amd64 before 12.b.3.

Another known issue with erlang odbc driver is a size restriction of
SQL queries. The maximum data size is 8000 bytes, which is
insufficient for vCard data for example.

>
> Could you maybe be so kind to offer the direct postgres modules instead
> of requiring people to use odbc for a workaround?

They aren't included in ejabberd souces by upstream, and I wouldn't
like to deviate from upstream source too much. But if someone will
create an additional package (is ejabberd-pgsql a good name for it?)
I'd be happy to sponsor it for example.

> P.S.: Interesting that your spam system tagged the bugreport as spam.
> Can you investigate what did that and maybe repair it? I am not so
> much worried about my own bugreports but maybe others that might end
> up in your spam box?

It only marks messages and doesn't delete them, so it's mostly harmless.

--
Sergei Golovan

Sergei Golovan

unread,
Jul 21, 2008, 8:10:12 AM7/21/08
to
On 7/21/08, Gerfried Fuchs <rho...@deb.at> wrote:
> Eshell V5.6.3 (abort with ^G)
> (ejabberd@edna)1>
> =INFO REPORT==== 21-Jul-2008::11:38:37 ===
> application: ejabberd
> exited: {bad_return,
> {{ejabberd_app,start,[normal,[]]},
> {'EXIT',
> {badarg,
> [{ejabberd_check,'-get_db_used/0-fun-0-',2},

I've found a bug in ejabberd_check. Could you test a fix using the
package from http://sgolovan.nes.ru/debian-packages/ejabberd/ (I can't
build powerpc binaries, so there's only a source package)?

--
Sergei Golovan

0 new messages