Smack login fails during resource binding

using smack 3.1.0 i get a “no response from server” when waiting on a resource bind result packet from an ejabberd2.1.4_5 server. the smack debugger shows that the result packet is received though bindResourceAndEstablishSession never receives the packet. packet timeout is at 5secs though i have tried raising and lowering that. any help would be greatly appreciated.

sent packet:

Smack

received packet:

<jid>sum8039@pvp.net/Smack</jid>

error:

No response from the server.:

at org.jivesoftware.smack.SASLAuthentication.bindResourceAndEstablishSession(SASLA uthentication.java:430)

at org.jivesoftware.smack.SASLAuthentication.authenticate(SASLAuthentication.java: 331)

at org.jivesoftware.smack.XMPPConnection.login(XMPPConnection.java:395)

i am actually seeing that the packet reader thread does process the inbound message but it is after the main thread that waits in the packetCollector times out and rechecks the queue (which is still empty) before throwing an error. this happens no matter how long i set the packet timeout for. the main thread runs then the packet reader thread runs. is this familiar to anyone?

Hi,

I am able to use login with resource binding in my setup, but I don’t recall ever having a problem related to that. I think at this stage you need to eliminate some variables and try to isolate the problem. Here are a few general debugging suggestions:

1.) Have you tried running against an Openfire server? Sometimes there are small differences between the servers and Smack may be unintentionally relying on something Openfire is doing.

2.) Try using an anonymous login.

3.) Try disabling features that might add complexity to the protocol such as TLS, SASL, compression, etc.

4.) Possibly post a simple code snippet that reproduces the problem.

this turned out to be the same concurrency issue as smack-271. the packetReader thread was blocked waiting on the lock on the XMPPConnection that had been acquired by the main thread. i applied the patch that gunther had submitted that made XMPPConnection.getAccountManager not synchronized so the packetReader thread would not be blocked and it fixed the issue.

I have the same problem, i think.

but nobody aswer.

The 3.2.1 smack version have the same problem?