Cannot login when using MySQL

I’ve setup several Openfire servers in the last 2 months testing different aspects. I have LDAP authentication working (ssl to another server) with groupings automatically populating the client. I just setup a new Openfire 3.4.1 server starting from scratch and a brand new server running CentOS 5 and I wanted to add the MySQL DB. as opposed to the internal DB. I followed the database installation instructions and during the initial Openfire console set up it connected to the MySQL server. I was then able to login to the console using one of the admin users where I set some up some additional items such as security settings and server connections, etc. I then logged out and restarted the Openfire server and now I cannot log back into either the console or from a client. I’m remembering now, that I’ve had this happen before and it’s always when I turn on MySQL access. If I change the openfire.xml file to use the internal DB then I can login. I’ve granted the jabber user within mysql all priviledges, can login as that user, and see and edit the jabber table. I’m stumped. Here are the last few lines from the logs/warn.log file just after a login attempt:

at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

at java.lang.Thread.run(Unknown Source)

Caused by: javax.security.sasl.SaslException: PLAIN: user not authorized: dslaughter

at org.jivesoftware.openfire.sasl.SaslServerPlainImpl.evaluateResponse(SaslServerP lainImpl.java:127)

… 17 more

Any help would very appreciated.

Dax

Hi Dax,

the first lines of the first stacktrace are much more interesting than the last lines of the last stacktrace.

There may also be sensitive data which you may want to remove, but please post the first exception. You could try to use an older MySQL JDBC driver or a driver which matches your database version, this could help.

LG

Okay I installed the JDBC driver for my version of mysql in /usr/shar/java. I also added a section into my openfire.xml that was suggested from this thread:

http://www.igniterealtime.org/community/message/159973#159973

Not sure if that’s needed but I’m trying everything right now…

I’ve also attached my openfire.xml

And here are the lines that show up in log/warn.log with a login attempt:

at org.jivesoftware.openfire.net.SASLAuthentication.handle(SASLAuthentication.java :229)

at org.jivesoftware.openfire.net.StanzaHandler.process(StanzaHandler.java:152)

at org.jivesoftware.openfire.nio.ConnectionHandler.messageReceived(ConnectionHandl er.java:132)

at org.apache.mina.common.support.AbstractIoFilterChain$TailFilter.messageReceived (AbstractIoFilterChain.java:570)

at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(Ab stractIoFilterChain.java:299)

at org.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFilt erChain.java:53)

at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceive d(AbstractIoFilterChain.java:648)

at org.apache.mina.filter.codec.support.SimpleProtocolDecoderOutput.flush(SimplePr otocolDecoderOutput.java:58)

at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecF ilter.java:162)

at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(Ab stractIoFilterChain.java:299)

at org.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFilt erChain.java:53)

at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceive d(AbstractIoFilterChain.java:648)

at org.apache.mina.filter.executor.ExecutorFilter.processEvent(ExecutorFilter.java :240)

at org.apache.mina.filter.executor.ExecutorFilter$ProcessEventsRunnable.run(Execut orFilter.java:284)

at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

at java.lang.Thread.run(Unknown Source)

Caused by: javax.security.sasl.SaslException: PLAIN: user not authorized: dslaughter

at org.jivesoftware.openfire.sasl.SaslServerPlainImpl.evaluateResponse(SaslServerP lainImpl.java:127)

… 17 more

Message was edited by: Dawn Foster

Hi Dax,

if you could stop Openfire and delete all files in logs/ this would help a lot. Then start Openfire, try to login and stop Openfire. Then open the warn log and look at the first 1-30 lines, there you should see an exception which you may want to post.

LG

Thanks LG. In reference to your first response, I replaced the mysql.jar in the lib directory with one for my version 5.0 versus 5.1. I can now login into the console.

Dax

Hey Dax,

Sorry to hear that the new jdbc driver version is not working for you. Could you try with the 5.0.8 instead? Updating to the 5.* family brings lots of performance and memory improvements. We tried the new driver in our local QA environments and they worked fine.

Thanks,

– Gato