AnsweredAssumed Answered

Getting a "No response received" after upgrading to Smack 4.1 during roster creation

Question asked by dharani on Apr 22, 2015
Latest reply on Jun 8, 2015 by Laji Tong

hi,

while migrating to Smack 4.1.0, i got the following exception during roster group creation in smack 4.1.0. I am creating a user and creating a roster group. But while roster group creation or adding entry to roster, i got the NoResponseException(see below for full stacktrace). Please find the smack exchange streams and full stack trace below,

 

 

 

04:19:38 PM SENT (0): <stream:stream xmlns='jabber:client' to='muthuram6' xmlns:stream='http://etherx.jabber.org/streams' version='1.0' xml:lang='en'>

04:19:38 PM RECV (0): <?xml version='1.0' encoding='UTF-8'?><stream:stream xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" from="muthuram6" id="97cb8c6b" xml:lang="en" version="1.0">

04:19:38 PM RECV (0): <stream:features><starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls"></starttls><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>DIGEST-MD5</mechanism><mech anism>PLAIN</mechanism><mechanism>CRAM-MD5</mechanism></mechanisms><compression xmlns="http://jabber.org/features/compress"><method>zlib</method></compression><auth xmlns="http://jabber.org/features/iq-auth"/><register xmlns="http://jabber.org/features/iq-register"/></stream:features>

04:19:38 PM SENT (0): <iq to='muthuram6' id='ayvix-3' type='set'><query xmlns='jabber:iq:register'><username>amerchant1</username><email>vinuu-merchantIndia@gmail.com</email><name>amerchant1</name><password>231a0bec140d2a5677b65677dbe8f80a</passw ord></query></iq>

04:19:38 PM RECV (0): <iq type="result" id="ayvix-3" from="muthuram6" to="muthuram6/97cb8c6b"/>

04:19:38 PM SENT (0): <presence id='ayvix-5' type='unavailable'><c xmlns='http://jabber.org/protocol/caps' hash='sha-1' node='http://www.igniterealtime.org/projects/smack' ver='NfJ3flI83zSdUDzCEICtbypursw='/></presence>

04:19:38 PM SENT (0): </stream:stream>

04:19:38 PM SENT (1): <stream:stream xmlns='jabber:client' to='muthuram6' xmlns:stream='http://etherx.jabber.org/streams' version='1.0' xml:lang='en'>

04:19:38 PM RECV (1): <?xml version='1.0' encoding='UTF-8'?><stream:stream xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" from="muthuram6" id="73f383a9" xml:lang="en" version="1.0"><stream:features><starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls"></starttls><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>DIGEST-MD5</mechanism><mech anism>PLAIN</mechanism><mechanism>CRAM-MD5</mechanism></mechanisms><compression xmlns="http://jabber.org/features/compress"><method>zlib</method></compression><auth xmlns="http://jabber.org/features/iq-auth"/><register xmlns="http://jabber.org/features/iq-register"/></stream:features>

04:19:38 PM SENT (1): <auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='DIGEST-MD5'>=</auth>

04:19:38 PM RECV (1): <challenge xmlns="urn:ietf:params:xml:ns:xmpp-sasl">cmVhbG09Im11dGh1cmFtNiIsbm9uY2U9IlhPaS ttMGVxR0c2UTRjMmZuZUt4Vno5eE0xck96aVlaam1SREkrWDciLHFvcD0iYXV0aCIsY2hhcnNldD11dG YtOCxhbGdvcml0aG09bWQ1LXNlc3M=</challenge>

04:19:38 PM SENT (1): <response xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>Y2hhcnNldD11dGYtOCx1c2VybmFtZT0iYW1lcm NoYW50MSIscmVhbG09Im11dGh1cmFtNiIsbm9uY2U9IlhPaSttMGVxR0c2UTRjMmZuZUt4Vno5eE0xck 96aVlaam1SREkrWDciLG5jPTAwMDAwMDAxLGNub25jZT0iRGFWY29UaDhnbU8zdW5neWFOa3hiSWEvUW dTdmE5WDZ6a3JDT2R6RiIsZGlnZXN0LXVyaT0ieG1wcC9tdXRodXJhbTYiLG1heGJ1Zj02NTUzNixyZX Nwb25zZT1mYmI5YTFhNDZmNjhjNjBjYzhiMTAxMjk5OWI1YTE1OSxxb3A9YXV0aA==</response>

04:19:38 PM RECV (1): <success xmlns="urn:ietf:params:xml:ns:xmpp-sasl">cnNwYXV0aD04OTgyN2MyY2YwYTg5MGQyYmQ2Mm E1MTZjZWUxMmE4ZQ==</success>

04:19:38 PM SENT (1): <stream:stream xmlns='jabber:client' to='muthuram6' xmlns:stream='http://etherx.jabber.org/streams' version='1.0' id='73f383a9' xml:lang='en'>

04:19:38 PM RECV (1): <?xml version='1.0' encoding='UTF-8'?><stream:stream xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" from="muthuram6" id="73f383a9" xml:lang="en" version="1.0"><stream:features><compression xmlns="http://jabber.org/features/compress"><method>zlib</method></compression><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"/><session xmlns="urn:ietf:params:xml:ns:xmpp-session"/></stream:features>

04:19:38 PM SENT (1): <iq id='ayvix-9' type='set'><bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'><resource>resource1</resource></bind>< /iq>

04:19:38 PM RECV (1): <iq type="result" id="ayvix-9" to="muthuram6/73f383a9"><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"><jid>amerchant1@muthuram6/resource1</j id></bind></iq>

04:19:38 PM SENT (1): <iq id='ayvix-11' type='set'><session xmlns='urn:ietf:params:xml:ns:xmpp-session'/></iq>

04:19:38 PM RECV (1): <iq type="result" id="ayvix-11" to="amerchant1@muthuram6/resource1"/>

04:19:38 PM User logged (1): amerchant1@muthuram6:5222/resource1

04:19:38 PM XMPPConnection authenticated (1)

04:19:38 PM SENT (1): <iq id='ayvix-13' type='get'><query xmlns='jabber:iq:roster'></query></iq>

04:19:38 PM SENT (1): <presence id='ayvix-14'><c xmlns='http://jabber.org/protocol/caps' hash='sha-1' node='http://www.igniterealtime.org/projects/smack' ver='NfJ3flI83zSdUDzCEICtbypursw='/></presence>

04:19:38 PM RECV (1): <iq type="result" id="ayvix-13" to="amerchant1@muthuram6/resource1"><query xmlns="jabber:iq:roster"/></iq>

04:19:38 PM SENT (1): <presence id='ayvix-15' type='unavailable'><c xmlns='http://jabber.org/protocol/caps' hash='sha-1' node='http://www.igniterealtime.org/projects/smack' ver='NfJ3flI83zSdUDzCEICtbypursw='/></presence>

04:19:38 PM SENT (1): </stream:stream>

04:19:38 PM XMPPConnection closed (1)

Exception reloading roster

  • org.jivesoftware.smack.SmackException$NoResponseException: No response received within reply timeout. Timeout was 300000ms (~300s). Used filter: IQReplyFilter: iqAndIdFilter (AndFilter: (OrFilter: (IQTypeFilter: type=error, IQTypeFilter: type=result), StanzaIdFilter: id=ayvix-13)), : fromFilter (OrFilter: (FromMatchesFilter (full): null, FromMatchesFilter (bare): amerchant1@muthuram6, FromMatchesFilter (full): muthuram6)).

        at org.jivesoftware.smack.SmackException$NoResponseException.newWith(SmackExceptio n.java:106)

        at org.jivesoftware.smack.AbstractXMPPConnection$6.run(AbstractXMPPConnection.java :1438)

        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)

        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)

        at java.util.concurrent.FutureTask.run(FutureTask.java:166)

        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201 (ScheduledThreadPoolExecutor.java:178)

        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Schedu ledThreadPoolExecutor.java:292)

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

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

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

 

 

My Code snippet:

 

Roster roster = Roster.getInstanceFor(xmppconnection);

  xmppconnection.setPacketReplyTimeout(1000 * 60 * 5);

roster.createGroup(groupName);

xmppconnection.disconnect();

 

 

Thanks & Regards,

Dharani

Outcomes