Hi!
* Ракуленко Александр Георгиевич <[email protected]> [2009-08-10 22:34:36 CEST]:
> The point:
>
> When you install ejabberd package in lenny or in sid ( 2009.08.11 ) it
> work's fine until you try to use postgresql as a backend for any
> module you get an error message in /var/log/ejabberd/ejabberd.log:
>
> =ERROR REPORT==== 2009-08-10 17:37:33 ===
> E(<0.38.0>:ejabberd_rdbms:67) : Start of supervisor
> 'ejabberd_odbc_sup_ruscobank.ru' failed:
> {error,{shutdown,{child,undefined,'ejabberd_odbc_sup_ruscobank.ru',
> {ejabberd_odbc_sup,start_link,["ruscobank.ru"]},
> transient,infinity,supervisor,
> [ejabberd_odbc_sup]}}}
> Retrying...
>
> this message continues to appear in log file. ejabberd seems working
> fine, except the functions, that depend on the backend, that uses
> postgresql.
>
> My ejabberd.cfg:
> taiga:~# cat /etc/ejabberd/ejabberd.cfg| grep -v '%%'| grep -v '^$'
> {odbc_server, {pgsql, "172.16.116.12", "ejabberd", "postgres", "xxxxxxx"}}.
> {pgsql_users_number_estimate, true}.
> {odbc_pool_size, 10}.
> {odbc_keepalive_interval, undefined}.
> [...]
> i read different erlang manuals and got, that you need
> pgsql.beam
> pgsql_proto.beam
> pgsql_tcp.beam
> pgsql_util.beam
>
> files somewhere in your ebin path.
Almost. There is also a different posibility, which I use personally to
make ejabberd work with postgres: odbc. These are the settings I am
using for this:
#v+
{odbc_server, "DSN=PSQLejabberd;UID=ejabberd;PWD=YouWish"}.
[...]
{modules,
[...]
{mod_last_odbc,[]},
[...]
{mod_offline_odbc,[]},
[...]
{mod_roster_odbc,[]},
[...]
{mod_vcard_odbc,[]},
[...]
]}.
#v-
And of course it needs the packages unixodbc and odbc-postgresql
installed and the following parts in /etc/odbc.ini and
/etc/odbcinst.ini:
#v+
[PSQLejabberd]
Description = PostgreSQL
Driver = PostgreSQL Unicode
Trace = No
TraceFile = /tmp/psqlodbc.log
Database = ejabberd
Servername = localhost
UserName =
Password =
Port =
ReadOnly = No
RowVersioning = No
ShowSystemTables = No
ShowOidColumn = No
FakeOidIndex = No
ConnSettings =
#v-
#v+
[PostgreSQL Unicode]
Description = PostgreSQL ODBC driver (Unicode version)
Driver = /usr/lib/odbc/psqlodbcw.so
Setup = /usr/lib/odbc/libodbcpsqlS.so
Debug = 0
CommLog = 1
UsageCount = 1
#v-
Granted, that's not most straight forward, but it works without any
problem or additional modules. For a start, adding that modules into the
ejabberd package would add a dependency on the postgres library, and
people would also want the mysql one in with its dependency - which is a
no-go.
Having it in a seperate package might work out, but then, it actually
/does/ work through the odbc framework and I'm not totally convinced of
the benefit of doing it directly.
So long. :)
Rhonda
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]