Hello,
I have a back-end server that initiates 10 connections at startup within a couple of seconds. And that used to work great.. until a week ago. Now we get the following exception from smack
org.jivesoftware.smack.SmackException$NoResponseException: No response received within reply timeout. Timeout was 5000ms (~5s). Used filter: No filter used or filter was 'null'.
at org.jivesoftware.smack.SmackException$NoResponseException.newWith(SmackException.java:106) ~[smack-core-4.1.0.jar:4.1.0]
at org.jivesoftware.smack.SmackException$NoResponseException.newWith(SmackException.java:85) ~[smack-core-4.1.0.jar:4.1.0]
at org.jivesoftware.smack.SynchronizationPoint.checkForResponse(SynchronizationPoint.java:192) ~[smack-core-4.1.0.jar:4.1.0]
at org.jivesoftware.smack.SynchronizationPoint.checkIfSuccessOrWait(SynchronizationPoint.java:114) ~[smack-core-4.1.0.jar:4.1.0]
at org.jivesoftware.smack.SynchronizationPoint.checkIfSuccessOrWaitOrThrow(SynchronizationPoint.java:97) ~[smack-core-4.1.0.jar:4.1.0]
at org.jivesoftware.smack.tcp.XMPPTCPConnection.connectInternal(XMPPTCPConnection.java:837) ~[smack-tcp-4.1.0.jar:4.1.0]
at org.jivesoftware.smack.AbstractXMPPConnection.connect(AbstractXMPPConnection.java:360) ~[smack-core-4.1.0.jar:4.1.0]
at com.follower.service.msg.gcm.cache.connection.GcmXMPPTCPConnectionLauncher.connect(GcmXMPPTCPConnectionLauncher.java:67) ~[classes/:na]
May 20, 2015 1:15:20 AM org.jivesoftware.smack.AbstractXMPPConnection callConnectionClosedOnErrorListener
WARNING: Connection closed with error
java.io.EOFException: input contained no data
at org.xmlpull.mxp1.MXParser.fillBuf(MXParser.java:3003)
at org.xmlpull.mxp1.MXParser.more(MXParser.java:3046)
at org.xmlpull.mxp1.MXParser.parseProlog(MXParser.java:1410)
at org.xmlpull.mxp1.MXParser.nextImpl(MXParser.java:1395)
at org.xmlpull.mxp1.MXParser.next(MXParser.java:1093)
at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader.parsePackets(XMPPTCPConnection.java:1151)
at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader.access$200(XMPPTCPConnection.java:937)
at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader$1.run(XMPPTCPConnection.java:952)
at java.lang.Thread.run(Thread.java:745)
right after the first connection is created. This means that I can only create a single connection as GCM does not reply to further new connection requests . I tried raising the timeout from 5 seconds to 30 but I still get the same timeout.
I see that on the first connection request smack is logging a debug message being sent to google:
which is followed by a response that seems to initiate the connection binding process:
01:50:45 AM RECV (0): <stream:features><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>X-OAUTH2</mechanism><mechanism>X-GOOGLE-TOKEN</mechanism><mechanism>PLAIN</mechanism></mechanisms></stream:features>
(..then further messages are exchanged, and the connection is finally created..)
but on the second connection when the same request is sent:
nothing is received back.
Any ideas on why this is happening? Mind you that I made no changes to my back-end server, so this has to be a GCM issue that has just been introduced.