We are getting “No response received within reply timeout. Timeout was 5000ms (~5s). While waiting for successful SASL authentication” exception in all of our smack clients when we try to connect 300 clients at same time.
Server Machine Environment:
Operating System: Microsoft Windows 7 Professional
System Type: 64-bit Operating System
Processor: Intel(R) Core™2 Duo CPU E7500 @ 2.93GHz, 2 core(s)
Java memory: We customized the minimum and maximum memory size to 600MB.
Smack version: 4.4.2
We are using a Java based Windows desktop client built with smack version 4.4.2 to communicate with an Openfire server. We are running Openfire as a Windows Service.
We don’t face any issues when we try to connect the clients 50 by 50 up to 300. After connecting all 300 clients and establishing communication, we attempted a Openfire server restart.
The clients will be pinging the server continuously until it is up.
After the server is up, all of our clients will try to connect with the server. At the time all the clients are throwing the exception “No response received within reply timeout.”. No matter how many times it tries to reconnect the same exception is received.
org.jivesoftware.smack.SmackException$NoResponseException: No response received within reply timeout. Timeout was 5000ms (~5s). While waiting for successful SASL authentication [XMPPTCPConnection[not-authenticated] (0)] at org.jivesoftware.smack.SmackException$NoResponseException.newWith(SmackException.java:99) at org.jivesoftware.smack.sasl.SASLMechanism.throwExceptionIfRequired(SASLMechanism.java:339) at org.jivesoftware.smack.SASLAuthentication.authenticate(SASLAuthentication.java:211) at org.jivesoftware.smack.AbstractXMPPConnection.authenticate(AbstractXMPPConnection.java:904) at org.jivesoftware.smack.tcp.XMPPTCPConnection.loginInternal(XMPPTCPConnection.java:381) at org.jivesoftware.smack.AbstractXMPPConnection.login(AbstractXMPPConnection.java:641) at handler.LoginHandler.login(LoginHandler.java:30)
We referred forums and tried increasing the reply timeout to 20 seconds in all clients(300) using the “setReplyTimeout(20000)” method of the XMPPTCPConnection class. But still the issue is not resolved in the Openfire server restart case mentioned above.
After we met with the issue, without stopping the Openfire server we modified a few of the clients reply timeout up to 80 seconds. Still the clients through the same exception.
Also after the Openfire restarted when clients try to connect, the Openfire Java memory is spiking to the maximum.
The only way to resolve the issue is to restart each client.
Please help us to find more on this and resolve the issue.
Thanks in advance!