aspose file tools*
The moose likes BEA/Weblogic and the fly likes How to enable session replication between servers in a cluster Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Products » BEA/Weblogic
Bookmark "How to enable session replication between servers in a cluster" Watch "How to enable session replication between servers in a cluster" New topic
Author

How to enable session replication between servers in a cluster

Ramakanta Sahoo
Ranch Hand

Joined: Aug 23, 2008
Posts: 254

In cluster config tab I'm only able to see session replication between two clusters not between servers.
A'm using WL10 Please suggest how to achieve session replication between servers in a cluster.

-Ricky


Regards, Ricky
Oracle Weblogic 10g Certified Expert TechPaste.Com
Ramakanta Sahoo
Ranch Hand

Joined: Aug 23, 2008
Posts: 254

Any Help!!!

for HTTP/memory to memory Session replication steps.


Waiting!!!
jonnabhatla venkata
Greenhorn

Joined: Feb 10, 2009
Posts: 24
Ramakanta Sahoo wrote:In cluster config tab I'm only able to see session replication between two clusters not between servers.
A'm using WL10 Please suggest how to achieve session replication between servers in a cluster.

-Ricky


Hi Ramakant,

I too looking for that one, I have already put this question in forums somebody has give the following solution

in your weblogic.xml you need to have a section like(take care you use whatever namespace prefix you have specified in weblogic.xml, e.g. wls: in the snippet below)

<wls:session-descriptor>
<wls:persistent-store-type>replicated_if_clustered</wls:persistent-store-type>
</wls:session-descriptor>

you can use the store type as replicated/replicated_if_clustered/sync-replication-across-cluster/async-replication-across-cluster for In memory replication.

But I have included weblogic.xml file as part web application when I deploy this applicaiton in the cluster I got the following exception

weblogic.management.DeploymentException: Deployer:149003Unable to access application source information in 'C:\Weblogic10.3\bea\user_projects\domains\Cluster_domain\servers\MHS_1\stage\HelloWorld\HelloWorld.war' for application 'HelloWorld'. The specific error is: Deployer:149158No application files exist at 'C:\Weblogic10.3\bea\user_projects\domains\Cluster_domain\servers\MHS_1\stage\HelloWorld\HelloWorld.war'..

Any help appreciated......
please go through the following link I already Placed some queries in forums and I got some responces,
go through the following link it may help you..
http://forums.oracle.com/forums/message.jspa?messageID=3340283

Thanks
Krishna

Ramakanta Sahoo
Ranch Hand

Joined: Aug 23, 2008
Posts: 254

Hi ,

I did all the same changes to weblogic.xml in my WAR file and redeployed but could not got session replicated yet.
Do i need to modify any other weblogic.xml in server side please help!!!

Marcos Maia
Ranch Hand

Joined: Jan 06, 2001
Posts: 977
Objects in session have to be Serializable to work properly.

How are you testing this? Are you using a load balancer? A proxy?

[]s
Ramakanta Sahoo
Ranch Hand

Joined: Aug 23, 2008
Posts: 254

Marcos Maia wrote:Objects in session have to be Serializable to work properly.

How are you testing this? Are you using a load balancer? A proxy?

[]s


Thanks for reply.

How to enable Serializable in session??? please send me steps.

Testing:
starts both servers in a cluster. login to my application and checks which server got my application log. then i shutsdown the server that got the client log as that server is accessed that moment. and clicks in my application which is already logged in but it gets logged out and i have to login to continue normal operations.

In Apache I'm using wl_22.so file.
no proxy.


Please help!!!

Marcos Maia
Ranch Hand

Joined: Jan 06, 2001
Posts: 977
All objects placed in session should implement Serializable interface. In collections objects in it should be serializable.

For apache plugind you'll find information at:
http://edocs.bea.com/wls/docs103/plugins/apache.html#wp125153

You'll need to create a weblogic.confi file in apache and also configure it to know about your cluster:


[]s
Marcos Maia
Ranch Hand

Joined: Jan 06, 2001
Posts: 977
The correct file name is weblogic.conf.

[]s
Ramakanta Sahoo
Ranch Hand

Joined: Aug 23, 2008
Posts: 254

Marcos Maia wrote:All objects placed in session should implement Serializable interface. In collections objects in it should be serializable.

For apache plugind you'll find information at:
http://edocs.bea.com/wls/docs103/plugins/apache.html#wp125153

You'll need to create a weblogic.confi file in apache and also configure it to know about your cluster:



I have all these configurations already inside httpd.conf as this is cluster configuration(i dont think i need to put it into a weblogic.conf file and again include.




But I dont know how this will help in Session Replication between servers ???

Marcos Maia
Ranch Hand

Joined: Jan 06, 2001
Posts: 977
It doesn't. It's a proxy, but you need a proxy that have knowledge of your cluster so it can fail over to other server in case of failure.

[]s
Marcos Maia
Ranch Hand

Joined: Jan 06, 2001
Posts: 977
Ramakanta Sahoo wrote:
But I dont know how this will help in Session Replication between servers ???


Did you have configured a cluster already? Are you using multicast or unicast cluster?

[]s
Ramakanta Sahoo
Ranch Hand

Joined: Aug 23, 2008
Posts: 254



Did you have configured a cluster already? Are you using multicast or unicast cluster?

[]s


yes I have configured cluster already. the problem is session replication between servers in the cluster. one server should be capable of handling a request without getting logged out. If session replication is enabl;es then the user wont know which server he is accessesing or any server went down or not as he will never be logged out if the servicing server goes down as the other server will be able continue from the server1's leftout without getting that user logged out.


Marcos Maia
Ranch Hand

Joined: Jan 06, 2001
Posts: 977
You have some wrong configuration in your cluster. I have worked with clusters in weblogic since version 6 (2002) and allways work. That's why I'm asking about your cluster configuration. Are you using multicast or unicast cluster? How did you configure it?

[]s
Ramakanta Sahoo
Ranch Hand

Joined: Aug 23, 2008
Posts: 254

Marcos Maia wrote:You have some wrong configuration in your cluster. I have worked with clusters in weblogic since version 6 (2002) and allways work. That's why I'm asking about your cluster configuration. Are you using multicast or unicast cluster? How did you configure it?

[]s


Multicast only.

i followed below mentioned steps:

ClusterSetUp Steps
Marcos Maia
Ranch Hand

Joined: Jan 06, 2001
Posts: 977
Hi,

When you deployed you application did you target it for Cluster?(Should not target individually for servers in the cluster)

You should also check if multicast is working. Weblogic has a multicast testing tool for this. http://edocs.bea.com/wls/docs103/admin_ref/utils.html#wp1199798

See official docs for clustering troubleshoot at: http://edocs.bea.com/wls/docs103/cluster/trouble.html

Also check considerations on multicast at: http://edocs.bea.com/wls/docs103/cluster/features.html#wp1007040 . If possible Unicast is a more reliable protocol available in weblogic 10 for cluster comunication, give it a try.

Also check in admin console under monitoring tab for your application if the session is being replicated to secondary server correctly(you can see number of sessions per server there).

Than when you have the time take a read at official docs at:

http://edocs.bea.com/wls/docs103/cluster/setup.html#wp742559

[]s
Ramakanta Sahoo
Ranch Hand

Joined: Aug 23, 2008
Posts: 254

Thanks for the reply

I tried but the sam eproblem its getting logged out and each time i need to login back to access the app it mean session is not replicating in between servers.

I added below to weblogic.xml of my app but still same issue.

Marcos Maia
Ranch Hand

Joined: Jan 06, 2001
Posts: 977
Did you do the multicast test? Is multicast working? Did you make sure that objects placed in session are Serializable?

[]s
Ramakanta Sahoo
Ranch Hand

Joined: Aug 23, 2008
Posts: 254

Marcos Maia wrote:Did you do the multicast test? Is multicast working? Did you make sure that objects placed in session are Serializable?

[]s

I try to run it but its giving me a error as class not found do i need to run it from a specific location.


Serilisable means usage of weblogic-apache bridge then i have it in my httpd.conf



Marcos Maia
Ranch Hand

Joined: Jan 06, 2001
Posts: 977
Ramakanta Sahoo wrote:
I try to run it but its giving me a error as class not found do i need to run it from a specific location.


You'll have to set weblogic.jar in your classpath. You can do this while using the java command like:




Ramakanta Sahoo wrote:
Serilisable means usage of weblogic-apache bridge then i have it in my httpd.conf


Serializable means implementing a java.io.Serializable interface or using objects in collections already serializable(implement the interface).

[]s
Marcos Maia
Ranch Hand

Joined: Jan 06, 2001
Posts: 977
When possible, take some time to read about requirements for clustered apps at:

http://edocs.bea.com/wls/docs103/cluster/failover.html#wp1019188


[]s
Ramakanta Sahoo
Ranch Hand

Joined: Aug 23, 2008
Posts: 254

Thanks for helping.

Multicast is working fine.

Yes it serialisable.

Marcos Maia
Ranch Hand

Joined: Jan 06, 2001
Posts: 977
But,

is it working?

[]s
Ramakanta Sahoo
Ranch Hand

Joined: Aug 23, 2008
Posts: 254

Thanks for helping.

Multicast is working fine.

Yes it serialisable.

Marcos Maia
Ranch Hand

Joined: Jan 06, 2001
Posts: 977
Is your cluster working? Is it doing session replication correctly?

[]s
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to enable session replication between servers in a cluster