The Source for Java Technology Collaboration
User: Password:
Register | Login help    

Search

Online Books:
java.net on MarkMail:


Bhavani Shankar

Bhavani is a B.E. graduate in Computer Science from KREC (pka NITK) who has worked for Sun Microsystems since July 2001 as a software developer. He has worked on VPN technologies, Integration and Installer Projects, Mobile Access technologies and Application Server development project. His current responsibilities include adding new features to Application Verification Kit which is a toolkit used for portability checking of Java EE applications. He likes making friends, traveling, playing indoor games, listening to music, and watching movies.

 

Bhavani Shankar's blog

SailFin HA FAQ (Tips 'n' Tricks of SailFin High Availability)

Posted by bhavanishankar on October 28, 2009 at 1:48 AM PDT

This blog answers some of the commonly asked questions about SailFin HA

[Note : my-app, my-node-agent, my-cluster, my-instance are the names I used, feel free to choose the names of your choice]


What is the minimum requirement to use high availability in SailFin:

You need to have a SailFin cluster with at least 2 instances.

How to enable high availability for an application?

You just need to deploy your application with the following option:

asadmin deploy --target my-cluster --availabilityenabled=true my-app.[sar|war|ear]

After deploying the application, how to ensure that the high availability is enabled?

Look for the following string in SAILFIN_INSTALL_DIR/nodeagents/my-node-agent/my-instance/logs/server.log :

Application /my-app configured with SIP persistence type: replicated, frequency: sip-transaction, and scope: session

After deploying the application my SAILFIN_INSTALL_DIR/nodeagents/my-node-agent/my-instance/logs/server.log shows the following message, what should I do?

Invalid session management configuration for non-distributable SIP application [my-app]: persistence-type = [replicated] / persistenceFrequency = [sip-transaction] / persistenceScope = [session]: Defaulting to memory

Add <distributable/> element to WEB-INF/sip.xml in my-app.[sar|war] and deploy the application again. Example sip.xml is here :

<?xml version="1.0"?>
<sip-app  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://www.jcp.org/xml/ns/sipservlet http://www.jcp.org/xml/ns/sipservlet/sip-app_1_1.xsd"
          version="1.1">
    <display-name>my-app</display-name>
    <description>my-app</description>
    <distributable/>
    ....
</sip-app>

After deploying the application my SAILFIN_INSTALL_DIR/nodeagents/my-node-agent/my-instance/logs/server.log shows the following message, what should I do?

WEB0129: Invalid Session Management Configuration for non-distributable app [my-app] - defaulting to memory: persistence-type = [replicated] / persistenceFrequency = [web-method] / persistenceScope = [session]

Inconsistent SIP and HTTP persistence configuration for converged application my-app, falling back to memory-only

This happens when my-app.[war|sar] has both WEB-INF/web.xml and WEB-INF/sip.xml and one of them is missing the <distributable/> element. To fix the error, add <distributable/> element to both WEB-INF/web.xml and WEB-INF/sip.xml, and redeploy your application.

Is there a quick way to start using high availability in SailFin without having to write my own application?

Yes, just install SailFin V2 and the bundled Basic3pcc sample will help you to just get started. This sample itself will create and configure the cluster for you. Which means if you just have the base SailFin V2 installed, you can just start exploring high availabilty in SailFin cluster. The instructions for using the sample are at :

http://wiki.glassfish.java.net/Wiki.jsp?page=SipBasic3pccHighAvailability

How to enable debug logging for high availabilty?

Set the following log levels:

asadmin set my-cluster-config.log-service.module-log-levels.property.ShoalLogger=CONFIG
asadmin set my-cluster-config.log-service.module-log-levels.property.ssr=FINEST
asadmin set my-cluster-config.log-service.module-log-levels.property.com\\.sun\\.enterprise\\.ee\\.web\\.sessmgmt\\.availability=FINEST
asadmin set my-cluster-config.log-service.module-log-levels.property.com\\.sun\\.enterprise\\.ee\\.web\\.sessmgmt\\.pipe=FINEST

Where do I find more information about SailFin high availability?

http://sailfin.dev.java.net (check Articles and Resource section)
http://www.sun.com/sip
http://www.java.net/blogs/bhavanishankar
http://blogs.sun.com/shreedhar

Whom should I contact if I have more questions on SailFin high availability?

Post it as a comment in this blog or write to users@sailfin.dev.java.net

Related Topics >> Blogs      
Comments
Comments are listed in date ascending order (oldest first)
Syndicate content