On 11.08.2009 12:52, Gerfried Fuchs wrote:
        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



Hi, thanks for your reply.

Well, i know about the odbc framework...
I still think, that something should me done, because the debian user,
who installed a ejabberd
packeage is misinformed.
If you want to use it with pgsql you probably go to config and search
for "pgsql" or "postgres" there. And use see:

%%
%% PostgreSQL server:
%%
%%{odbc_server, {pgsql, "server", "database", "username", "password"}}.
%%
%% If you want to specify the port:
%%{odbc_server, {pgsql, "server", 1234, "database", "username",
"password"}}.

Of course if you never install ejabberd manually you'll think it's all
you have to do to connect
ejabberd to your pgsql server.
So, my opinion is that you have do one of the following:
- add a comment to ejabberd.cfg, saying that debian ejabberd package
works with sql only throw odbc
- rebuild ejabberd so, that it couldn't use native mode at all
- add a package with erlang-pgsql and erlang-mysql (with *sql dependencies)
(of course i'd prefere adding a package with erlang-pgsql :-) )

otherwise user is misinformed why his ejabberd doesn't work properly.
i only figured it out with the help of my comrade, who uses freebsd, and
therefor knows
what you need to compile to make ejd working.
this is russian linux comunity forum:
http://linuxforum.ru/index.php?showtopic=88957
where i started to solve the problem. people there use native postgres mode.

thank you.




--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to