aspose file tools*
The moose likes BEA/Weblogic and the fly likes WebLogic 9.2 clustering problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Products » BEA/Weblogic
Bookmark "WebLogic 9.2 clustering problem" Watch "WebLogic 9.2 clustering problem" New topic
Author

WebLogic 9.2 clustering problem

Bassam Shamekh
Greenhorn

Joined: Feb 14, 2009
Posts: 11
Hello all,

I have deployed a web application on weblogic 9.2mp3 in a clustering environment, my application supports clustering, in a mean that everything I set in the session is serializable and I use session.setAttribute() to set objects in the session, I have three servers and a proxy, when I access the application from the proxy everything is fine, suppose that I'm connecting now to Server1, if Server1 crashes, then it's supposed that the next request will be passed to another server from the proxy, this is what is happening, but the problem is that when Server1 crashes, the session becomes invalid and a new session is created and the request is redirected to the login page, can any one help me please? does server shut down causes session to be destroyed some how?if yes, then this is wrong and should not behave in this way, does anyone know how to prevent the session from being destroyed when one of the servers crashes???


Thanks
sudipto shekhar
Ranch Hand

Joined: Apr 02, 2008
Posts: 813

Hi Bassam,

As per my understanding, you have your managed servers in a cluster. You want the failover to happen with the sessions replicated.

How many servers do you have in the cluster?

For session replications to happen, you need session replication. This can be achieved through in-memory session replication, file persistence store or jdbc persistence store.

These techniques will save a copy of the sessions in the memory(JVM) or a file or JDBC can be used to achieve this.

Hope this helps.

Please revert in case of any queries!


Regards, Sud.
SCJP 5 ScjpFAQ JLS
Bassam Shamekh
Greenhorn

Joined: Feb 14, 2009
Posts: 11
Hi sudipto shekhar,

Thank you for your reply, I use in-memory replication, session replication is happening fine, I know that because I can keep track to which server the user is connected in a given time, when the current server is overloaded, my proxy redirects the user to another server successfully without the need to log in again, but this does not happen if the current server crash(which should for sure).

I have three servers and a proxy, the configuration I did for weblogic is correct, but don't know what is missing that is causing this problem.
sudipto shekhar
Ranch Hand

Joined: Apr 02, 2008
Posts: 813

Bassam Shamekh wrote: but this does not happen if the current server crash(which should for sure).


Could you please elaborate a little more on this?

I mean when is session replication not happening.... I did not get the exact cause! M sorry for that
Bassam Shamekh
Greenhorn

Joined: Feb 14, 2009
Posts: 11
suppose that the user is currently connected to server1, some data concerning the user is set on the session(and the data is sreilizable), the session should be replicated to other servers meanwhile, suppose that the current session id is XXX, server1 crashes, so the next request will be passed by the proxy to server2 or server3, suppose the request was passed to server2, in server2 the session id must be exactly the same as the one that was in server1 and all the data that I set on the old session should be available for server2 when asking for those data, but what is happening is that the session id on server2 is different, the server for some reason created another session, the original session was not replicated to server2.
sudipto shekhar
Ranch Hand

Joined: Apr 02, 2008
Posts: 813

Hi Bassam,

So when the request is being served by server1, and at that point of time if the same server i.e server1 goes down, your session replication does not happen.

Could you please show the weblogic.xml file?

To be specific, please let us know what is the value for the persistent-store-type under, as following:

<session-descriptor>
<persistent-store-type>?</persistent-store-type>
</session-descriptor>

Thanks
Bassam Shamekh
Greenhorn

Joined: Feb 14, 2009
Posts: 11
This is what I have in my weblogic.xml

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

Thank you for having time to reply, I really appreciate it, I'm beginning to lose hope on this
sudipto shekhar
Ranch Hand

Joined: Apr 02, 2008
Posts: 813

try replicated....

<persistent-store-type>replicated</persistent-store-type>


And you are always welcome!
Bassam Shamekh
Greenhorn

Joined: Feb 14, 2009
Posts: 11
didn't work my friend, I still have the same problem
sudipto shekhar
Ranch Hand

Joined: Apr 02, 2008
Posts: 813

Hi,

Just to isolate the issue, have you tried session replication by file persistent store?

Please let us know!
Bassam Shamekh
Greenhorn

Joined: Feb 14, 2009
Posts: 11
Hi,

No I didn't
sudipto shekhar
Ranch Hand

Joined: Apr 02, 2008
Posts: 813

Here is the tag to do so.

<session-descriptor>
<persistent-store-type>file</persistent-store-type>
<persistent-store-dir>D:\sudipto\BEA_sud\BEA10.3.2\session_rep.rep</persistent-store-dir>
</session-descriptor>


Try it out to see if the replication works with this..

The file session_rep.rep should be in a shared location so that all the servers can have an access to it.

Please try this and let me know....
Bassam Shamekh
Greenhorn

Joined: Feb 14, 2009
Posts: 11
Did not work
sudipto shekhar
Ranch Hand

Joined: Apr 02, 2008
Posts: 813

Can you please paste the weblogic.xml file for me?
Bassam Shamekh
Greenhorn

Joined: Feb 14, 2009
Posts: 11
This is what I have in my weblogic.xml file, which I have in my WEB-INF folder of my application:


sudipto shekhar
Ranch Hand

Joined: Apr 02, 2008
Posts: 813

Sorry for the late reply......

Are you sure this did not work? Or has it worked now??

sudipto shekhar wrote:Here is the tag to do so.

<session-descriptor>
<persistent-store-type>file</persistent-store-type>
<persistent-store-dir>D:\sudipto\BEA_sud\BEA10.3.2\session_rep.rep</persistent-store-dir>
</session-descriptor>


Try it out to see if the replication works with this..

The file session_rep.rep should be in a shared location so that all the servers can have an access to it.

Please try this and let me know....


Bassam Shamekh
Greenhorn

Joined: Feb 14, 2009
Posts: 11
I have tried this before and it did not work.

and really thank you a lot for having time to reply
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: WebLogic 9.2 clustering problem
 
Similar Threads
EJB - JNDI lookups across 2 app server on the same machine?
Session Replication
server crashes
HttpServletRequest , HttpServletSession are they serializable
Web application clustering