powered by Jive Software

MUC/Service Discovery Disconnect

I’m experiencing disconnects when I open the jabber.org MUC channel listing in my Service Discovery in Psi 0.11-RC2. Also when first joining a MUC chat with many users I’m being disconnected instantly. So there is a chance that it’s a problem of Psi itself, but one of the developers told me it could also be possible that my Openfire 3.3.2 server a protection against stanza flooding and disconnects me because it requests a lot of data and receives it in short time. Is there such a feature in Openfire? If yes, wouldn’t it be better to simply slow down the data transfer (is it possible)?

Hey Dimedo,

So there is a chance that it’s a problem of Psi itself, but one of the developers told me it could also be possible that my Openfire 3.3.2 server a protection against stanza flooding and disconnects me because it requests a lot of data and receives it in short time. Is there such a feature in Openfire? If yes, wouldn’t it be better to simply slow down the data transfer (is it possible)?

Openfire does not have such feature. You may want to check in the log files to see if the server is closing your client connection and possible reasons for that.

– Gato

To describe the problem in more detail: After my client has been disconnected it will reconnect automatically (because it is configured to do so). Most of the times it will be disconnected again 2 times before it succeeds to fetch the whole list of conference.jabber.org channels.

My server’s error log has a lot of the following in the time around the disconnects:

2007.08.18 15:50:23 --org.jivesoftware.openfire.nio.ConnectionHandler.exceptionCaught(ConnectionHandler.java:109)--
java.lang.ArrayIndexOutOfBoundsException
at java.lang.System.arraycopy(Native Method)
at com.jcraft.jzlib.ZStream.read_buf(ZStream.java:199)
at com.jcraft.jzlib.Deflate.fill_window(Deflate.java:983)
at com.jcraft.jzlib.Deflate.deflate_slow(Deflate.java:1120)
at com.jcraft.jzlib.Deflate.deflate(Deflate.java:1567)
at com.jcraft.jzlib.ZStream.deflate(ZStream.java:133)
at org.apache.mina.filter.support.Zlib.deflate(Zlib.java:176)
at org.apache.mina.filter.CompressionFilter.filterWrite(CompressionFilter.java:198)
at org.apache.mina.common.support.AbstractIoFilterChain.callPreviousFilterWrite(AbstractIoFilterChain.java:445)
at org.apache.mina.common.support.AbstractIoFilterChain.access$1400(AbstractIoFilterChain.java:54)
at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.filterWrite(AbstractIoFilterChain.java:824)
at org.apache.mina.filter.executor.ExecutorFilter.filterWrite(ExecutorFilter.java:292)
at org.apache.mina.common.support.AbstractIoFilterChain.callPreviousFilterWrite(AbstractIoFilterChain.java:445)
at org.apache.mina.common.support.AbstractIoFilterChain.access$1400(AbstractIoFilterChain.java:54)
at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.filterWrite(AbstractIoFilterChain.java:824)
at org.apache.mina.filter.codec.ProtocolCodecFilter.filterWrite(ProtocolCodecFilter.java:227)
at org.apache.mina.common.support.AbstractIoFilterChain.callPreviousFilterWrite(AbstractIoFilterChain.java:445)
at org.apache.mina.common.support.AbstractIoFilterChain.access$1400(AbstractIoFilterChain.java:54)
at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.filterWrite(AbstractIoFilterChain.java:824)
at org.apache.mina.common.support.AbstractIoFilterChain$TailFilter.filterWrite(AbstractIoFilterChain.java:727)
at org.apache.mina.common.support.AbstractIoFilterChain.callPreviousFilterWrite(AbstractIoFilterChain.java:445)
at org.apache.mina.common.support.AbstractIoFilterChain.fireFilterWrite(AbstractIoFilterChain.java:436)
at org.apache.mina.transport.socket.nio.SocketSessionImpl.write0(SocketSessionImpl.java:196)
at org.apache.mina.common.support.BaseIoSession.write(BaseIoSession.java:149)
at org.apache.mina.common.support.BaseIoSession.write(BaseIoSession.java:135)
at org.jivesoftware.openfire.nio.NIOConnection.deliver(NIOConnection.java:209)
at org.jivesoftware.openfire.session.ClientSession.deliver(ClientSession.java:728)
at org.jivesoftware.openfire.session.Session.process(Session.java:281)
at org.jivesoftware.openfire.IQRouter.handle(IQRouter.java:315)
at org.jivesoftware.openfire.IQRouter.route(IQRouter.java:104)
at org.jivesoftware.openfire.spi.PacketRouterImpl.route(PacketRouterImpl.java:67)
at org.jivesoftware.openfire.net.SocketReader.processIQ(SocketReader.java:243)
at org.jivesoftware.openfire.net.ServerSocketReader.access$001(ServerSocketReader.java:46)
at org.jivesoftware.openfire.net.ServerSocketReader$1.run(ServerSocketReader.java:79)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
at java.lang.Thread.run(Thread.java:595)

also there were loose appearances of:

2007.08.18 15:50:35 --org.jivesoftware.openfire.nio.ConnectionHandler.exceptionCaught(ConnectionHandler.java:109)--
java.lang.ArrayIndexOutOfBoundsException
2007.08.18 15:51:27 --org.jivesoftware.openfire.nio.ConnectionHandler.messageReceived(ConnectionHandler.java:134)-- Closing connection due to error while processing message: <iq xmlns="jabber:client" type="get" to="womtug@conference.jabber.org" id="abb2a" >
<quer?????????????????????????????????????????????????????????????????y xmlns="http://jabber.org/protocol/disco#info"></quer?????????????????????????????????????????????????????????????????y>
</iq>
org.xmlpull.v1.XmlPullParserException: start tag unexpected character \u0 (position: TEXT seen ..." type="get" to="womtug@conference.jabber.org" id="abb2a" >\n<quer\u0... @2:7)
at org.xmlpull.mxp1.MXParser.parseStartTag(MXParser.java:1803)
at org.jivesoftware.openfire.net.MXParser.nextImpl(MXParser.java:190)
at org.xmlpull.mxp1.MXParser.nextToken(MXParser.java:1100)
at org.dom4j.io.XMPPPacketReader.parseDocument(XMPPPacketReader.java:317)
at org.dom4j.io.XMPPPacketReader.read(XMPPPacketReader.java:154)
at org.jivesoftware.openfire.net.StanzaHandler.process(StanzaHandler.java:123)
at org.jivesoftware.openfire.nio.ConnectionHandler.messageReceived(ConnectionHandler.java:132)
at org.apache.mina.common.support.AbstractIoFilterChain$TailFilter.messageReceived(AbstractIoFilterChain.java:703)
at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(AbstractIoFilterChain.java:362)
at org.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFilterChain.java:54)
at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceived(AbstractIoFilterChain.java:800)
at org.apache.mina.filter.codec.support.SimpleProtocolDecoderOutput.flush(SimpleProtocolDecoderOutput.java:62)
at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:200)
at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(AbstractIoFilterChain.java:362)
at org.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFilterChain.java:54)
at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceived(AbstractIoFilterChain.java:800)
at org.apache.mina.filter.executor.ExecutorFilter.processEvent(ExecutorFilter.java:266)
at org.apache.mina.filter.executor.ExecutorFilter$ProcessEventsRunnable.run(ExecutorFilter.java:326)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
at java.lang.Thread.run(Thread.java:595)
2007.08.18 15:51:31 --org.jivesoftware.openfire.nio.ConnectionHandler.messageReceived(ConnectionHandler.java:134)-- Closing connection due to error while processing message: <iq xmlns="jabber:client" ty???????pe="get" to="373@conference.jabber.org" id="ad6fa" >
<query xmlns="http://jabber.org/protocol/disco#info"></query>
</iq>
org.xmlpull.v1.XmlPullParserException: expected = after attribute name (position: START_DOCUMENT seen <iq xmlns="jabber:client" ty\u0... @1:29)
at org.xmlpull.mxp1.MXParser.parseAttribute(MXParser.java:2004)
at org.xmlpull.mxp1.MXParser.parseStartTag(MXParser.java:1799)
at org.xmlpull.mxp1.MXParser.parseProlog(MXParser.java:1479)
at org.jivesoftware.openfire.net.MXParser.nextImpl(MXParser.java:331)
at org.xmlpull.mxp1.MXParser.nextToken(MXParser.java:1100)
at org.dom4j.io.XMPPPacketReader.parseDocument(XMPPPacketReader.java:317)
at org.dom4j.io.XMPPPacketReader.read(XMPPPacketReader.java:154)
at org.jivesoftware.openfire.net.StanzaHandler.process(StanzaHandler.java:123)
at org.jivesoftware.openfire.nio.ConnectionHandler.messageReceived(ConnectionHandler.java:132)
at org.apache.mina.common.support.AbstractIoFilterChain$TailFilter.messageReceived(AbstractIoFilterChain.java:703)
at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(AbstractIoFilterChain.java:362)
at org.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFilterChain.java:54)
at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceived(AbstractIoFilterChain.java:800)
at org.apache.mina.filter.codec.support.SimpleProtocolDecoderOutput.flush(SimpleProtocolDecoderOutput.java:62)
at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:200)
at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(AbstractIoFilterChain.java:362)
at org.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFilterChain.java:54)
at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceived(AbstractIoFilterChain.java:800)
at org.apache.mina.filter.executor.ExecutorFilter.processEvent(ExecutorFilter.java:266)
at org.apache.mina.filter.executor.ExecutorFilter$ProcessEventsRunnable.run(ExecutorFilter.java:326)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
at java.lang.Thread.run(Thread.java:595)

A pal of mine has the same problem with Psi 0.11-dev (Jan 27, 2007).

I have created a similar thread in Psi Forum. You can find it here: http://forum.psi-im.org/post/32055

Update: In the warning log of my server I found this:

2007.08.18 15:49:07 Closing session due to exception: (SOCKET, R: /<ADDRESS REMOVED>, L: /<ADDRESS REMOVED>, S: <HOSTNAME REMOVED>/<ADDRESS REMOVED>)
org.apache.mina.filter.codec.ProtocolDecoderException: java.lang.StringIndexOutOfBoundsException: String index out of range: 0 (Hexdump: empty)
at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:184)
at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(AbstractIoFilterChain.java:362)
at org.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFilterChain.java:54)
at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceived(AbstractIoFilterChain.java:800)
at org.apache.mina.filter.executor.ExecutorFilter.processEvent(ExecutorFilter.java:266)
at org.apache.mina.filter.executor.ExecutorFilter$ProcessEventsRunnable.run(ExecutorFilter.java:326)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: 0
at java.lang.AbstractStringBuilder.charAt(AbstractStringBuilder.java:177)
at org.jivesoftware.openfire.nio.XMLLightweightParser.read(XMLLightweightParser.java:160)
at org.jivesoftware.openfire.nio.XMPPDecoder.doDecode(XMPPDecoder.java:31)
at org.apache.mina.filter.codec.CumulativeProtocolDecoder.decode(CumulativeProtocolDecoder.java:137)
at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:172)
... 8 more

As the first error message told something about compression I tried the whole thing with the “Compress traffic, if possible” deactivated, but the problem is the same.