[jboss-user] [JBossCache] - JGroups: Problem with rebooting peers

mrkmrk do-not-reply at jboss.com
Fri Jun 29 05:16:10 EDT 2007


Hi

I'm really sure if this is the right place to ask. I could not find any specific JGroups forums.

However, let me know if there is a more suitable place.

We're using JGroups 2.4.1 sp3 in a JBoss 4.0.2. We're using JGroups to send messages between the various servers. It works fine. 
We have one problem, though. When one of the destination servers reboots, the first message from the sender server fails. The log on the sender server says: ""2nd attempt to send data failed too". By adding some logging in BasicConnectionTable we've found that a "Socket Closed" occurs. The code in _send(byte[] data, int offset, int length) tries once, catches the IOException and tries again the same closed connection, then giving the "2nd.." message.


  | private void _send(byte[] data, int offset, int length) {
  |            synchronized(send_mutex) {
  |                try {
  |                    doSend(data, offset, length);
  |                    updateLastAccessed();
  |                }
  |                catch(IOException io_ex) {
  |                    if(log.isWarnEnabled())
  |                        log.warn("peer closed connection, trying to re-send msg");
  |                    try {
  |                        doSend(data, offset, length);
  |                        updateLastAccessed();
  |                    }
  |                    catch(IOException io_ex2) {
  |                        if(log.isErrorEnabled()) log.error("2nd attempt to send data failed too");
  |                    }
  |                    catch(Exception ex2) {
  |                        if(log.isErrorEnabled()) log.error("exception is " + ex2);
  |                    }
  |                }
  |                catch(InterruptedException iex) {}
  |                catch(Throwable ex) {
  |                    if(log.isErrorEnabled()) log.error("exception is " + ex);
  |                }
  |            }
  |        }
  | 

We really don't want to loose that message.
Have I missed something? Is there something I can do?

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4059067#4059067

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4059067



More information about the jboss-user mailing list