powered by Jive Software

Closing connection due to error while processing message

We have Openfire 3.8.1 running on a medium instance in the Amazon Cloud with various mobile and web applications connecting to it. In the Openfire error log I see tons of the below exceptions.

According to 13.7 Use of base64 in SASL in http://xml.coverpages.org/draft-ietf-xmpp-core-19.txt the base64 data encoding is correct.

Anyone has an idea why these exceptions are thrown or could give some hints to why connections are closed?

at java.util.StringTokenizer.nextToken(StringTokenizer.java:349)

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

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

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

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

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.common.IoFilterAdapter.messageReceived(IoFilterAdapter.java:80)

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:185)

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 :239)

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

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:51)

at java.lang.Thread.run(Thread.java:722)

2013.04.04 16:11:54 org.jivesoftware.openfire.nio.ConnectionHandler - Closing connection due to error while processing message: AAA=

Thank you in advance!

Anyone?

Here are some more details about openfire setup and the apps connecting through it.

Our Openfire 3.8.1 is now running on a single (not yet in cluster) dedicated large instance in Amazon on Ubuntu Server 12.04 LTS with following details:

Java Version:
1.7.0_17 Oracle Corporation – Java HotSpot™ 64-Bit Server VM
Appserver:
jetty/7.x.y-SNAPSHOT
OS / Hardware:
Linux / amd64

Our mobile apps for Android & iOS are connecting to the server on port 5222 using the standard SASL mechanism.

Our Android app was using the asmack-jse-buddycloud-2010.12.11.jar lib which has been working fine. Currently our live Android app is using the compiled jar lib generated with the aSmack build system: https://github.com/Flowdalic/asmack

Our current Android development build is using the asmack-jse-buddycloud-2010.12.11.jar lib again as previously.

Our iOS build uses the XMPP Framework https://github.com/robbiehanson/XMPPFramework

Our Web API uses the XMPPHP lib https://code.google.com/p/xmpphp/

Now all these apps have worked ok but for the last month or so we have had lots of issue with Openfire not working or responding at all causing our app not to work properly during login and authentication and chat sessions. Sometimes it works but in most cases it doesn’t.

We have some 40.000 users registered in Openfire, probably 75% of those each have some 200+ rosters. On a daily basis we see some 100-300 sessions from the three different resources (apps).

We have tried everything we could possibly think of to optimize and finetune the set up but we are running out of options. Our MySQL Galera Cluster replication behind is running on more resources now and doesn’t seem to be the issue.

Our memory caches have been finetuned as well, see below system properties:

cache.listsCache.size

10485760

cache.offlinemessage.size

20971520

cache.userCache.size

20971520

cache.username2roster.size

1073741824

cache.vcardCache.size

62914560

Our Openfire is now loaded with following memory settings (on Amazon Large instance 7.5 MB RAM):

-Xms1024m -Xmx6144m

We have tried running Openfire on both openjdk6 and openjdk7 as we experienced some other SSL handshake Exceptions besides the exception shown above. It turns out that there was a bug in openjdk https://bugs.launchpad.net/ubuntu/+source/openjdk-6/+bug/1006776

Currently our Openfire is running on Oracle JDK 7 as stated in the beginning which seems to be the most stable of the three jdk’s. But we are still facing the main issue - the exception thrown constantly in openfire error log as shown above.

We are desperate for a solution now and any help or guidance would be really much appreciated!

Thank you!

El mensaje fue editado por: Mickey

How about to remove

security.provider.10=sun.security.pkcs11.SunPKCS11 ${java.home}/lib/security/nss.cfg

?

so as in a openfire installation cfg s