users@shoal.java.net

Shoal - Unable acquire FailureRecoverySignal

From: Chathurika Sandarenu <sandarenu_at_gmail.com>
Date: Fri, 31 Oct 2008 13:14:24 +0530

Hi Shoal team,

I'm a beginner to Shoal and I have a problem about failure recovery. In my
application there can be 2 instances of it running, one is active and other
one is passive. If the active server fails, other server has to activate
operations.
The problem I'm having is that when a server fails, other server receives
FailureRecoverySignal and when I try to acqure it throws an exception
*Could not raise fence. Fence for member "Server1" and Component "Module1"
already exists"

*In Shoal mailing list I found out that
https://shoal.dev.java.net/servlets/ReadMsg?listName=dev&msgNo=106 this was
done to handle situation where "when failedMember is not alive and
isFenced() is true". In my application there is only 2 modules. So I don't
know why this happens because the Server1-Module1 is dead.

This is the method which I handle Recovery messages

private void processSignal(FailureRecoverySignal faliureNotify) {
        logger.info("In processSignal(FailureRecoverySignal
faliureNotify)");
        try {
            faliureNotify.acquire();
            logger.info(this.isInRecoverProcessing);
            //If already not in recover processing
            if(!this.isInRecoverProcessing)
            {
                lbManager.start();
                this.isInRecoverProcessing = true;
                this.recoverNortificationSignal = faliureNotify;
                //nortify join and ready state
                shoalAgent.reportJoinedAndReadyState(this.groupName);
                logger.info("Received FailureRecoverySignal, started message
processing.");
            } else{
                faliureNotify.release();
            }
        } catch (SignalAcquireException e) {
            logger.error("Error occured while trying to acquire
FailureRecoverySignal.",e);
        } catch (GMSException e) {
            e.printStackTrace(); //To change body of catch statement use
File | Settings | File Templates.
        } catch (SignalReleaseException e) {
            e.printStackTrace(); //To change body of catch statement use
File | Settings | File Templates.
        }
    }

Can you please help me on this.

Thanks in advance.

Regards,
Chathurika Sandarenu.