When making an xmpp connection to a xmpp server, if the server returns a , this is not propagated to the calling application. Instead it is returned as:
{SmackException$NoResponseException@22122} “org.jivesoftware.smack.SmackException$NoResponseException: No response received within reply timeout. Timeout was 5000ms (~5s). While waiting for SASL mechanisms stream feature from server”
For application implementation, it may be important to inform the user if there is an and the connection is only unblocked at xx.xx.xx. Otherwise use may continuously attempt to login without knowing he has been blocked until xx.xx.xx.
============ Smack log showing the <policy violation =========================
01-06 12:07:03.695 8509-9341/org.atalk.android D/SMACK: SENT (0): <stream:stream xmlns=‘jabber:client’ to=‘jabbim.com’ xmlns:stream=‘http://etherx.jabber.org/streams’ version=‘1.0’ xml:lang=‘en’>
01-06 12:07:04.085 8509-9342/org.atalk.android D/SMACK: RECV (0): <?xml version='1.0'?><stream:stream xmlns=‘jabber:client’ xmlns:stream=‘http://etherx.jabber.org/streams’ id=‘6785787028201586334’ from=‘jabbim.com’ version=‘1.0’ xml:lang=‘en’>stream:errorToo many (2) failed authentications from this IP address (1xx.66.xx.xxx). The address will be unblocked at 04:24:00 06.01.2017 UTC</stream:error></stream:stream>
01-06 12:07:08.695 8509-9342/org.atalk.android W/αTalk: [4] org.jivesoftware.smack.AbstractXMPPConnection.callConnectionClosedOnErrorListen er() Connection XMPPTCPConnection[not-authenticated] (0) closed with error
org.jivesoftware.smack.XMPPException$StreamErrorException: policy-violation You can read more about the meaning of this stream error at http://xmpp.org/rfcs/rfc6120.html#streams-error-conditions
stream:errorToo many (2) failed authentications from this IP address (1xx.66.xx.xxx). The address will be unblocked at 04:24:00 06.01.2017 UTC</stream:error>
at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader.parsePackets(XMPPTCPC onnection.java:1028)
at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader.access$300(XMPPTCPCon nection.java:969)
at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader$1.run(XMPPTCPConnecti on.java:984)
at java.lang.Thread.run(Thread.java:818)
01-06 12:07:08.695 8509-9342/org.atalk.android E/αTalk: [4] impl.protocol.jabber.ProtocolProviderServiceJabberImpl.connectionClosedOnError( ).2203 connectionClosedOnError policy-violation You can read more about the meaning of this stream error at http://xmpp.org/rfcs/rfc6120.html#streams-error-conditions
stream:errorToo many (2) failed authentications from this IP address (1xx.66.xx.xxx). The address will be unblocked at 04:24:00 06.01.2017 UTC</stream:error>
org.jivesoftware.smack.XMPPException$StreamErrorException: policy-violation You can read more about the meaning of this stream error at http://xmpp.org/rfcs/rfc6120.html#streams-error-conditions
stream:errorToo many (2) failed authentications from this IP address (1xx.66.xx.xxx). The address will be unblocked at 04:24:00 06.01.2017 UTC</stream:error>
at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader.parsePackets(XMPPTCPC onnection.java:1028)
at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader.access$300(XMPPTCPCon nection.java:969)
at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader$1.run(XMPPTCPConnecti on.java:984)
at java.lang.Thread.run(Thread.java:818)
**================Variables of Exception returns to calling application ========================== **
Exception e = {SmackException$NoResponseException@22122} “org.jivesoftware.smack.SmackException$NoResponseException: No response received within reply timeout. Timeout was 5000ms (~5s). While waiting for SASL mechanisms stream feature from server”
filter = null
cause = {SmackException$NoResponseException@22122} “org.jivesoftware.smack.SmackException$NoResponseException: No response received within reply timeout. Timeout was 5000ms (~5s). While waiting for SASL mechanisms stream feature from server”
detailMessage = “No response received within reply timeout. Timeout was 5000ms (~5s). While waiting for SASL mechanisms stream feature from server”
stackState = {Object[10]@22132}
stackTrace = {StackTraceElement[0]@22133}
suppressedExceptions = {Collections$EmptyList@22134} size = 0
shadow$klass = {Class@20719} “class org.jivesoftware.smack.SmackException$NoResponseException”
shadow$monitor = -1541682932
mConnection = {XMPPTCPConnection@22098} “XMPPTCPConnection[not-authenticated] (0)”