We have two applications that are talking over an XMPP server on localhost. Everything works great message wise, but every once in a while the connection is lost. When we try to run large batches we almost always get this random drop sometime during the run.
I am looking for any ideas on what would be causing this. The error shows a XML parse exception on a large file [39341,25831] but we don't ever pass anything that large. Anyone have an idea as to what could cause this?
Error:
2022-12-22T21:06:49.406-0500 WARN Connection XMPPTCPConnection[user1@localhost/Avert] (0) closed with error
org.jivesoftware.smack.xml.XmlPullParserException: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[39341,25831]
Message: Connection reset
at org.jivesoftware.smack.xml.stax.StaxXmlPullParser.next(StaxXmlPullParser.java:193) ~[smack-xmlparser-stax-4.4.3.jar!/:4.4.3]
at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader.parsePackets(XMPPTCPConnection.java:1140) ~[smack-tcp-4.4.3.jar!/:4.4.3]
at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader.access$700(XMPPTCPConnection.java:913) ~[smack-tcp-4.4.3.jar!/:4.4.3]
at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader$1.run(XMPPTCPConnection.java:936) ~[smack-tcp-4.4.3.jar!/:4.4.3]
at java.lang.Thread.run(Unknown Source) [?:?]
Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[39341,25831]
Message: Connection reset
at com.sun.org.apache.xerces.internal.impl.XMLStreamReaderImpl.next(Unknown Source) ~[?:?]
at org.jivesoftware.smack.xml.stax.StaxXmlPullParser.next(StaxXmlPullParser.java:191) ~[smack-xmlparser-stax-4.4.3.jar!/:4.4.3]
... 4 more
21:06:49 XMPPConnection closed due to an exception (XMPPTCPConnection[user1@localhost/Avert] (0))
org.jivesoftware.smack.xml.XmlPullParserException: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[39341,25831]
Message: Connection reset
at org.jivesoftware.smack.xml.stax.StaxXmlPullParser.next(StaxXmlPullParser.java:193)
at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader.parsePackets(XMPPTCPConnection.java:1140)
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.base/java.lang.Thread.run(Unknown Source)
Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[39341,25831]
Message: Connection reset
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLStreamReaderImpl.next(Unknown Source)
at org.jivesoftware.smack.xml.stax.StaxXmlPullParser.next(StaxXmlPullParser.java:191)
... 4 more
21:06:49 XMPPConnection closed due to an exception (XMPPTCPConnection[user1@localhost/Avert] (0))
org.jivesoftware.smack.xml.XmlPullParserException: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[39341,25831]
Message: Connection reset
at org.jivesoftware.smack.xml.stax.StaxXmlPullParser.next(StaxXmlPullParser.java:193)
...
at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader$1.run(XMPPTCPConnection.java:936)
at java.base/java.lang.Thread.run(Unknown Source)
Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[39341,25831]
Message: Connection reset
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLStreamReaderImpl.next(Unknown Source)
at org.jivesoftware.smack.xml.stax.StaxXmlPullParser.next(StaxXmlPullParser.java:191)
... 4 more
The transport connection underlying the XMPP connection got reset (disconnected). This transport connection is typically a TCP connection. There is a vast amount of reasons this could happen. Even if you where able to remedy a few causes, you will never be able to completely rule out that this happens. The only reasonable approach is implement logic to listen for such events and attempt to re-establish the connection once this happens.