Hi,
I have Ejabberd 1.1.4 installed and working with internal authentication, however, when trying to use PostgreSQL 8.2 I always get "Failed legacy authentication for user@hostname/resource" (when using flash client) or "" (using Exodus)
The strange thing is that I can create users (using Exodus) and I can see the data being stored in the DB, however I cannot login...
I tried using MySQL instead, replacing the configuration line as follows and it worked (with both Flash client or Exodus):
%{odbc_server, {pgsql, "127.0.0.1", "DB_NAME", "USER", "PASSWORD"}}.
{odbc_server, {mysql, "127.0.0.1", "DB_NAME", "USER", "PASSWORD"}}.
I followed the steps in
and got the native PostgreSQL driver from
The log for a connection using Exodus:
=INFO REPORT==== 8-Dec-2007::15:37:18 ===
I(<0.221.0>:ejabberd_listener:90): (#Port<0.416>) Accepted connection {{192,168,1,71},51024} -> {{192,168,1,66},5222}
D(<0.599.0>:ejabberd_receiver:261) : Received XML on stream = "<stream:stream to=\"HOSTNAME\" xmlns=\"jabber:client\" xmlns:stream=\"http://etherx.jabber.org/streams\" xml:lang=\"pt_PT\" version=\"1.0\" >"
D(<0.598.0>:ejabberd_c2s:1236) : Send XML on stream = "<?xml version='1.0'?><stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='1344024846' from='HOSTNAME' version='1.0' xml:lang='en'>"
D(<0.598.0>:ejabberd_c2s:1236) : Send XML on stream = "<stream:features><starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/><mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'><mechanism>DIGEST-MD5</mechanism><mechanism>PLAIN</mechanism></mechanisms><register xmlns='http://jabber.org/features/iq-register'/></stream:features>"
D(<0.599.0>:ejabberd_receiver:261) : Received XML on stream = "<starttls xmlns=\"urn:ietf:params:xml:ns:xmpp-tls\"/>"
D(<0.599.0>:ejabberd_receiver:261) : Received XML on stream = []
D(<0.598.0>:ejabberd_c2s:1236) : Send XML on stream = "<proceed xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>"
D(<0.599.0>:ejabberd_receiver:261) : Received XML on stream = []
D(<0.599.0>:ejabberd_receiver:261) : Received XML on stream = []
D(<0.599.0>:ejabberd_receiver:261) : Received XML on stream = "<stream:stream to=\"HOSTNAME\" xmlns=\"jabber:client\" xmlns:stream=\"http://etherx.jabber.org/streams\" version=\"1.0\" >"
D(<0.598.0>:ejabberd_c2s:1236) : Send XML on stream = "<?xml version='1.0'?><stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='297966530' from='HOSTNAME' version='1.0' xml:lang='en'>"
D(<0.598.0>:ejabberd_c2s:1236) : Send XML on stream = "<stream:features><mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'><mechanism>DIGEST-MD5</mechanism><mechanism>PLAIN</mechanism></mechanisms><register xmlns='http://jabber.org/features/iq-register'/></stream:features>"
D(<0.599.0>:ejabberd_receiver:261) : Received XML on stream = "<auth mechanism=\"DIGEST-MD5\" xmlns=\"urn:ietf:params:xml:ns:xmpp-sasl\"/>"
D(<0.598.0>:ejabberd_c2s:1236) : Send XML on stream = "<challenge xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>bm9uY2U9IjExMDI4NzM4MDIiLHFvcD0iYXV0aCIsY2hhcnNldD11dGYtOCxhbGdvcml0aG09bWQ1LXNlc3M=</challenge>"
D(<0.599.0>:ejabberd_receiver:261) : Received XML on stream = "<response xmlns=\"urn:ietf:params:xml:ns:xmpp-sasl\">dXNlcm5hbWU9InNiYjIiLHJlYWxtPSIiLG5vbmNlPSIxMTAyODczODAyIixjbm9uY2U9ImU0YmVjMjEzMjAwMmEyNWVkYjk0Yjk3ODFkYTFlMGMyIixuYz0wMDAwMDAwMSxxb3A9YXV0aCxkaWdlc3QtdXJpPSJ4bXBwL21pbmdsZS1kZXYiLGNoYXJzZXQ9dXRmLTgscmVzcG9uc2U9YjcwZWU4ZDU5NTIzNjFlYmIzZjEyZmUyMThlYjljZDA=</response>"
D(<0.598.0>:ejabberd_c2s:1236) : Send XML on stream = "<failure xmlns='urn:ietf:params:xml:ns:xmpp-sasl'><not-authorized/></failure>"
D(<0.599.0>:ejabberd_receiver:261) : Received XML on stream = []
Could this be a problem with the driver?
Does anyone have this problem?
Any hints on how to debug this problem?
BTW, I really need to use PostgreSQL instead of MySQL, despite the fact that it is already working with MySQL...
Thanks,
Sergio Bessa
i have the same problemm. in
i have the same problemm. in postgresql 8.2.1 there wasn't such problemm. I think that problemm will be with backend pgsql. system show that ejabber is connected with database. I can connect to ejabberd serwer, but I can't authorize. when I run ejabberdctl I can add new user.
Same here...
Same here...
Finally, problem spotted
I have Ejabberd 1.1.4 installed and working with internal authentication, however, when trying to use PostgreSQL 8.2 I always get "Failed legacy authentication for user@hostname/resource" (when using flash client) or "" (using Exodus)
The strange thing is that I can create users (using Exodus) and I can see the data being stored in the DB, however I cannot login...
I tried using MySQL instead, replacing the configuration line as follows and it worked (with both Flash client or Exodus):
%{odbc_server, {pgsql, "127.0.0.1", "DB_NAME", "USER", "PASSWORD"}}.
{odbc_server, {mysql, "127.0.0.1", "DB_NAME", "USER", "PASSWORD"}}.
I followed the steps inhttp://www.process-one.net/docs/ejabberd/guide_en.html during the installationhttp://jungerl.sourceforge.net/ which I compiled and copied the 'beam' files into /var/lib/ejabberd/ebin/
and got the native PostgreSQL driver from
Could this be a problem with the driver?
Does anyone have this problem?
Any hints on how to debug this problem?
It seems the problem is in the pgsql-erlang driver. I got it from ejabberd-modules SVN, and had exactly the same problem than you.
Then I got a slightly older version of the pgsql from SVN:
$ svn up -r 412
Compiled, installed and ejabberd now allows me to login correctly!
You can compile the modified file yourself, or get it here:
http://tkabber.jabber.ru/files/badlop/pgsql_util.beam
If you try, tell me if it solves your problem or not, and also what exact version of PostgreSQL did you try.
This bug is tracked here:
Authentication with pgsql driver is broken