HTTP Session replication problem
Hi all,
After 3 days trying to make the http session replication work in my cluster is time to ask some help.
I´m trying to make a simple application (only a servlet) simulate a http session replication.
I´ve investigated all the possible problems that i encountered in google :
Here is my multicast tests :
SERVER 1
D:\>java -cp d:\bea\weblogic92\server\lib\weblogic.jar utils.MulticastTest -N SE
RVER1 -A 237.0.0.1 -p 12809
***** WARNING ***** WARNING ***** WARNING *****
Do NOT use the same multicast address as a running WLS cluster.
Starting test. Hit any key to abort
Using multicast address 237.0.0.1:12809
Will send messages under the name SERVER1 every 2 seconds
Will print warning every 600 seconds if no messages are received
I (SERVER1) sent message num 1
I (SERVER1) sent message num 2
Received message 2 from SERVER1
I (SERVER1) sent message num 3
Received message 3 from SERVER1
I (SERVER1) sent message num 4
Received message 4 from SERVER1
I (SERVER1) sent message num 5
Received message 5 from SERVER1
I (SERVER1) sent message num 6
Received message 6 from SERVER1
I (SERVER1) sent message num 7
Received message 7 from SERVER1
I (SERVER1) sent message num 8
Received message 8 from SERVER1
I (SERVER1) sent message num 9
Received message 9 from SERVER1
I (SERVER1) sent message num 10
Received message 10 from SERVER1
Received message 11 from SERVER1
I (SERVER1) sent message num 11
I (SERVER1) sent message num 12
Received message 12 from SERVER1
I (SERVER1) sent message num 13
Received message 13 from SERVER1
Received message 14 from SERVER1
I (SERVER1) sent message num 14
I (SERVER1) sent message num 15
Received message 15 from SERVER1
I (SERVER1) sent message num 16
Received message 16 from SERVER1
SERVER 2
D:\>java -cp d:\bea\weblogic92\server\lib\weblogic.jar utils.MulticastTest -N SE
RVER2 -A 237.0.0.1 -p 12809
***** WARNING ***** WARNING ***** WARNING *****
Do NOT use the same multicast address as a running WLS cluster.
Starting test. Hit any key to abort
Using multicast address 237.0.0.1:12809
Will send messages under the name SERVER2 every 2 seconds
Will print warning every 600 seconds if no messages are received
I (SERVER2) sent message num 1
I (SERVER2) sent message num 2
Received message 2 from SERVER2
I (SERVER2) sent message num 3
Received message 3 from SERVER2
I (SERVER2) sent message num 4
Received message 4 from SERVER2
I (SERVER2) sent message num 5
Received message 5 from SERVER2
I (SERVER2) sent message num 6
Received message 6 from SERVER2
I (SERVER2) sent message num 7
Received message 7 from SERVER2
I (SERVER2) sent message num 8
Received message 8 from SERVER2
I (SERVER2) sent message num 9
Received message 9 from SERVER2
I (SERVER2) sent message num 10
Received message 10 from SERVER2
I (SERVER2) sent message num 11
Received message 11 from SERVER2
I (SERVER2) sent message num 12
Received message 12 from SERVER2
Weblogic.XML descriptor
<session-descriptor>
<session-param>
<param-name>PersistentStoreType</param-name>
<param-value>replicated</param-value>
</session-param>
</session-descriptor>
CODE of the Servlet
HttpSession session = request.getSession();
String sessionIdentif = (String)session.getAttribute("SESSIONIDENTIF");
boolean boolNewSession = true;
if(sessionIdentif == null) {
session.setAttribute("SESSIONIDENTIF", "1234567890");
} else
boolNewSession = false;
As you can see the object that i put in session is a String, so Serializable....
All the requirements are validated (i think...) but it still not working ... i get the SESSION ID : WvHQMKzBh9T35BPhGJxyhQtGks5Q3qJmxnJwGn8mn7V24FM92cnh!949557342! NONE !1284141857480
And the NONE said that the session isn´t replicated.
Any idea what´s wrong with my try of getting http session replication working??
cheers,
Hi,
Thanks for your help.
I´ve tried your application with your proxy application but still no work...
I´m getting :
####<13/Set/2010 15H59m BST> <Debug> <Replication> <DST01VS51> <VIACTT2> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<anonymous>> <> <> <1284389948055> <000000> <Creating primary 1678977133045201960>
####<13/Set/2010 15H59m BST> <Debug> <ReplicationDetails> <DST01VS51> <VIACTT2> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<anonymous>> <> <> <1284389948055> <000000> <Unable to create secondary for 1678977133045201960 on null>
####<13/Set/2010 15H59m BST> <Debug> <ReplicationDetails> <DST01VS51> <VIACTT2> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<anonymous>> <> <> <1284389948181> <000000> <Unable to create secondary for 1678977133045201960 on null>
In my early post i forgot to mention that i´m using an Apache 2.2 in the front-end with Weblogic 9.2 (cluster).
What is happening in this weblogic configuration so that this session replication don´t work.
cheers,
Similar Messages
-
In-memory http session replication problem
Hi All ,
I'm testing my cluster configuration with bea's example for session(http) replication,however
when my cluster runs in one machine everything works fine ,if I run managed server
from other host session replication does not occure.
(I hit the firs ManagedServer with my browser,create session and than hit directly
the second managed server)
I've made a test which show that multicast I've setup among hosts is available,so
this is not the case.
(bind multicast sockets from two hosts and than send some data to it to see if
both get the packag)
Info logs from managed server's console shows that everythings work fine when
startng the cluster - detects Peer Lost,and Peer Join.
My cluster addres was setup as ip1:port1,ip2:port2.
I will apricate any opinion, because we are stuck.
Vladislav
Hi All,
10x Sunna , I figured the problem which actually was a metter of blindness :-)
was that I did't make the request throught load-balancer and the coockies were
from different hosts,in view of browser they differs.
Sunna <[email protected]> wrote:
>Session replication uses IP sockets not multicast. Is there a firewall
>or something that could be blocking that? See:
>
>http://e-docs.bea.com/wls/docs81/cluster/features.html#1031598
-
Http session replication fails in cluster
Hello everybody.
I have some problems with HTTP session replication in WebLlogic cluster environment. I have a cluster with 2 nodes and application deployed there. Application is configured with:
<session-param>
<param-name>PersistentStoreType</param-name>
<param-value>replicated</param-value>
</session-param>
in weblogic.xml
WebLogic plug-in for Apache webserver is configured properly as described in documentation.
But when I try to make experiment to enter the application, make some activities, look in console where I was redirected by apache proxy and manually shut down the node where request was sent, I loose my HTTP session with all data there (all the beans stored in session are Serializable). Replication doesn't work correctly. May be I've missed something in configuration? How can I configure my application to provide correctness session replication?
Thanks for advice.
ThanksThanks for response!
I'm using WebLogic 8.1 SP 4 and configured Apache proxy as described in documentation for load balancing. The only section I have in httpd.conf is next:
<Location /HTTPClnt>
SetHandler weblogic-handler
</Location>
<IfModule mod_weblogic.c>
WebLogicCluster serv1:7541,serv2:7541
MatchExpression *.*
Debug ON
WLLogFile /www/tmp/global_proxy.log
WLTempDir "/www/tmp"
DebugConfigInfo On
KeepAliveEnabled ON
KeepAliveSecs 15
</IfModule>
<Location /myApp>
SetHandler weblogic-handler
WebLogicCluster serv1:7541,serv2:7541
</Location>and the string to include weblogic proxy module for apache:
LoadModule weblogic_module modules/mod_wl_20.soI've configured CookiesEnabled=true in weblogic.xml, but it didn't help. About session specification in httpd.conf - where can I read about that? I've just configured apache according to manual from here:
[url http://e-docs.bea.com/wls/docs92/plugins/apache.html]http://e-docs.bea.com/wls/docs92/plugins/apache.html
Thanks -
What are the steps to setup an HTTP Session replication clustering in oc4j9
what are the steps to setup an HTTP Session replication clustering in oc4j9.0.5
Are you sure you have the correct version number for OC4J? Is this a standalone OC4J instance, if it then the steps involved are different from the full stack. Please check the Higher Availibility guide in the documentation on OTN.
Deepak -
Hi!
I'm trying to setup a cluster between two managed servers located on the same server. The following configuration is about my cluster. I just removed the secutiry element:
*<?xml version='1.0' encoding='UTF-8'?>*
*<domain xmlns="http://xmlns.oracle.com/weblogic/domain" xmlns:sec="http://xmlns.oracle.com/weblogic/security" xmlns:wls="http://xmlns.oracle.com/weblogic/security/wls" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.oracle.com/weblogic/security/xacml http://xmlns.oracle.com/weblogic/security/xacml/1.0/xacml.xsd http://xmlns.oracle.com/weblogic/security/providers/passwordvalidator http://xmlns.oracle.com/weblogic/security/providers/passwordvalidator/1.0/passwordvalidator.xsd http://xmlns.oracle.com/weblogic/domain http://xmlns.oracle.com/weblogic/1.0/domain.xsd http://xmlns.oracle.com/weblogic/security http://xmlns.oracle.com/weblogic/1.0/security.xsd http://xmlns.oracle.com/weblogic/security/wls http://xmlns.oracle.com/weblogic/security/wls/1.0/wls.xsd">*
*<name>caim</name>*
*<domain-version>10.3.2.0</domain-version>*
*<server>*
*<name>AdminServer</name>*
*<machine></machine>*
*<listen-address></listen-address>*
*</server>*
*<server>*
*<name>ManagedServer_1</name>*
*<machine></machine>*
*<listen-port>7003</listen-port>*
*<cluster>Cluster_1</cluster>*
*<listen-address></listen-address>*
*<server-start>*
*<arguments>-Djava.endorsed.dirs=C:\endorsed</arguments>*
*<password-encrypted>{AES}7iyQ50j7+efCMMUTHrSPcELzY9wjcge0W0Gp/HH3j9E=</password-encrypted>*
*</server-start>*
*<jta-migratable-target>*
*<name>ManagedServer_1</name>*
*<user-preferred-server>ManagedServer_1</user-preferred-server>*
*<cluster>Cluster_1</cluster>*
*</jta-migratable-target>*
*</server>*
*<server>*
*<name>ManagedServer_2</name>*
*<machine></machine>*
*<listen-port>7004</listen-port>*
*<cluster>Cluster_1</cluster>*
*<listen-address></listen-address>*
*<server-start>*
*<arguments>-Djava.endorsed.dirs=C:\endorsed</arguments>*
*<password-encrypted>{AES}PC7yN6hCVA3N6lMn2AyZgJu0pGcv4K5XUDUMmWMNE5Q=</password-encrypted>*
*</server-start>*
*<jta-migratable-target>*
*<name>ManagedServer_2</name>*
*<user-preferred-server>ManagedServer_2</user-preferred-server>*
*<cluster>Cluster_1</cluster>*
*</jta-migratable-target>*
*</server>*
*<cluster>*
*<name>Cluster_1</name>*
*<cluster-messaging-mode>unicast</cluster-messaging-mode>*
*</cluster>*
*<production-mode-enabled>true</production-mode-enabled>*
*<embedded-ldap>*
*<name>caim</name>*
*<credential-encrypted>{AES}BQResE+Zs6gOOTGLqF3T70xcLs3AVw2F7+7sNKLdb2T+QE3cx+zHFlO0RQyBAZy1</credential-encrypted>*
*</embedded-ldap>*
*<configuration-version>10.3.2.0</configuration-version>*
*<app-deployment>*
*<name>app</name>*
*<target>ManagedServer_1</target>*
*<module-type>war</module-type>*
*<source-path>C:\WebLogic\app</source-path>*
*<deployment-order>100</deployment-order>*
*<security-dd-model>DDOnly</security-dd-model>*
*</app-deployment>*
*<app-deployment>*
*<name>app2</name>*
*<target>ManagedServer_2</target>*
*<module-type>war</module-type>*
*<source-path>C:\WebLogic\app2</source-path>*
*<security-dd-model>DDOnly</security-dd-model>*
*</app-deployment>*
*<machine>*
*<name></name>*
*<node-manager>*
*<name></name>*
*<listen-address></listen-address>*
*</node-manager>*
*</machine>*
*<migratable-target>*
*<name>ManagedServer_1 (migratable)</name>*
*<notes>This is a system generated default migratable target for a server. Do not delete manually.</notes>*
*<user-preferred-server>ManagedServer_1</user-preferred-server>*
*<cluster>Cluster_1</cluster>*
*</migratable-target>*
*<migratable-target>*
*<name>ManagedServer_2 (migratable)</name>*
*<notes>This is a system generated default migratable target for a server. Do not delete manually.</notes>*
*<user-preferred-server>ManagedServer_2</user-preferred-server>*
*<cluster>Cluster_1</cluster>*
*</migratable-target>*
*<admin-server-name>AdminServer</admin-server-name>*
*</domain>*
I do not see any log about http session replication and when I stop the managed server that is handling the requests, the application is redirected to the login page, i.e., there's no session replication.
Need I to do something more than create the cluster and add the managed servers to the cluster?
Is it possible to enable the logging to the session replication?
Best Regards,
A.Please refer to : http://jaysensharma.wordpress.com/2009/12/08/session-replication-issues/
To identify Session Replication requirements ...and Causes...
Like *"weblogic.xml"* should contain:
<persistance-type> Tag... Like following:
<font color=maroon>
<session-descriptor>
<persistent-store-type>replicated</persistent-store-type>
</session-descriptor>
</font>
Can you please enable SessionReplication related Debug Flags from AdminConsole....?
Are you using any kind of Proxy/LoadBalancer in front of your Cluster?
Have you ever tried changing default HttpSession Cookie Name from "*JSESSIONID"* to something else?
Thanks
Jay SenSharma -
Apache + 2 Tomcats session replication problem.
Greetings everyone.
Before stating the problem, let me explain how my environment is set.
I have two machines. One (PC1) running Apache (HTTP server 2.0.58)
and one instance of Tomcat (5.0.28) and another machine (PC2) with
another instance of Tomcat(5.0.28).
The Apache server
It is configured to handle static content, to redirect dynamic content to a
Tomcat instance through AJP 1.3 connector.
This process is done through the mod_jk and the workers.properties
The workers.properties file is configured to have sticky_session = True
so it assigns a SESSION_ID to the same Tomcat it was first assigned.
The workers.properties file is configured to have
sticky_session_force = True so if the Tomcat the SESSION_ID was
assigned is not available, the server answers with a 500 error.
The Tomcat servers
Both have only the AJP 1.3 connector enabled
Both have the Cluster tag from the server.xml file uncommented
and the useDirtyFlag flag set to false, for not to allow SESSION
replication between Tomcats.
The workers.properties file
workers.apache_log=C:/Apache2/logs
workers.tomcat_home=C:/Tomcat5
workers.java_home=C:/j2sdk1.4.2_13
ps=/
#Defining workers -----------------------------
worker.list=balancer,jkstatus
#Defining balancer ---------------------------
worker.balancer.type=lb
worker.balancer.balance_workers=tel1, tel2
worker.balancer.sticky_session=True
worker.balancer.sticky_session_force=True
worker.balancer.method=B
worker.balancer.lock=O
#Defining status -----------------------------
worker.jkstatus.type=status
worker.jkstatus.css=/jk_status/StatusCSS.css
#Workers properties ---------------------------
worker.tel1.type=ajp13
worker.tel1.port=8009
worker.tel1.host=127.0.0.1
worker.tel1.lbfactor=1
worker.tel1.socket_keepalive=False
worker.tel1.socket_timeout=30
worker.tel1.retries=20
worker.tel1.connection_pool_timeout = 20
#worker.tel1.redirect=tel2
worker.tel1.disabled=False
worker.tel2.type=ajp13
worker.tel2.port=8009
worker.tel2.host=199.147.52.181
worker.tel2.lbfactor=1
worker.tel2.socket_keepalive=False
worker.tel2.socket_timeout=30
worker.tel2.retries=20
worker.tel2.connection_pool_timeout = 20
#worker.tel2.redirect=tel1
worker.tel2.disabled=False
THE PROBLEM
I open a browser in the jk-status page to see how the Tomcat instances are
working, and both are working fine: Stat -> OK, now as the
loadbalancing factor is 1 on both Tomcats, an even alternating session
distribution is set.
While this browser is open to keep an eye on the status, I open a new
browser (B1)to connect to my Web Application, Apache answers
correctly and gives me a SESSION_ID for Tomcat instance 1 [both
instances are OK], if I make a simple refresh, my SESSION_ID is still the
same so I'm assigned to Tomcat instance 1 but this time I get an
ERROR 503 - Service unavailable but looking at the status of the
Tomcat instances both instances are still OK, no-one is down. And it
stays throwing this error for as many refreshes i do.
Now, I open a new browser (B2)and do the same process as before,
as expected, Apache now gives me a SESSION_ID for Tomcat instance 2,
repeating the same refreshing process, the error is thrown again, but still at
the jk-status page, both instances are fine.
Without closing these windows, I make a new refresh try on B1 and
even though the jk-status says both Tomcat instances are OK, the error
is still thrown. I open a third one (B3), and Apache again, correctly
gives me a new SESSION_ID for Tomcat instance 1 and answers
correctly on the first call. But once again if i repeat the refreshing process, the
error is thrown again.
Note: Using a different resolution to always keep and eye on the
instances status and using a refresh rate of 1 second for status, both
servers always were OK.
So the main problem is that somehow when the session is replicated
to the same tomcat, Apache confuses and thinks it is not available, when
asking it through the jk-status it tells it is OK
I've been trying different configurations with both Apache and Tomcat,
but there must be something missing since I don't get it to work correctly
Thanks in advance for all your helping comments.
- @alphazygmaWhew... that was quite an answer... definitely is going to help him a lot. Yeah any n00b by now should know how to use google, but that's not the point in this forums, here we are to help each other. and wether you like it or not many of us deploy applications to tomcat and stumble on this. So dont try to be cool posting this kind of answers like google this or google that if you dont have an answer please dont comment you will appear to be more noobish than you aparently are.
Well enough talking.
I found the following useful: (it comes in the server.xml of the tomcat configuration)
<!-- You should set jvmRoute to support load-balancing via JK/JK2 ie :
<Engine name="Standalone" defaultHost="localhost" debug="0" jvmRoute="jvm1">
-->
Enabling that entry on both machines should be enough.
Aparently the problem is not with apache. is with tomcat since it can't retain the session apache gives.
more information in the Tomcat help at:
http://tomcat.apache.org/tomcat-5.0-doc/balancer-howto.html#Using%20Apache%202%20with%20mod_proxy%20and%20mod_rewrite -
Weblogic 7.0 sp1 cluster - session replication problem
Hi,
I have installed Weblogic 7.0 sp2 on Win NT. To test clustering
feature, I have installed one admin server and added two managed
servers. All are running on same box. I could deploy web application
to the cluster. Connection pools and every other resource is working
well with the cluster. However I couldn't get session replication to
work. I have modified web app descriptor, and set 'persistent store
type' to "replicated".
I accessed application from one managed server, in the middle of
session I modified the port number in the URL to point to other
managed server. It looks like second managed server has no idea of
that session, my app fails because of this.
Could you please help me out in this, Do I need to do any thing in
addition to the above. I couldn't find much in the BEA manual..
Thanks
Rao
For Web application like servlets/JSP, it is better to put one web server as proxy
plugin before your two managed servers and access your application through web
proxy. (You need set session as in-memory replicated either in weblogic.xml or
by console editor). Otherwise, you need record the session cookie from the first
serevr and send the cookie to the second server (not sure if it works). To access
EJB/JMS, use cluster URL like t3://server1:port1,server2:port2.
[email protected] (Rao) wrote:
>Hi,
>
>I have installed Weblogic 7.0 sp2 on Win NT. To test clustering
>feature, I have installed one admin server and added two managed
>servers. All are running on same box. I could deploy web application
>to the cluster. Connection pools and every other resource is working
>well with the cluster. However I couldn't get session replication to
>work. I have modified web app descriptor, and set 'persistent store
>type' to "replicated".
>
>I accessed application from one managed server, in the middle of
>session I modified the port number in the URL to point to other
>managed server. It looks like second managed server has no idea of
>that session, my app fails because of this.
>
>
>Could you please help me out in this, Do I need to do any thing in
>addition to the above. I couldn't find much in the BEA manual..
>
>
>Thanks
>Rao
-
Remote handle caching error when using HTTP session replication
Using WL 7.0 Sp2 on Solaris, deployed apllication on a 2 instance wide cluster.Code
attached -
unzip testapp.zip to find a test.jar which is the stateless sesion ejb and test.war
which is the applicaiton.
I have this class - TestDelegate that looks up a stateless session EJB(TestEJB),
and puts the remote handle as a member variable(Test bean).Test.jsp instantiates
this delegate(TestDelegate ), and then via setAttribute puts the TestDelegate
in the HTTPSession.Then it calls a couple of methods via the TestDelegate which
has the remote handle of the TestEJB.
Scenario 1 : We deploy the WAR on cluster A which is 2 instance wide,we deploy
the TestEJB on
cluster B, which is also 2 instance wide. All works fine, the delegate is able
to lookup EJB and
can add the remote handle as a member variable.
Scenario 2: We deploy the WAR on cluster A which is 2 instance wide,we deploy
the TestEJB on
cluster B, which is also 2 instance wide. This time we put a weblogic.xml in the
WAR which has tag for in-memory session replication.This time we get class cast
exception for the same sequence that we have above.
<Mar 24, 2003 10:43:28 AM EST> <Error> <kernel> <000802> <ExecuteRequest failed
java.lang.ClassCastException: Assigning instance of class com.TestEJB_1jsmq_EOImpl_WLStub
to field com.bean.TestDelegate#bean
Start server side stack trace:
java.lang.ClassCastException: Assigning instance of class com.TestEJB_1jsmq_EOImpl_WLStub
to field com.bean.TestDelegate#bean
at java.io.ObjectInputStream.inputClassFields(ObjectInputStream.java:2266)
at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:514)
at java.io.ObjectInputStream.inputObject(ObjectInputStream.java:1407)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:381)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:231)
at java.util.Hashtable.readObject(Hashtable.java:794)
at java.lang.reflect.Method.invoke(Native Method)
at java.io.ObjectInputStream.invokeObjectReader(ObjectInputStream.java:2209)
at java.io.ObjectInputStream.inputObject(ObjectInputStream.java:1406)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:381)
at java.io.ObjectInputStream.inputClassFields(ObjectInputStream.java:2258)
at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:514)
at java.io.ObjectInputStream.inputObject(ObjectInputStream.java:1407)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:381)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:231)
at weblogic.common.internal.ChunkedObjectInputStream.readObject(ChunkedObjectInputStream.java:140)
at weblogic.rjvm.MsgAbbrevInputStream.readObject(MsgAbbrevInputStream.java:91)
at weblogic.cluster.replication.ReplicationManager_WLSkel.invoke(Unknown
Source)
at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:362)
at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:313)
at weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManager.java:821)
at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:308)
at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:30)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:213)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:189)
End server side stack trace
[testapp.zip]
To see the list of session IDs in the cache you can iterate over the keys of the cache returned from the following code:
NamedCache cacheCatalog = CacheFactory.getReplicatedCacheService("$FilterService$").ensureCache("CoherenceSession.CATALOG", getClass().getClassLoader());Then to see the contents of a session you can take a look a the cache returned from the following code:
String sId = // keys from cacheCatalog
NamedCache cacheDetails = cacheCatalog.getCacheService().ensureCache(sId, getClass().getClassLoader());Hope this helps.
We have received your request for a development license and we hould have ti out to you today.
Later,
Rob Misek
Tangosol, Inc.
Coherence: Cluster your Work. Work your Cluster. -
WL 7.0 sp4 session replication problem
These are the configuration:
* BEA WebLogic Server 7.0 SP4
* Domain : mydomain
* Machine:
machine1 (Windows 2003)
machine2 (Windows 2000)
* Admin Server :
myserver (on "machine1")
* Managed Server :
server1 (on "machine1") , replication group: groupA , prefered secondary replication
group: groupB
server2 (on "machine2") , replication group: groupB , prefered secondary replication
group: groupA
proxy (on "machine2")
* Cluster :
cluster-1 (contains "server1" and "server2")
I've deployed an application (one EJB and some JSP, just for testing purpose)
to "cluster-1".
And I also deployed a "weblogic.servlet.proxy.HttpClusterServlet" application
to "proxy",
which is configured to connect "server1" and "server2".
Now I open a browser and browse to "proxy" and I can see th result from "server1"
or "server2".
But when I shutdown the server which my current session is on, I was redirected
to another server
but the session is not replicated.
Did you set the replicated option for your webapp. Did you change the
cookiename by anychance?
sree
"patrick" <[email protected]> wrote in message news:40e53734$1@mktnews1...
>
> These are the configuration:
>
> * BEA WebLogic Server 7.0 SP4
> * Domain : mydomain
> * Machine:
> machine1 (Windows 2003)
> machine2 (Windows 2000)
> * Admin Server :
> myserver (on "machine1")
> * Managed Server :
> server1 (on "machine1") , replication group: groupA , prefered
secondary replication
> group: groupB
> server2 (on "machine2") , replication group: groupB , prefered
secondary replication
> group: groupA
> proxy (on "machine2")
> * Cluster :
> cluster-1 (contains "server1" and "server2")
>
> I've deployed an application (one EJB and some JSP, just for testing
purpose)
> to "cluster-1".
> And I also deployed a "weblogic.servlet.proxy.HttpClusterServlet"
application
> to "proxy",
> which is configured to connect "server1" and "server2".
>
> Now I open a browser and browse to "proxy" and I can see th result from
"server1"
> or "server2".
> But when I shutdown the server which my current session is on, I was
redirected
> to another server
> but the session is not replicated.
-
Http session replication is not working
I am using WLS6.1sp2. I have two instances in the cluster, and using HTTPClusterServlet
as the proxy for my web app which has been setup as in-memory replication. Here
is the problem:
1) I start both cluter instances up
2) login to my web app
3) shut down the inistance that handled my login
4) making another request
I was asked to login again before my request been filled,
can somebody tell me what I missed? thanks
Did you set persistentStoreType="replicated" in your webapp's
weblogic.xml?
Kumar
x zhou wrote:
> I am using WLS6.1sp2. I have two instances in the cluster, and using HTTPClusterServlet
> as the proxy for my web app which has been setup as in-memory replication. Here
> is the problem:
> 1) I start both cluter instances up
> 2) login to my web app
> 3) shut down the inistance that handled my login
> 4) making another request
> I was asked to login again before my request been filled,
>
> can somebody tell me what I missed? thanks
>
>
-
How can I monitor the Session Cache when using HTTP Session-Replication?
I want to see the session cache content
To see the list of session IDs in the cache you can iterate over the keys of the cache returned from the following code:
NamedCache cacheCatalog = CacheFactory.getReplicatedCacheService("$FilterService$").ensureCache("CoherenceSession.CATALOG", getClass().getClassLoader());Then to see the contents of a session you can take a look a the cache returned from the following code:
String sId = // keys from cacheCatalog
NamedCache cacheDetails = cacheCatalog.getCacheService().ensureCache(sId, getClass().getClassLoader());Hope this helps.
We have received your request for a development license and we hould have ti out to you today.
Later,
Rob Misek
Tangosol, Inc.
Coherence: Cluster your Work. Work your Cluster. -
Hi,
We have a need for session sharing among the different JVMs and have been trying the application cluster functionality with zero luck. Now we are thinking of looking into coherence because by reading the documentation we came to know this is something we could accomplish it. Since being a very new on this, have anyone done this and if you have can we get some information on how to do it. We will really appreciate your help on this.
Thanks,
RajTo better understand the background of your root problem,
1) which Application Server product are you using?
2) the term "clustering" may mean different things to different App Server implementations. Does your reference to clustering also mean "Http Session Replication" has been specifically enabled, or that by simply clustering JVMs you expect this to happen automatically?
3) is access to the session needed by the same web app or different web apps in the JVMs? -
Entity remote in clustered http session ?
we put a entity remote object into a http session which is replicated
across a cluster of 3 linux machines ( each with 1 weblogic 6.1 SP2).
http session replication works fine: the entity is accessible on every
machine in this cluster.
it seems that there is no failover for entity remote object in this
case: i kill the server where the entity was originally created. the
web application just reports an "10.5.1 500 Internal Server Error".
the server log of the machine where the current request was executed
says:
1.
Removing solarium jvmid:-995414765884053603S:192.168.145.41:
[2357,2357,7002,7002,2357,7002,-1]:beacluster.hybris.de:hybr
is:solarium from cluster view due to PeerGone
( solarium is the killed server; beacluster the cluster DNS name )
2.
Removing -995414765884053603S:192.168.145.41:[2357,2357,7002
,7002,2357,7002,-1]:beacluster.hybris.de:hybris:solarium to
the cluster
3.
[WebAppServletContext(729829,dummyweb,/dummyweb)] Servlet fa
iled with IOException
java.rmi.ConnectException: Unable to get direct or routed connection to:
'-995414765884053603S:192.168.145.41:[2357,2357,7002,7002,2357,7002,-1]:beacluster.hybris.de:hybris:solarium'
at
weblogic.rmi.internal.BasicOutboundRequest.sendReceive(BasicOutboundRequest.java:85)
at
weblogic.rmi.cluster.EntityRemoteRef.privateInvoke(EntityRemoteRef.java:144)
at
weblogic.rmi.cluster.EntityRemoteRef.invoke(EntityRemoteRef.java:115)
at weblogic.rmi.internal.ProxyStub.invoke(ProxyStub.java:35)
at $Proxy86.getText(Unknown Source)
at jsp_servlet.__dummyEntity._jspService(__dummyEntity.java:148)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:265)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:200)
at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2495)
at
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2204)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
thanks in advance,
axel grossmann.
HTTP session is only replicated to the secondary server, not all servers in
the cluster.
Peace,
Cameron Purdy
Tangosol, Inc.
Clustering Weblogic? You're either using Coherence, or you should be!
Download a Tangosol Coherence eval today at http://www.tangosol.com/
"Axel Großmann" <[email protected]> wrote in message
news:[email protected]...
>
> we put a entity remote object into a http session which is replicated
> across a cluster of 3 linux machines ( each with 1 weblogic 6.1 SP2).
>
> http session replication works fine: the entity is accessible on every
> machine in this cluster.
>
> it seems that there is no failover for entity remote object in this
> case: i kill the server where the entity was originally created. the
> web application just reports an "10.5.1 500 Internal Server Error".
>
> the server log of the machine where the current request was executed
> says:
>
> 1.
> Removing solarium jvmid:-995414765884053603S:192.168.145.41:
>
> [2357,2357,7002,7002,2357,7002,-1]:beacluster.hybris.de:hybr
> is:solarium from cluster view due to PeerGone
>
> ( solarium is the killed server; beacluster the cluster DNS name )
>
> 2.
> Removing -995414765884053603S:192.168.145.41:[2357,2357,7002
> ,7002,2357,7002,-1]:beacluster.hybris.de:hybris:solarium to
> the cluster
>
> 3.
> [WebAppServletContext(729829,dummyweb,/dummyweb)] Servlet fa
> iled with IOException
> java.rmi.ConnectException: Unable to get direct or routed connection to:
>
'-995414765884053603S:192.168.145.41:[2357,2357,7002,7002,2357,7002,-1]:beac
luster.hybris.de:hybris:solarium'
> at
>
weblogic.rmi.internal.BasicOutboundRequest.sendReceive(BasicOutboundRequest.
java:85)
> at
>
weblogic.rmi.cluster.EntityRemoteRef.privateInvoke(EntityRemoteRef.java:144)
> at
> weblogic.rmi.cluster.EntityRemoteRef.invoke(EntityRemoteRef.java:115)
> at weblogic.rmi.internal.ProxyStub.invoke(ProxyStub.java:35)
> at $Proxy86.getText(Unknown Source)
> at jsp_servlet.__dummyEntity._jspService(__dummyEntity.java:148)
> at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
> at
>
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:265)
> at
>
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:200)
> at
>
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo
ntext.java:2495)
> at
>
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java
:2204)
> at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
> at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
>
> thanks in advance,
> axel grossmann.
-
In-memory replication of http session is not working in BEA7 cluster
Hi everyone,
I have 3 managed servers in Bea7.0 SP4 in a cluster. The client requests are sent
through apache web server. I have given cluster address as URL in httpd.conf of
apache server which sends the client requests for dynamic pages such as JSPs and
servlets to the weblogic cluster.
Load balancing is working fine. I ensured this from the log files of all the 3
servers. All the 3 servers are getting different client requests and thus load
balancing is working.
Now, I wanted to achieve Fail-over. I do not think that i should use proxy plug-in
for this. I feel the cluster itself will handle fail-over provided i make the
http session as memory replicated.
I updated the weblogic.xml with the following entry :
<session-descriptor>
<param-name>PersistentStoreType</param-name>
<param-value>replicated</param-value>
</session-param>
</session-descriptor>
I guess this is sufficient to make the http session as cluster aware.
But when I shutdown server1, the user connected to server1 will be kicked out
of the session and come to login page through server2 or server3 which are running
fine.
Could anyone help me to achieve http session as cluster aware. Does it indicate
that I have to go for WLS proxy – HttpClusterServlet to achieve fail over for
http session ?
BTW, for your info, i am using setAttribute() and getAttribute() while manipulating
the session.
thanks in advance.
Hi Ryan,
Thanks for ur valuable input.
I can see failover working.
But, I can not continue with the same session in my application.
I printed session Ids before and after failover, I found both are different.
I guess session replication is a responsibility of weblogic/apache plugin.
If not please let me know which all settings I should do to make failover working?
Thanks again.
Plad
"ryan upton" <ryanjupton at learningvoyage dot com> wrote:
>Plad,
>
>Are you trying to gracefully shut down the server? If you are then the
>problem that you say you can't identify is simply the server's default
>behavior which is to wait for all non-replicated sessions to be dropped
>or
>timed out before killing the process. Try forcing the shutdown: kill
>-9 the
>PID or CTRL-C if you started the server from the command line. You can
>also
>check the ``Ignore Sessions During Shutdown" checkbox under the server's
>control tab in the admin console, this should allow you to shut down
>gracefully without waiting for session timeout. BTW your sequence is
>off
>in #5 below, the replication doesn't occur upon failure, the replication
>has
>already happened once you created the session object on the first server,
>I
>think maybe you're confusing replication with failover.
>
>~RU
>
>"Plad" <[email protected]> wrote in message
>news:[email protected]...
>>
>> Hi,
>> I have 2 managed servers in a cluster.
>>
>> 1. I have got a DNS name configured which maps to these 2 managed server's
>IP
>> addresses.
>> 2. I can browse my site using this DNS name.
>> In HTTPD.conf I have :
>>
>> ServerName dev.a.b.net
>>
>> <IfModule mod_weblogic.c>
>> WebLogicCluster 10.1.38.232:7023,10.1.34.51:7023
>> MatchExpression *.*
>> </IfModule>
>>
>> LoadModule weblogic_module modules/mod_wl_20.so
>>
>> 3. I have adeded session descriptor in weblogic.xml , also enabled
>proxy
>plugin
>> in weblogic console.
>>
>> 4. I tested accessing my application using DNS url after shutting down
>alternatively
>> each manaed server. I can access application.
>>
>> 5. Now, problem comes when I access a managed server1 , keeping server2
>down.
>> I am able to access my application.
>> Now, I start the server2.
>> (Here I am supposing that replication should occur)
>> Then I am shutting down server1.
>> But, this time the server log shows me following:
>>
>>
>> 9:58:51 AM GMT+05:30 NOTICE Web application(s) chlist still have
>non-replicated
>> sessions after 2 minutes of initiating SUSPEND. Waiting for non-replicated
>sessions
>> to finish.
>> 10:00:51 AM GMT+05:30 NOTICE Web application(s) chlist still have
>non-replicated
>> sessions after 4 minutes of initiating SUSPEND. Waiting for non-replicated
>sessions
>> to finish.
>>
>> I am unable to make out where the problem is?
>> Can it be a problem of Liecense? Is there any specialcluster liecense
>for
>weblogic8?
>>
>> Hoping to get replies.
>> Thanx.
>> Plad
>>
>> "ryan upton" <ryanjupton at learningvoyage dot com> wrote:
>> >See my reply to your first post, but I've also added a few comments
>here.
>> >
>> >"jyothi" <[email protected]> wrote in message
>> >news:[email protected]...
>> >>
>> >> I guess someone from bea support team only can answer both your
>question
>> >and mine.
>> >> As per my knowledge, we do not need to do any setup at Apache
>side
>> >regarding
>> >> cluster other than mentioning cluster address as URL while
>contacting
>> >WLS
>> >> from apache.
>> >>
>> >> I hope someone from Bea, will help us. I do not think that we
>> >go for
>> >WLS
>> >> proxy plug-in using HttpClusterServlet for making session replication.
>> > I
>> >strongly
>> >> feel that the cluster itself be able to manage the fail-over of
>> >http
>> >sessions
>> >> provided we put the entry "PersistentStoreType" in weblogic.xml
>> >regarding
>> >> the session replication.
>> >>
>> >
>> >The cluster does handle the management of Sessions. The clustered
>> >applications still create the Session objects and the cluster manages
>> >them
>> >as per your deployment descriptor settings (replicated, JDBC, File)
>however
>> >the proxy has to be aware of which server the client has an affinity
>> >for
>> >(only with replicated sessions) and it does that by reading a cookie
>> >passed
>> >back from the server that handled the initial request and created
>the
>> >primary session object. The proxy has a list of both the primary
>and
>> >secondary server locations from this cookie that it can use to failover
>> >the
>> >request if the primary server fails. Clusters _DO NOT_ failover nor
>> >do they
>> >load balance, that's the job of your proxy, whether you're using the
>> >HTTPClusterServlet, WLS Plug-in or a more sophisticated hardware load
>> >balancer like Big IPs F5
>> >
>> >> jyothi
>> >>
>> >
>> >~RU
>> >
>> >
>>
>
>
-
Session replication at every http request
Hi everybody
I'm trying to use ZKoss Framework (www.zkoss.org) to develop a
web application and deploy it in a Clustered WebLogic Server.
The main issue I'm facing is that the "state" of the visual interface
is stored inside the http session, and so, when node that handle
the http request changes, the state is resetted and then the page changes,
even if there was no user intervention.
So I need to replicate the whole session at every http request,
to prevent strange behaviours when the request handler node's changes.
Do you know some settings that will force WebLogic Server to replicate the whole
session at every http request?
Thanks in advance.
bye.Hi Marco,
Yes, You are right But You NEED NOT to put setAttribute("key","value")...code in all your JSPs. because if the Attribute data of Session is changed then Automatically it will be replicated (only the Changed Data and not the Data which is unchanged). Even we need not to worry about replicating the Unchanged Data Again...And WebLogic will take care of ChangedData by itself. There is no other alternate solution available in weblogic to do this...Even no such similar Element available in Deployment descriptors as well.
Actual Link is Broken http://download-llnw.oracle.com/docs/cd/E13222_01/wls/docs90/cluster/failover.html
Any way i am copy-pasting few Lines from E-Docs (the actual link i am not able to find ..but may be u can open the cached page:
http://74.125.153.132/search?q=cache:bxTbqJEsQTsJ:download-llnw.oracle.com/docs/cd/E13222_01/wls/docs90/cluster/failover.html+setAttribute+Session+replication+weblogic&cd=6&hl=en&ct=clnk&gl=in
---------------------------If you are not able to open the link then please refer to the E-Docs copy-paste content below --------------------------
Programming Considerations for Clustered Servlets and JSPs
This section highlights key programming constraints and recommendations for servlets and JSPs that you will deploy in a clustered environment.
Session Data Must Be Serializable
To support in-memory replication of HTTP session states, all servlet and JSP session data must be serializable.
Note: Serialization is the process of converting a complex data structure, such as a parallel arrangement of data (in which a number of bits are transmitted at a time along parallel channels) into a serial form (in which one bit at a time is transmitted); a serial interface provides this conversion to enable data transmission.
Every field in an object must be serializable or transient in order for the object to be considered serializable. If the servlet or JSP uses a combination of serializable and non-serializable objects, WebLogic Server does not replicate the session state of the non-serializable objects.
Use setAttribute to Change Session State
In an HTTP servlet that implements javax.servlet.http.HttpSession, use HttpSession.setAttribute (which replaces the deprecated putValue) to change attributes in a session object. If you set attributes in a session object with setAttribute, the object and its attributes are replicated in a cluster using in-memory replication. If you use other set methods to change objects within a session, WebLogic Server does not replicate those changes. Every time a change is made to an object that is in the session, setAttribute() should be called to update that object across the cluster.
Likewise, use removeAttribute (which, in turn, replaces the deprecated removeValue) to remove an attribute from a session object.
Note: Use of the deprecated putValue and removeValue methods will also cause session attributes to be replicated.
Thanks
Jay SenSharma
Edited by: Jay SenSharma on Feb 11, 2010 10:24 PM
Edited by: Jay SenSharma on Feb 11, 2010 10:26 PM
Maybe you are looking for
-
Urgent: Getting FRM-41211 when calling reports from forms for first time.
Hi, We are running into the FRM-41211 error, when the users try to call a report from a form. The report is called from a form in SYNCHRONOUS mode. This is the only report that is being called. No other report is running at that time when the users g
-
Error when calling simple restful service from SOA 11G
Hi' I have a URL for simple restful service http://xxxxx:857/swift/v2/EMPIDChanges/{bookmarkDate} GET method I am able to invoke this from IE and This URL is also accessible in UNIX server where SOA server is deployed. http://xxxxx:857/swift/v2/EMPID
-
This is what I see every time I open the Adobe CC app and/or try to install any software from the Adobe CC website. Any help on why this is happening or how to fix it or preferably both would be greatly appreciated!
-
How to use HighChart column drilldown in SharePoint?
Hi All, I am using highchart in SharePoint, while trying drilldown column chart how to pass drilldown values? Here is my code: $(function () { // Create the chart $('#container').highcharts({ chart: { type: 'column' title: { text: 'Basic drilldown' x
-
Adobe lightroom 2 module error
I just installed Adobe Photoshop Lightroom 2, but when I start the application an error comes up " an error occured when attempting to change modules". I am new to the mac so i am at a loss on what to do to fix this. I have removed the program and it