[JDEV] load backend pgsql fixed - now xdb_sql and length of username

Barry Hoggard barry at tristanmedia.com
Wed Aug 29 14:47:52 CDT 2001


Here's the answer.  Doing a "make CPPFLAGS=-DPOSTGRESQL_BACKEND" without a
full make clean didn't clear out xdb_sql_backend.o, so it was missing the
code to connect.

Sorry for the wasted bandwidth.

Now it's connecting.  My test machine has a long hostname, so I found that
32 varchars wasn't enough for username.  I've increased it to 64 and I'm
testing to see what, if anything, is going to break.


----- Original Message -----
From: "Barry Hoggard" <barry at tristanmedia.com>
To: <jdev at jabber.org>
Sent: Wednesday, August 29, 2001 12:47 PM
Subject: [JDEV] How can I debug "cannot load backend 'pgsql' " error?


> I'm trying to integrate jabber with an existing postgres database.  I can
> make the installation work fine with xdb_file.
>
> Everything compiled cleanly with make CPPFLAGS=-DPOSTGRESQL_BACKEND, but
> when I start it up, I get:
>
> Wed Aug 29 12:38:25 2001  deliver.c:460 DELIVER 3:-internal <log
> type='alert' from='-internal'>[xdbsql_config_init] cannot load backend
> &apos;pgsql&apos;</log>
> Wed Aug 29 12:38:25 2001  deliver.c:649 delivering to instance 'elogger'
> 20010829T16:38:25: [alert] (-internal): [xdbsql_config_init] cannot load
> backend 'pgsql'
> Wed Aug 29 12:38:25 2001  deliver.c:460 DELIVER 3:-internal <log
> type='alert' from='-internal'>[xdb_sql] configuration failed</log>
> Wed Aug 29 12:38:25 2001  deliver.c:649 delivering to instance 'elogger'
> 20010829T16:38:25: [alert] (-internal): [xdb_sql] configuration failed
>
> My jabber.xml file contains this for the relevant area:
>
>   <xdb id="xdb_sql">
>     <host/>
>         <ns>jabber:iq:roster</ns>
>         <ns>jabber:x:offline</ns>
>         <ns>jabber:iq:filter</ns>
>         <ns>jabber:iq:last</ns>
>         <ns>jabber:iq:auth</ns>
>         <ns>jabber:iq:auth:0k</ns>
>         <ns>jabber:iq:register</ns>
>         <ns>vcard-temp</ns>
>         <load>
>           <xdb_sql>./xdb_sql/xdb_sql.so</xdb_sql>
>         </load>
>         <jabberd:include>./xdb_sql/xdb_sql.xml</jabberd:include>
>   </xdb>
>
> I've changed the xdb_sql.xml file to contain this for the xdb_sql tag:
>
>   <xdb_sql xmlns="jabberd:xdb_sql:config">
>     <!-- Backend to use -->
>     <backend>postgres</backend>
>
>     <!-- Configure information about the SQL connection -->
>     <connection>
>       <host>pollux</host>
>       <db>jabber</db>
>       <user>jabber</user>
>       <pass></pass>
>     </connection>
>
> ...
>
> I can connect from this machine to my postgres if I type "psql -hpollux
> jabber jabber" at the command prompt.
>
> I don't see an obvious place for failure in the code for
xdbsql_config_init.
>
> --
> Barry Hoggard
> Tristan Media LLC
> e: barry at tristanmedia.com
> p: 212-627-1596
> aim: hoggardb
>
>
> _______________________________________________
> jdev mailing list
> jdev at jabber.org
> http://mailman.jabber.org/listinfo/jdev




More information about the JDev mailing list