Quantcast
Channel: Ignite Realtime : Discussion List - All Communities
Viewing all articles
Browse latest Browse all 10742

ConnectionListener can't reconnect to OpenFire

$
0
0

Hi All,

 

System overview configuration:

  • OpenFire Server ver 3.7.1
  • Smack-3.2.1.jar & Smackx-3.2.1.jar
  • Smack Client establish 17 (#0-16) connections to OpenFire that are working properly.
  • each connection is set with: setReconnectionAllowed(true);

 

The Issue:

1. Restarting OpenFire server (via "./openfire stop" then "./openfire start")

 

2. ConnectionListener is trying to reconnect to the server every 1 second for each 0-16# connections (via ConnectionListener.reconnectingIn() ):

 

          @Override

          public void reconnectingIn(int arg0) {

               logger.warn("[{0}] trying to reconnect",xmppConnectionParams.getSource(connectionSeqNum));

          }

 

23/10/2012 10:47:47,170 [Smack Reconnection Manager] WARN [1038#0] trying to reconnect

23/10/2012 10:47:47,439 [Smack Reconnection Manager] WARN [1038#9] trying to reconnect

23/10/2012 10:47:47,617 [Smack Reconnection Manager] WARN [1038#10] trying to reconnect

23/10/2012 10:47:47,914 [Smack Reconnection Manager] WARN [1038#4] trying to reconnect

23/10/2012 10:47:47,914 [Smack Reconnection Manager] WARN [1038#15] trying to reconnect

23/10/2012 10:47:47,921 [Smack Reconnection Manager] WARN [1038#11] trying to reconnect

23/10/2012 10:47:47,922 [Smack Reconnection Manager] WARN [1038#3] trying to reconnect

23/10/2012 10:47:47,922 [Smack Reconnection Manager] WARN [1038#14] trying to reconnect

23/10/2012 10:47:47,942 [Smack Reconnection Manager] WARN [1038#1] trying to reconnect

23/10/2012 10:47:47,943 [Smack Reconnection Manager] WARN [1038#8] trying to reconnect

23/10/2012 10:47:47,945 [Smack Reconnection Manager] WARN [1038#16] trying to reconnect

3. Only 0-2 of the 17 connections will managed to reconnect within 2 hours, the rest not.

 

4. For every 10 reconnects tries, ConnectionListener.reconnectionFailed() will be called.

     - i've tried to add to this listener function, the conenction function (that are working properly on a running environment) 

          =>   smack.Connection.disconnect() / smack.Connection.connect() - but it didn't helped at all.

 

5. Network traffic between the Smack and OpenFire server shows that OpenFire rejects all the reconnects tries and closes them:

 

 

SourceDestinationInfo
XXX.XX.XX.114

XXX.XX.XX.118

42810 > 15222 [SYN] Seq=0 Win=14600 Len=0 MSS=1460 SACK_PERM=1  TSV=1973270934 TSER=0 WS=7

XXX.XX.XX.118

XXX.XX.XX.11415222 > 42810 [SYN, ACK] Seq=0 Ack=1 Win=14480 Len=0 MSS=1460  SACK_PERM=1 TSV=600337313 TSER=1973270934 WS=9
XXX.XX.XX.114

XXX.XX.XX.118

42810 > 15222 [ACK] Seq=1 Ack=1 Win=14720 Len=0 TSV=1973270934  TSER=600337313
XXX.XX.XX.114

XXX.XX.XX.118

42810 > 15222 [PSH, ACK] Seq=1 Ack=1 Win=14720 Len=102 TSV=1973270936  TSER=600337313

XXX.XX.XX.118

XXX.XX.XX.11415222 > 42810 [ACK] Seq=1 Ack=103 Win=14848 Len=0 TSV=600337315  TSER=1973270936

XXX.XX.XX.118

XXX.XX.XX.11415222 > 42810 [FIN, ACK] Seq=1 Ack=103 Win=14848 Len=0 TSV=600337316  TSER=1973270936
XXX.XX.XX.114

XXX.XX.XX.118

42810 > 15222 [ACK] Seq=103 Ack=2 Win=14720 Len=0 TSV=1973270937  TSER=600337316
XXX.XX.XX.114

XXX.XX.XX.118

42810 > 15222 [PSH, ACK] Seq=103 Ack=2 Win=14720 Len=56 TSV=1973270937  TSER=600337316
XXX.XX.XX.114

XXX.XX.XX.118

42810 > 15222 [FIN, PSH, ACK] Seq=159 Ack=2 Win=14720 Len=17  TSV=1973270937 TSER=600337316

XXX.XX.XX.118

XXX.XX.XX.11415222 > 42810 [RST] Seq=2 Win=0 Len=0

XXX.XX.XX.118

XXX.XX.XX.11415222 > 42810 [RST] Seq=2 Win=0 Len=0

 

 

Questions:

We noticed that this issue is getting resolved only when we are restating our client and then it managed to connect to OpenFire Server.

 

  • Can any one spread some light on this issue that we are having, and what are the required actions so that      ConnectionListener.reconnectIn() will work.

 

 

Thanks Doron.


Viewing all articles
Browse latest Browse all 10742

Trending Articles