Erlang/OTP Forums

Author Message

<  Ejabberd mailing list  ~  Problem integrating with Postgresql

Guest
Posted: Thu Sep 14, 2006 12:05 pm Reply with quote
Guest
Hi,

I have followed the steps for using ejabberd(1.1.1) with postgres(8.1) using odbc on windows. I did the following :
1) Postgres setup: Install postgres and create the users and tables as follows. Created user 'ejabberd' and database 'ejabberd'. Setup tables using the script pg.sql

2) Set a system DSN in Control Panel/Administrative Tools/Data Sources(ODBC) for postgres

3) Ejabberd configuration changes: In the file Ejabberd/ejabberd.cfg
remove: {auth_method, internal}.
add: {auth_method, odbc}.
{odbc_server, "DSN={postgres_data_source_name};UID={postgres_user_id};PWD={postgres_user_name}"}
Change :
mod_roster to mod_roster_odbc, mod_vcard to mod_vcard_odbc, mod_offline to mod_offline_odbc, mod_last to mod_last_odbc.

After starting when i try to register and login through exodus, it gives error : "There was an error trying to authenticate you...."
I can see the username and password present in postgres database, which means that it is able to communicate with postgres. Also, if i try to login through my client code using smack, i get an XMPPException with message - SASL Authentication Failed

Did i miss out any steps? Any help is greatly appreciated.

Thanks,
Rohit Ranjan.
_______________________________________________
ejabberd mailing list
ejabberd@jabber.ru
http://lists.jabber.ru/mailman/listinfo/ejabberd
Post recived from mailinglist
Guest
Posted: Thu Sep 14, 2006 12:11 pm Reply with quote
Guest
check if you are not using encrypted passwords(in psql). current odbc driver supports only unencrypted passwords...


On 9/14/06, rohit.ranjan@bt.com (rohit.ranjan@bt.com) <rohit.ranjan@bt.com (rohit.ranjan@bt.com)> wrote:
Quote:
Hi,

I have followed the steps for using ejabberd(1.1.1) with postgres(8.1) using odbc on windows. I did the following :
1) Postgres setup: Install postgres and create the users and tables as follows. Created user 'ejabberd' and database 'ejabberd'. Setup tables using the script pg.sql

2) Set a system DSN in Control Panel/Administrative Tools/Data Sources(ODBC) for postgres

3) Ejabberd configuration changes: In the file Ejabberd/ejabberd.cfg
remove: {auth_method, internal}.
add: {auth_method, odbc}.
Guest
Posted: Thu Sep 14, 2006 12:14 pm Reply with quote
Guest
also i think more proper syntax for postgrsql is:

{odbc_server, {pgsql, "server ip", "user", "db_name", "password"}}.



On 9/14/06, rohit.ranjan@bt.com (rohit.ranjan@bt.com) <rohit.ranjan@bt.com (rohit.ranjan@bt.com)> wrote:
Quote:
Hi,

I have followed the steps for using ejabberd(1.1.1) with postgres(8.1) using odbc on windows. I did the following :
1) Postgres setup: Install postgres and create the users and tables as follows. Created user 'ejabberd' and database 'ejabberd'. Setup tables using the script pg.sql

2) Set a system DSN in Control Panel/Administrative Tools/Data Sources(ODBC) for postgres

3) Ejabberd configuration changes: In the file Ejabberd/ejabberd.cfg
remove: {auth_method, internal}.
add: {auth_method, odbc}.
Guest
Posted: Thu Sep 14, 2006 4:06 pm Reply with quote
Guest
This syntax is when you are using native Postgresql interface (as i found in docs). For ODBC the syntax i have used looks correct.

Thanks for your help,
Rohit Ranjan


-----Original Message-----
From: ejabberd-bounces@jabber.ru on behalf of Zbyszek Z
Guest
Posted: Thu Sep 14, 2006 4:11 pm Reply with quote
Guest
Hi Zbyszek,

I have checked my postgres and it is using unencrypted passwords. I can't find anything in ejabberd logs also. Strange thing is that my code for registering the new user works fine, the user and password are present in postgres database, but when i try to signon it starts complaining.

Thanks for your help,

Regards,
Rohit Ranjan

-----Original Message-----
From: ejabberd-bounces@jabber.ru on behalf of Zbyszek Z
Guest
Posted: Thu Sep 14, 2006 9:42 pm Reply with quote
Guest
Hello,

* rohit.ranjan@bt.com <rohit.ranjan@bt.com> [2006-09-14 17:05:44 +0100]:

> Hi Zbyszek,
>
> I have checked my postgres and it is using unencrypted passwords. I
> can't find anything in ejabberd logs also. Strange thing is that my
> code for registering the new user works fine, the user and password
> are present in postgres database, but when i try to signon it starts
> complaining.

Do you have something in your log file ?

--
Micka
Guest
Posted: Fri Sep 15, 2006 5:34 am Reply with quote
Guest
The log file only shows this repeatedly (nothing else):

Accepted connection {{10,157,8,44},4276} -> {{10,157,8,44},5222}

=INFO REPORT==== 2006-09-14 21:38:11 ===
I(<0.178.0>:ejabberd_listener:90): (#Port<0.375>) Accepted connection {{10,157,8,44},4343} -> {{10,157,8,44},5222}


While starting, this line also appears in console (if it is helpful):
The odbc application was not started. Has now been started as a temporary application.

I am still stuck with this problem.

Thanks,
Rohit Ranjan.


-----Original Message-----
From: ejabberd-bounces@jabber.ru on behalf of Mickael Remond
Sent: Fri 9/15/2006 3:10 AM
To: ejabberd@jabber.ru
Subject: Re: [ejabberd] Problem integrating with Postgresql

Hello,

* rohit.ranjan@bt.com <rohit.ranjan@bt.com> [2006-09-14 17:05:44 +0100]:

> Hi Zbyszek,
>
> I have checked my postgres and it is using unencrypted passwords. I
> can't find anything in ejabberd logs also. Strange thing is that my
> code for registering the new user works fine, the user and password
> are present in postgres database, but when i try to signon it starts
> complaining.

Do you have something in your log file ?

--
Micka

Display posts from previous:  

All times are GMT
Page 1 of 1
This forum is locked: you cannot post, reply to, or edit topics.

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum