powered by Jive Software

Smack 4.4.2 - XMPP Connection closed abruptly

We are getting “java.lang.IllegalStateException: Illegal Stream Management State” exception when trying to send chat message from single user to 150 clients and the clients are response back with a message to same user simultaneously. When this exception occurs, the particular user’s connection is closed with error.

Smack Version : 4.4.2
Openfire Version : 4.0.4
Environment : Windows


closed with error
 java.lang.IllegalStateException: Illegal Stream Management State: Last known handled count (450) is greater than reported handled count (448)
        at org.jivesoftware.smack.sm.SMUtils.calculateDelta(SMUtils.java:51)
        at org.jivesoftware.smack.tcp.XMPPTCPConnection.processHandledCount(XMPPTCPConnection.java:1809)
        at org.jivesoftware.smack.tcp.XMPPTCPConnection.access$3100(XMPPTCPConnection.java:130)
        at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader.parsePackets(XMPPTCPConnection.java:1079)
        at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader.access$700(XMPPTCPConnection.java:913)
        at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader$1.run(XMPPTCPConnection.java:936)
        at java.lang.Thread.run(Unknown Source)

Openfire info.log when the problem occurs:
Openfire_Log.txt (213.6 KB)

Please suggest some solution to resolve this scenario and our client connection should not close automatically when concurrent messages received from more number of clients.

Various bugs around the Stream Management feature have been fixed in later releases of Openfire. I strongly advise you to update to a new version of Openfire.

1 Like

@guus Thanks for the quick reply. We will check with latest Openfire and update the results here.

This topic was automatically closed 62 days after the last reply. New replies are no longer allowed.