Not-authorized after network reconnection (java.lang.IllegalArgumentException)

Hi all,

I’m using a Pandion client connected with Openfire ver. 3.7.1. with TLS required.

Everything works fine, except for a strange situation that happens randomly:

  1. I disconnect internet for some reason (e.g. moving around the office)
  2. As the network is up again, in 90% of cases Pandion reconnects itself successfully and andautomatically. But if the reconnection attempt is performed just after the cable is plugged, I get an auth error (see attached logs).

I couldn’t find similar discussions and can’t guess if it’s a client or server issue… any suggestions?

Thanks a lot… :slight_smile:

Pandion-side log:

EVNT: Connecting to** [my server IP]**

SENT: <?xml version="1.0"?>

SENT: <stream:stream to=[myserver name] xml:lang=“it” xmlns="jabber:client"xmlns:stream="http://etherx.jabber.org/streams"version=“1.0”>

RECV: <?xml version='1.0' encoding='UTF-8'?><stream:streamxmlns:stream="http://etherx.jabber.org/streams"xmlns=“jabber:client” from="chatserver"id=“2c0ab6e9” xml:lang=“it” version=“1.0”>

RECV: <stream:features xmlns="jabber:client"xmlns:stream=“http://etherx.jabber.org/streams”><starttlsxmlns=“urn:ietf:params:xml:ns:xmpp-tls”>DIGEST-MD5JIVE-SHAREDSECRETPLAINCRA M-MD5</stream:features>

SENT: <starttlsxmlns=“urn:ietf:params:xml:ns:xmpp-tls”/>

RECV: <proceed xmlns:stream="http://etherx.jabber.org/streams"xmlns=“urn:ietf:params:xml:ns:xmpp-tls”/>

SENT: <stream:stream to=“chatserver” xml:lang="it"xmlns="jabber:client"xmlns:stream="http://etherx.jabber.org/streams"version=“1.0”>

RECV: <?xml version='1.0' encoding='UTF-8'?><stream:streamxmlns:stream="http://etherx.jabber.org/streams"xmlns=“jabber:client” from="chatserver"id=“2c0ab6e9” xml:lang=“it” version=“1.0”>

RECV: <stream:features xmlns="jabber:client"xmlns:stream=“http://etherx.jabber.org/streams”><mechanismsxmlns=“urn:ietf:params:xml:ns:xmpp-sasl”>DIGEST-MD5</mec hanism>JIVE-SHAREDSECRETPLAINCRAM-MD5<compressionxmlns=“http://jabber.org/features/compress”>zlib<authxmlns=“http://jabber.org/features/iq-auth”/></stream:features>

SENT: <authxmlns="urn:ietf:params:xml:ns:xmpp-sasl"mechanism=“DIGEST-MD5”/>

RECV: <challengexmlns:stream=“http://etherx.jabber.org/streams” xmlns=“urn:ietf:params:xml:ns:xmpp-sasl”>cmVhbG09ImNoYXRzZXJ2ZXIiLG5vbmNlPSJVZk hUbjMzZ01uUmRUWlhoN3NRUWs3ei9GQlhxZVFGU1FZL1hJYTY5Iixxb3A9ImF1dGgiLGNoYXJzZXQ9dX RmLTgsYWxnb3JpdGhtPW1kNS1zZXNz

SASL: realm=[my server name],nonce=“UfHTn33gMnRdTZXh7sQQk7z/FBXqeQFSQY/XIa69”,qop=“auth”,charset=utf-8,algor ithm=md5-sess

SENT: <responsexmlns=“urn:ietf:params:xml:ns:xmpp-sasl”>dXNlcm5hbWU9ImdhYnJpZWxlIixyZ WFsbT0iY2hhdHNlcnZlciIsbm9uY2U9IlVmSFRuMzNnTW5SZFRaWGg3c1FRazd6L0ZCWHFlUUZTUVkvW ElhNjkiLGNub25jZT0iZGZjMDhkNmMzN2M0MGQwNjFhODRmNDNhNzllMDAwYzE0OTBhZDZkNiIsbmM9M DAwMDAwMDEscW9wPWF1dGgsZGlnZXN0LXVyaT0ieG1wcC9jaGF0c2VydmVyIixjaGFyc2V0PXV0Zi04L HJlc3BvbnNlPTdhZGRkYjBmY2QwYjI5ZjRiZTAxNzNlMDkxMjJlNGEw

SASL: username=[my name],realm=[my server name],nonce=“UfHTn33gMnRdTZXh7sQQk7z/FBXqeQFSQY/XIa69”,cnonce=“dfc08d6c37c40d061a84f4 3a79e000c1490ad6d6”,nc=00000001,qop=auth,digest-uri=“xmpp/chatserver”,charset=ut f-8,response=7adddb0fcd0b29f4be0173e09122e4a0

RECV: <failure xmlns:stream="http://etherx.jabber.org/streams"xmlns=“urn:ietf:params:xml:ns:xmpp-sasl”>

SENT: </stream:stream>

EVNT: Disconnected

Openfire-side log:

2011.12.13 09:42:07 org.jivesoftware.openfire.nio.ConnectionHandler- Closing connection due to error while processing message: <responsexmlns=“urn:ietf:params:xml:ns:xmpp-sasl”>dXNlcm5hbWU9IiIscmVhbG09ImNoY XRzZXJ2ZXIiLG5vbmNlPSI4L2h6bWQ5Q0FBUEpTL1hBQ2dLVEwrNk8xRnI2UjJ3Rm92V3EvUUFqIixjb m9uY2U9IjllNmNmN2RjZmYwYzkzY2RiOWUyYmZkOTdjNDNlNzYyMGUwNmI1ODkiLG5jPTAwMDAwMDAxL HFvcD1hdXRoLGRpZ2VzdC11cmk9InhtcHAvY2hhdHNlcnZlciIsY2hhcnNldD11dGYtOCxyZXNwb25zZ T0yNWRlZTY3NDRmMmMxYzM2NDkxY2U2MGI0ZTgyMzE3Mg==
java.lang.IllegalArgumentException
at javax.security.auth.callback.NameCallback.(Unknown Source)
at com.sun.security.sasl.digest.DigestMD5Server.validateClientResponse(UnknownSour ce)
at com.sun.security.sasl.digest.DigestMD5Server.evaluateResponse(UnknownSource)
atorg.jivesoftware.openfire.net.SASLAuthentication.handle(SASLAuthentication.jav a:325)
at org.jivesoftware.openfire.net.StanzaHandler.process(StanzaHandler.java:183)
atorg.jivesoftware.openfire.nio.ConnectionHandler.messageReceived(ConnectionHand ler.java:169)
atorg.apache.mina.common.support.AbstractIoFilterChain$TailFilter.messageReceive d(AbstractIoFilterChain.java:570)
at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(Ab stractIoFilterChain.java:299)
atorg.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFil terChain.java:53)
atorg.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceiv ed(AbstractIoFilterChain.java:648)
atorg.apache.mina.common.IoFilterAdapter.messageReceived(IoFilterAdapter.java:80 )
atorg.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(A bstractIoFilterChain.java:299)
at org.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFilt erChain.java:53)
atorg.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceiv ed(AbstractIoFilterChain.java:648)
at org.apache.mina.filter.codec.support.SimpleProtocolDecoderOutput.flush(SimplePr otocolDecoderOutput.java:58)
atorg.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodec Filter.java:185)
atorg.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(A bstractIoFilterChain.java:299)
atorg.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFil terChain.java:53)
atorg.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceiv ed(AbstractIoFilterChain.java:648)
at org.apache.mina.filter.executor.ExecutorFilter.processEvent(ExecutorFilter.java :239)
atorg.apache.mina.filter.executor.ExecutorFilter$ProcessEventsRunnable.run(Execu torFilter.java:283)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
atorg.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:51 )
at java.lang.Thread.run(Unknown Source)

Anyone? I’m stuck…

I tried to change the “disconnect clients that are idle for…” setting to “10 seconds”, but the problem is still here…

I am having a similar problem. Did you ever find a solution to this?

Hi Jthor,

unfortunately no… I’m still living with this error. This happens mainly on disruption of wireless connection.

Openfire team… HELP!