Session Failover and Clustering

          Let's say that we have two WebServers (NES) with the weblogic plugin (say WS1 and WS2) and a cluster with two WebLogicCommerce AppServers (say AS1 and AS2). Let's assume that each WebServer and AppServer runs on its own machine (total: 4 machines). Now, let's assume that the WebServer "obj.conf" files (on both WS1 and WS2) are setup so that they point to the servers in the cluster (WebLogicCluster="AS1:7601,AS2:7601").
          When a new request comes in to one of the WebServers (say WS1), the plugin will route it to one of the AppServers using Round-Robin (say AS1). A session will now be initiated in AS1 and it sends a response back to the client.
          Question 1: How does the other proxy in WS2 know that all future requests for this client need to be forwarded to AS1?
          Question 2: For failover, does the cluster automatically replicate the session state existing in AS1 onto AS2 before sending the response (does AS2 automatically become the secondary)?
          Now let's assume that AS1 crashes/dies. When the next request from the client comes to WS1 or WS2, they will forward it to AS1 (assuming that WS2 knows about the client session in AS1) . Since AS1 has crashed, will the client eventually get a timeout error message?
          Question 3: To ensure that the session failover happens so that AS2 gets the request instead (becomes the primary), do we need to setup a WebLogic Proxy Server? If so, why can't the plugins for NES provide the failover themselves?
          Thank you very much for your help!
          Giri
          

          Thank you very much for your responses. It has been very helpful and I am clear on the session/clustering stuff. I have new questions on EJB and clustering which I will post as a separate thread.
          Giri
          "Jason Rosenberg" <[email protected]> wrote:
          >And also, if the browser has cookies disabled, it is important for
          >the app server to embed the WebLogicSession info via url rewriting,
          >otherwise the proxy or NES will not be able to route the session
          >properly.
          >
          >So, in all http responses, be sure to pass the url string through
          >response.encodeURL(). This will do the right thing depending
          >on whether cookies are enabled or not.
          >
          >I've just only recently figured this out. Haven't actually tried it
          >all out yet, so forgive me if it is not quite this simple, but this
          >seems to be the gist of it...
          >
          >Jason
          >
          >
          >"Justin James" <[email protected]> wrote in message news:[email protected]...
          >>
          >> Giri,
          >>
          >> I'm not a weblogic representative, but I tried to replicate this proxing service inside a load balancing switch(BigIP) and I
          >discovered a few things. The weblogic server sets a cookie (WebLogicSession)that the webserver plugin uses to manage the proxying.
          >The cookie (found in the HTTP header information) contains encoded information about the primary and secondary application servers
          >that the session is bound too. Any web server can read the cookie to determine how to dispatch the request to the primary server.
          >If the primary server does not respond, the request is forwarded to the secondary server by the plugin. Regardless of cluster size,
          >the session is replicated to only one other server.
          >>
          >> <[email protected]> wrote:
          >> >Giri Alwar wrote:
          >> >
          >> >> I need a couple of clarifications. First with regard to Question 1, I understand that plugins provide load balancing and
          >failover but what I really was asking is how the plugin in WS2 knows that a session for the client has been initiated in AS1 as a
          >result of WS1 sending the initial request to AS1. If WS2 gets a future request from the client, it needs to know this to send the
          >request to AS1. Does the plugin talk to the cluster to find out if there is a primary and who it is?
          >> >>
          >> >
          >> >> I should have clarified that my other questions pertain to in-memory replication. If I do not persist the session in a database
          >then does the client get an error message (timeout) when AS1 goes down (assuming we use NES with the WebLogic plugin)?
          >> >
          >> >Plugins' know how to route requests based on cookies. If it can't reach the primary server it will automatically try secondary.
          >In your case it doesn't matter if it reaches to proxy 1 or proxy 2, it is still the same.
          >> >
          >> >- Prasad
          >> >
          >> >> To prevent this error message and achieve failover, do I need to use WebLogic as the proxy server? If so, why isn't the NES
          >plugin doing this?
          >> >
          >> >> Thanks.
          >> >> Giri
          >> >>
          >> >> Prasad Peddada <[email protected]> wrote:
          >> >> >Giri Alwar wrote:
          >> >> >
          >> >> >> Let's say that we have two WebServers (NES) with the weblogic plugin (say WS1 and WS2) and a cluster with two
          >WebLogicCommerce AppServers (say AS1 and AS2). Let's assume that each WebServer and AppServer runs on its own machine (total: 4
          >machines). Now, let's assume that the WebServer "obj.conf" files (on both WS1 and WS2) are setup so that they point to the servers
          >in the cluster (WebLogicCluster="AS1:7601,AS2:7601").
          >> >> >>
          >> >> >> When a new request comes in to one of the WebServers (say WS1), the plugin will route it to one of the AppServers using
          >Round-Robin (say AS1). A session will now be initiated in AS1 and it sends a response back to the client.
          >> >> >>
          >> >> >> Question 1: How does the other proxy in WS2 know that all future requests for this client need to be forwarded to AS1?
          >> >> >
          >> >> > Plugin takes care of load balancing and failover, it is all transparent to the client.
          >> >> >
          >> >> >
          >> >> >> Question 2: For failover, does the cluster automatically replicate the session state existing in AS1 onto AS2 before sending
          >the response (does AS2 automatically become the secondary)?
          >> >> >
          >> >> > If you have only two yes it is automatically your secondary. Yes, replication is synchronous.
          >> >> >
          >> >> >>
          >> >> >> Now let's assume that AS1 crashes/dies. When the next request from the client comes to WS1 or WS2, they will forward it to
          >AS1 (assuming that WS2 knows about the client session in AS1) . Since AS1 has crashed, will the client eventually get a timeout
          >error message?
          >> >> >
          >> >> > If you are using some kind of persistence then you will be able to retrieve the session information and since the server
          >is not available the request will automatically failover.
          >> >> >
          >> >> >> Question 3: To ensure that the session failover happens so that AS2 gets the request instead (becomes the primary), do we
          >need to setup a WebLogic Proxy Server? If so, why can't the plugins for NES provide the failover themselves?
          >> >> >
          >> >> > No, you need only one. Either NES or weblogic proxy.
          >> >> >
          >> >> >
          >> >> >> Thank you very much for your help!
          >> >> >> Giri
          >> >> >
          >> >> >- Prasad
          >> >> >
          >> >
          >>
          >
          >
          

Similar Messages

  • How to achieve session failover when clustering tomcat6

    Hi ,
    I have followed SAP KB 1529429 - How to create a Tomcat cluster with LBR as load balancer and BusinessObjects Enterprise XI 3.1.
    when I am shutting down one tomcat automatically the user is being throwed out of the session.
    Regards,
    Saikrishna

    Gi,
    sure, you can. This task is out of Scope of the SAP BI Product Suite and has to be achieved only on Tomcat Level.
    You wont get any Support from SAP for this.
    Please refer to the official Tomcat Documentation.
    Apache Tomcat 7 (7.0.52) - Clustering/Session Replication HOW-TO
    Regards
    -Seb.

  • Are Session Persistence And Clustering Inter-related?

    Hi,
              I'm attempting to set up session persistence (via jdbc) on WL 4.03. I have
              configured weblogic.properties according to the admin guide, and I've
              written a very simple test servlet. However, whenever I attempt to save a
              value with session.putValue(), the following exception is thrown:
              "java.rmi.RemoteException: javax.ejb.FinderException: Refresh:
              ClusteredSession:
              308978692445-1/-1094565652488309727/-1062731518/4/7011/7011/7012/7012 not
              found"
              The WL instance I am using is not part of a cluster. Is clustering
              required for session persistence? If not, should I be using something other
              than the normal HttpSession class?
              Thanks,
              John
              

    Please disregard. The problem was due to an error in the definition of the
              WL_SERVLET_SESSIONS table.
              

  • Load balancing, failover and fallback in Non-Clustered WebLogic environment

    hi,
    Has anyone implemented WebLogic 10.3.3 (or 10.3.4) in a Non-Clustered environment, but also got load balancing, failover and fallback work?
    We were successful in getting failover working using t3://server1:7001,server2:7002 provider URL, but not load balancing or fallback.
    The fallback is working when it was connecting to server2 and if we kill server2, then it switches to server1, but not when server2 is still running while server1 comes back.
    All we need to find a way to enforce fallback to primary site, even if secondary which the client connected is still up and running and primary site comes back.
    Any help appreciated.
    Thanks.
    Best regards,
    Bala

    hi,
    Has anyone implemented WebLogic 10.3.3 (or 10.3.4) in a Non-Clustered environment, but also got load balancing, failover and fallback work?
    We were successful in getting failover working using t3://server1:7001,server2:7002 provider URL, but not load balancing or fallback.
    The fallback is working when it was connecting to server2 and if we kill server2, then it switches to server1, but not when server2 is still running while server1 comes back.
    All we need to find a way to enforce fallback to primary site, even if secondary which the client connected is still up and running and primary site comes back.
    Any help appreciated.
    Thanks.
    Best regards,
    Bala

  • Need recommendation - iis with two physical servers and clusters

    Hello,
    I was hoping to get a recommendation/opinion or two on the configuration I've inherited. I'm looking
    at the following configuration using weblogic 8.1 sp4 server (to be upgraded to sp6) running on two physical machines:
    MachineA:
    Domain: myDomain
    Cluster: cluster1
    Servers: Admin Server:9001 (not part of cluster)
    ManagedServer1:7001
    ManagedServer2:7010
    MachineB:
    Domain: myDomain
    Cluster: cluster2
    Servers: Admin Server:9001 (not part of cluster)
    ManagedServer3:7001
    ManagedServer4:7010
    On MachineA: IIS Proxy Plugin with parameter in .ini file
    WeblogicCluster: MachineA:7001, MachineA:7010, MachineB:7001,MachineB7010
    Naturally, the IIS is acting as a round robin load balancer..
    The domains were created using the wizard on both machines and basic domain template..
    For proper failover to be taken advantage of, does something different need to be configured? Or is it fine?
    And if so, does group replication have something to do with it?
    Should either of the clusters be Managed Servers across physical machines?
    or should this just be one cluster of 4 managed servers across two machines?
    I really am not sure on any of this, even though i've read through much of the documentation for clustering..twice.
    I should mention that there is only a .war file deployed with 4 connection pools and 4 Data Sources..No EJBs or JMS
    Would really appreciate any feedback or opinions/advice..
    Thanks

    This is what I'd do
    MachineA:
    Domain: myDomain
    Cluster: cluster1
    Servers: Admin Server:9001 (not part of cluster)
    ManagedServer1:7010
    ManagedServer2:7020
    MachineB:
    Domain: myDomain
    Cluster: cluster2
    Servers: Admin Server:9001 (not part of cluster)
    ManagedServer3:8010
    ManagedServer4:8020
    I just changed the port numbers so they flow and have a pattern - 70* port numbers belong to cluster 1, 80* port numbers belong to cluster 2. No technical benefit apart from it makes it tidier in my opinion.
    Port 9001 for the admin server is normally the domain wide admin port - you could be using that, so that's fine, but my admin server is running 7001.
    You also only need one admin server per domain, this can run on MachineA
    Replication groups are used to help WLS figure out where to place the secondary http session. It will try servers on a different machine/replication group first, if none available, it will create secondary on the same machine.
    What you will end up with is a domain with 4 managed servers in it. The admin server will run on machineA, say using port 7001, each of the managed servers will contact the admin server to download it's config.
    The cluster1 will contain 2 managed servers and the same for cluster2.
    providing you have your cluster multicast addresses set up and the cluster is working, that should be all you need to do for the session failover.
    There's some BEA sample code somewhere which will deploy a web-app and show which managed server you've attached to. If you find that and then connect through IIS, shut down the server that the JSP tells you, you should be able to see the session fail-over nicely.
    Hope that helps,
    Pete

  • Types of session persistence in clustering

    does anybody know what are the types of session persistence in clustering(In-memory replication,Database persistence etc..)
    what is the advantages and disadvantages of each type?
    we r using oracle appserver 10.1.2.

    Hi,
    HttpSession replication is little different from JNDI replication. In JNDI replication the JNDI objects are binded(Replicated) to all the members JNDI tree. But in case of Http Session Replication the HttpSession Object gets binded only to the Primary and Secondary JVM (WebLogic Instances). So if both Promary and Secondary WebLogic Server Goes Down then it is *"DISASTER"* and you cannot prevent the Disasters when it happens.
    But you can minimize the Disaster effects by chosing *"Using Replication Groups"*...It means you can decide in which all nodes of the cluster you want your Secondary HttpSession should be replicated.... Please refer to : http://download.oracle.com/docs/cd/E12840_01/wls/docs103/cluster/failover.html
    By default, WebLogic Server attempts to create session state replicas on a different machine than the one that hosts the primary session state. You can further control where secondary states are placed using replication groups. A replication group is a preferred list of clustered servers to be used for storing session state replicas. Using the WebLogic Server Console, you can define unique machine names that will host individual server instances. These machine names can be associated with new WebLogic Server instances to identify where the servers reside in your system..
    Thanks
    Jay SenSharma
    http://middlewaremagic.com/weblogic/?p=2649  (Middleware Magic Is Here)

  • Jaas loginContext and Clustering

    We are using jaas for authentication and authorization.
    We store the jaas loginContext in the http session in order to use the loginContext to call .logout() . Now we want to use clustering and the loginContext is not serializable.
    How can I get access to the loginContext in order to call loginContext.logout() without storing it in the httpSession?
    or How can I do clustering with http session failover if the loginContext is stored in the http session ?

    What happened to your other thread on this same issue?

  • T3 protocol and clusters

    Hi,
              I'm porting a Java application running against WLS6.0 to use a clustered
              server solution. This means I connect via t3 protocol. Any views on the best
              way to get failover and loadbalancing from this approach, for example is
              there anyway I can get the weblogic proxy functionality of
              HttpClusterServlet without using http protocol?
              Thanks
              Sioux
              

    Your web.xml looks OK to me.
              All you need to do is, create a .war file and copy it into applications
              directory of proxy server.
              Then register this webapp as default webapp. So whenever you hit proxy server ,
              those requests
              will be handled by this default webapp, in turn the requests will be routed to
              one of the clustered servers.
              Hope it helps
              Kumar
              Sioux France wrote:
              > Hi,
              > I understand this solution, can I ask about the possibility of using a
              > proxy?
              > Is it possible if my URL is t3://localhost:7001 and I now want to use a
              > proxy on this server to redirect to the cluster to use HttpClusterServlet
              > rather than a DNS based solution? If so what do I call to get the proxy to
              > redirect me to the cluster?
              > I've set up a servlet for HttpClusterServlet with my cluster members in the
              > parameters. How can I test from a browser that this is proxying correctly?
              > For the t3 protocol is it possible to get redirection to the cluster members
              > using HttpClusterServlet from a command line client, or is this route only
              > available for web-based queries as that is the only way the
              > HttpClusterServlet can intercept the call? i.e. Must I use my own failover
              > implementation in a DNS-based solution as discussed below?
              >
              > Here's the web.xml for my HttpClusterServlet which I've set as my default
              > webserver on the admin server. Any help understanding this appreciated!
              > Sioux
              >
              > <web-app>
              > <servlet>
              > <servlet-name>HttpClusterServlet</servlet-name>
              > <servlet-class>
              > weblogic.servlet.internal.HttpClusterServlet
              > </servlet-class>
              >
              > <init-param>
              > <param-name>defaultServers</param-name>
              > <param-value>
              > managedserver1:7003:7004|managedserver2:7003:7004
              > </param-value>
              > </init-param>
              >
              > <init-param>
              > <param-name>DebugConfigInfo</param-name>
              > <param-value>ON</param-value>
              > </init-param>
              >
              > </servlet>
              > <servlet-mapping>
              > <servlet-name>HttpClusterServlet</servlet-name>
              > <url-pattern>/</url-pattern>
              > </servlet-mapping>
              >
              > <!-- This bit is just to show it's deployed, and sure enough, it can't find
              > index.html when I call http://localhost:7001 now -->
              > <servlet-mapping>
              > <servlet-name>HttpClusterServlet</servlet-name>
              > <url-pattern>*.html</url-pattern>
              > </servlet-mapping>
              >
              > </web-app>
              >
              > "Robert Patrick" <[email protected]> wrote in message
              > news:[email protected]...
              > > The connection to the cluster is done via the JNDI lookup. The
              > PROVIDER_URL
              > > should be the "cluster name" which is either a DNS name that is mapped to
              > the
              > > list of IP addresses of the clustered servers or a hardware load-balancer.
              > Once
              > > that connection has been made, you will be looking up EJB Home objects --
              > the
              > > objects downloaded to your client are "smart stubs" that understand
              > clustering.
              > > Multiple invocations on that EJBHome reference will be load-balanced
              > across the
              > > cluster of available servers (meaning that it will handle fail-over).
              > This is
              > > easy to do since the EJBHome object is always stateless. If you use
              > stateless
              > > session beans, you can get the same behavior at the bean instance level.
              > > Stateful session beans can be replicated in-memory across a pair of server
              > > instances (much like the HttpSession replication).
              > >
              > > I suggest that you read our clustering documentation at
              > > http://e-docs.bea.com/wls/docs60/
              > >
              > > Hope this helps,
              > > Robert
              > >
              > > Sioux France wrote:
              > >
              > > > I think my point is missed, I have a lovely running cluster, with
              > clustered
              > > > EJBs, clustered JMS and now I want to call it via the t3 protocol or
              > > > something similar from a Java Application. As I understand this, it
              > means I
              > > > can't use HTTP or a proxy. I order to utilise the failover/loadbalancing
              > of
              > > > the cluster that exists, how should I connect to it from the client, can
              > I
              > > > use DNS, RMI, is there any documentation for running a cluster with Java
              > > > Application clients rather than a web front end?
              > > >
              > > > "Robert Patrick" <[email protected]> wrote in message
              > > > news:[email protected]...
              > > > > Use clustered EJBs.
              > > > >
              > > > > Sioux France wrote:
              > > > >
              > > > > > Hi,
              > > > > > I'm porting a Java application running against WLS6.0 to use a
              > clustered
              > > > > > server solution. This means I connect via t3 protocol. Any views on
              > the
              > > > best
              > > > > > way to get failover and loadbalancing from this approach, for
              > example is
              > > > > > there anyway I can get the weblogic proxy functionality of
              > > > > > HttpClusterServlet without using http protocol?
              > > > > > Thanks
              > > > > > Sioux
              > > > >
              > >
              

  • Connection failover and transaction failover

    Connection failover and transaction failover
    I need to know more about a behavior in a RAC cluster. When a node goes down that is executing one of my transaction through JDBC , does the connection and transaction failover to a new node without me needing to restart tran or reconnect ?
    Please provide some insight
    Thanks

    Transactions are NOT automatically rolled back. The application must do this otherwise the session will get disconnected.
    If you code TAF, all sessions will failover to the backup connection. You can specify that select statements are automatically re-executed after the failover. Insert/update/delete transactions must be explicitly rolled back and resubmitted by the application.
    IF you are using an ORacle Connection pool, the connection pool will automatically cleanup connections to the failed instance, abort inflight transactions. The application will either retry or it will propagate the error to the end user.
    See the whitepaper on the OTN RAC page (otn.oracle.com/rac) Workload Management with Oracle RAC for more information.

  • Session-failover-enabled not working in iWS6 with a FileStore

    I'm trying to use a FileStore to implement session persistence using IWSSessionManager. I have the following in my web-apps.xml:
    <web-app uri="/Banking" dir="c:/java/online">
    <session-manager class='com.iplanet.server.http.session.IWSSessionManager'>
    <init-param>
    <param-name>session-data-store</param-name>
    <param-value>com.iplanet.server.http.session.FileStore</param-value>
    </init-param>
    <init-param>
    <param-name>session-data-dir</param-name>
    <param-value>c:/iplanet/servers/SessionData</param-value>
    </init-param>
    <init-param>
    <param-name>session-failover-enabled</param-name>
    <param-value>false</param-value>
    </init-param>
    </session-manager>
    </web-app>
    I'm seeing the following exception in my log:
    [12/Jun/2002:10:10:56] info ( 320): java.io.NotSerializableException: com.iplanet.server.http.servlet.WebApplication
    at java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1148)
    at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:366)
    at java.io.ObjectOutputStream.outputClassFields(ObjectOutputStream.java:1827)
    at java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:480)
    at java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1214)
    at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:366)
    at java.io.ObjectOutputStream.outputClassFields(ObjectOutputStream.java:1827)
    at java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:480)
    at java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1214)
    at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:366)
    at java.util.Hashtable.writeObject(Hashtable.java:764)
    at java.lang.reflect.Method.invoke(Native Method)
    at java.io.ObjectOutputStream.invokeObjectWriter(ObjectOutputStream.java:1864)
    at java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1210)
    at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:366)
    at com.iplanet.server.http.session.IWSHttpSession.writeObject(IWSHttpSession.java:764)
    at java.lang.reflect.Method.invoke(Native Method)
    at java.io.ObjectOutputStream.invokeObjectWriter(ObjectOutputStream.java:1864)
    at java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1210)
    at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:366)
    at com.iplanet.server.http.session.FileStore.save(FileStore.java:167)
    at com.iplanet.server.http.session.IWSSessionManager.update(IWSSessionManager.java:499)
    at com.iplanet.server.http.servlet.NSHttpServletRequest.closeInputStream (NSHttpServletRequest.java:612)
    at com.iplanet.server.http.servlet.NSServletRunner.servicePostProcess(NSServletRunner.java:857)
    at com.iplanet.server.http.servlet.NSServletRunner.invokeServletService(NSServletRunner.java:942)
    at com.iplanet.server.http.servlet.WebApplication.service(WebApplication.java:1065)
    at com.iplanet.server.http.servlet.NSServletRunner.ServiceWebApp(NSServletRunner.java:959)
    Any ideas what's wrong?
    I should note that I don't think it is because I am storing non-serializable things in the session attributes. I think this because originally I was getting an exception that said that a specific attribute wasn't serializable. I changed the class definition of the class I was storing in that attribute to include "implements java.io.Serializable" and that problem went away.

    Hi Sija,
    Can i have detailed scenario in your cluster configuration.
    Means you are saying that going to start cluster package manually, if it is right please make sure that you had the same copy of start, instance profiles of NodeA to Node B. Means you need to maintain two startup, two instance profiles for both nodes. In a normal situation it will picik the profile of node A to start databse from A node. But in a failover situation it will not pick node A profile to start, it should pick Node B s profiles.
    Just make a copy from node A and change the profile name accordingly to Node b. Then try to restart.
    Regards
    Nick Loy

  • HADB session failover & realm problem

    I have a enterprise applicaiton server cluster configured for loadbalancing and session failover.
    I installed HADB.
    HADB works, I test with the webapp from the samples of the application server:
    I add some attribute in session, I see which node executed the request, I stop the node.
    The other requesto go to the other node and the session is reloaded as it was on the stopped node.
    The problem I have is with app with realms authentication.
    I can login without problem on the first node.
    I stop the server handling the request and when switched to the other server I have to login again if I request a realm protected URL again.
    Any suggestion?
    Thanks in advance.

    Solved
    on Cluster configuration (in the tree of admin apps of application server):
    my-clu-config -->
       Availability Service -->
            Web Container Availability -->
                      Single-Sign-On State: Enabled.

  • Session problem on clustered sun fire with SP6.1

    Hi All,
    I am having a problem with a webapplication on a clustered system.
    In the following I describe the current system setup.
    I will then describe the setup of the web application.
    Following this, I explain the trouble I'm having with sharing sessions in this environment.
    Finally, I pose the key question.
    SYSTEM SETUP:
    Our group has a clustered server setup. I believe the two machines are Sun Fire systems running Solaris 9. Let me know if you need more information concerning the HW.
    To manage the cluster, we use Sun Cluster software. Let me know if you need to know the version number. I do not have it handy. We just recently setup the system (in the past 6 months).
    Also, we have the newest Sun Web Server installed 6.1. We used the default installation. The only thing we changed was the dynamicreloadinterval variable from "-1" to "60".
    WEB APPLICATION:
    We have a fairly simple MVC web application setup, which works well on a single-server system. Essentially, the web application (1) asks for a certain input via a webform, (2) takes this input, and uses it to get information from a database, (3) puts this information into a httpsession attribute, (4) redirects the response to a JSP. The JSP gets the httpsession attribute (populated in step 3) and prints it out.
    So, HTML with form posts to Servlet, Servlet gets data from database and populates a session attribute, JSP gets that session attribute and prints it out.
    Between each transition from HTML, Servlet and JSP, the currently processing server may switch. I.e. the HTML may be served, for instance, by ClusterServer1, the Servlet may be handled, for instance, by ClusterServer2, and the JSP may be served at random by either.
    THE TROUBLE I'M HAVING
    Sometimes, my JSP is able to find the session attribute and print out whatever I put into the session during the Servlet step. However, sometimes, the JSP will print out "null" (the session attribute isn't available to the JSP).
    For the HTML and the JSP, I have the page print out what server it is being served from. Thus, I can tell that the HTML is served from, for instance, ClusterServer1 while JSP is served from, for instance, ClusterServer2. Sometimes, the same server serves both.
    KEY QUESTIONS:
    Why would this be happening?
    How can I have a session stick to the user and be shared across both servers?
    What other information would you need to provide an answer concerning this issue?
    I appreciate your efforts very much!
    Matthias Edrich
    dailysun

    Hi All,
    Hi Elving,
    I read through the documentation and have the following questions:
    (1) It seems that I can share sessions amongst both servers if I
    configure the web server to store sessions in a persistant manner such as in a file or in a database. Is this correct?
    (2) To enable this persistent storage of a session, I would need to change the Session Manager used. Is this correct?
    (3) If yes, I have the choice between the following managers. Please correct me if I have misunderstood the options.
    - PersistentManager: Instead of securing session information
    in memory, this manager saves session information within
    a file on the server in a directory, which I specify within
    sun-web.xml
    - IWSSessionManager: With this manager, I can store sessions
    in a defined database or file on the server.
    - MMapSessionManager: This manager also stores sessions in
    a file on the server
    (4) What is the difference between PersistentManager and
    MMapSessionManager if my web server is running in
    single-process mode?
    (5) If MMapSessionManager is a file-based manager, where do I
    specify to what directory the related file is stored to as I
    do in PersistentManager?
    (6) What are the advantages and disadvantages of
    Persistent/IWS/MMap managers?
    (7) In looking at SessionManagers, am I even barking up
    the right tree? It seems like these would help me share
    sessions across clustered servers.
    (8) Finally, I guess my plan of action would be the following:
    -> Identify what session manager to use
    -> Include a sun-web.xml file in /WEB-INF containing
    the manager-specific info
    -> Reload my web application
    -> done...
    Is this correct?
    Elving, I appreciate your help. Thanks!
    dailysun

  • Access Manager 7.1 Session Failover

    Hello,
    I am trying to do a session failover with access Manager 7.1.
    My Infrastructure:
    OS: Solaris 10
    2 Solaris Servers dedicated to 4 LDAP instances (2 each)
    2 Solaris Servers dedicated to 2 LDAP Proxy servers configured to access 4 LDAP instances.
    2 Solaris Servers dedicated to 2 Sun Application Server 8.2 running 2 instances of Access Manager sharing the 4 LDAP instances through Proxy.
    2 Solaris Servers dedicated to 2 instances of JMS servers (1 on each) with Access Manager Session DB configured. JMS is running on cluster mode.
    1 Solaris server for Webserver 7.0 configured for Load Balancing (loadbalancer.xml).
    Configuration:
    2 instances of Access Manager on separate solaris boxes use the same LDAP instance(s).
    Access Manager is configured for session failover using amsfoconfig as documented.
    The Session failover instances where started as documented
    1.     Start session DB using amsfo script
    2.     Start the Access Manager instances (by Starting DAS)
    3.     Start Webserver
    My Problem:
    Session Failover does not work. The Amsession log throws
    ERROR: JMQSessionRepository.save(): failed to save Session
    java.lang.NullPointerException
    at com.iplanet.dpro.session.jmqdb.PersistSession.setString(PersistSession.java:310)
    at com.iplanet.dpro.session.jmqdb.JMQSessionRepository.save(JMQSessionRepository.java:357)
    at com.iplanet.dpro.session.service.SessionService.saveForFailover(SessionService.java:2812)
    AmSessionMonitor file continuously throws below error and fills up the disk (20 GB ) space quickly:
    04/24/2007 04:28:13:450 PM EDT: Thread[amSessionMonitor,5,main]
    WARNING: SessionMonitor runtime exception
    java.lang.NullPointerException
    at com.iplanet.dpro.session.service.SessionService.locateCurrentHostServer(SessionService.java:1762)
    at com.iplanet.dpro.session.service.SessionService.getCurrentHostServer(SessionService.java:1731)
    at com.iplanet.dpro.session.service.SessionMonitor.run(SessionMonitor.java:94)
    JMS queue Log:
    Sun Java(tm) System Message Queue 3.7
    Sun Microsystems, Inc.
    Version: 3.7 UR1 (Build 9-b)
    Compile: Sun Jun 18 22:11:21 PDT 2006
    Copyright (c) 2006 Sun Microsystems, Inc. All rights reserved.
    SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
    This product includes code licensed from RSA Data Security.
    ================================================================================
    Java Runtime: 1.5.0_09 Sun Microsystems Inc. /usr/jdk/instances/jdk1.5.0/jre
    [18/Apr/2007:09:14:28 EDT] License: Sun Java(tm) System Message Queue 3.7 UR1 Enterprise Edition
    [18/Apr/2007:09:14:29 EDT] IMQ_HOME=/
    "log.txt" 725 lines, 61600 characters
    Magic/Version: 469754818/301 Size: 116 Type: ACKNOWLEDGE(24)
    Expiration: 0 Timestamp: 1177446120954
    Source IP: 172.31.120.44(c0:ca:66:ec:a9:d5) Port: 60437 Sequence: 32
    Property Offset: 76 Property Size: 0
    Encryption: 0 Priority: 5
    Flags: consumerID: 0
    TransactionID: 0
    MessageID: 32-172.31.120.44(c0:ca:66:ec:a9:d5)-60437-1177446120954
    Properties: null
    Message Body: 40 bytes [3052053123717449216:16-172.31.120.44(b1:6a:3:39:7d:6)-60434-1177446116385]
    Internal Buffers (useDirect=false):
    Fixed Header Buffer:java.nio.HeapByteBuffer[pos=0 lim=72 cap=72]
    com.sun.messaging.jmq.jmsserver.util.BrokerException: Internal Error: Unable to complete processing acks: Unknown consumer [consumer:30520
    53123717449216, type=NONE]
    at com.sun.messaging.jmq.jmsserver.data.handlers.AckHandler.handleAcks(AckHandler.java:256)
    at com.sun.messaging.jmq.jmsserver.data.handlers.AckHandler.handle(AckHandler.java:166)
    at com.sun.messaging.jmq.jmsserver.data.PacketRouter.handleMessage(PacketRouter.java:146)
    at com.sun.messaging.jmq.jmsserver.service.imq.IMQConnection.readData(IMQConnection.java:1856)
    at com.sun.messaging.jmq.jmsserver.service.imq.IMQConnection.process(IMQConnection.java:816)
    at com.sun.messaging.jmq.jmsserver.service.imq.OperationRunnable.process(OperationRunnable.java:141)
    at com.sun.messaging.jmq.jmsserver.util.pool.BasicRunnable.run(BasicRunnable.java:459)
    at java.lang.Thread.run(Thread.java:595)
    [24/Apr/2007:16:22:05 EDT] [B1071]: Established cluster connection : testuidp02.dol.state.nj.us/172.31.120.45:7676 (aminstance)
    [24/Apr/2007:16:23:00 EDT] [B1066]: Closing: [email protected]:57590->jms:60425 because "[B0061]: Client exited without closing con
    nections". Count=1
    [24/Apr/2007:16:24:37 EDT] [B1065]: Accepting: [email protected]:42435->jms:60425. Count=2
    [24/Apr/2007:16:26:15 EDT] [B1066]: Closing: [email protected]:42435->jms:60425 because "[B0061]: Client exited without closing con
    nections". Count=1
    Access Manager via load balancer web server works fine with out session failover configuration.
    I noticed through forums that Accessmanager 2005Q4 had similar problem and was fixed with a patch.
    Will somebody please help who has done session failover with AM7.1?
    Thanks
    Kris

    Yep, that was me struggling with 2005Q4 before they released a patch (120954-03 if I am not mistaken).
    1. Have you configured your AM installation as a site?
    2. Have you added a secondary configuration in the session tab?
    A restart will be required after that. Try setting log levels to debug. When AM webserver comes up and brings the application live, you'll see information regarding the secondary configuration, and whether things are actually in place or not.
    Hope this helps.
    Ankush
    http://www.iamcg.net

  • No Auto-Update for To Do list, session message and toast message

    After LC ES Server hardening, we noticed that auto-update is not working for To Do list, session message and new task notification toast message. Before server hardening, all of them are still working fine.
    Does anyone know why auto-update is not working after server hardening? Is there any specific port numbers which need to be enabled/opened to solve this issue?
    FYI, we also noticed that some RemoteEventClient error messages occur many times in jboss server.log file as the following:
    --- LOG QUOTE START ---
    2008-01-10 15:26:16,086 INFO [STDOUT]
    GMS: address is neptune:[MULTIPLE VARIOUS PORT NO]
    2008-01-10 15:26:19,398 INFO [com.adobe.livecycle.remoteevents.client.RemoteEventClient] Client JGroup initialization failed to connect to service JGroup. Service JGroup initialization may not be complete, retrying...
    2008-01-10 15:26:20,414 INFO [com.adobe.livecycle.remoteevents.client.RemoteEventClient] com.adobe.livecycle.remoteevents.client.RemoteEventClient$RemoteEventReceiver using JGroups config UDP(bind_addr=10.77.250.248;mcast_addr=238.42.102.134;mcast_port=42707;ip_ttl=8):PING(tim eout=3000;num_initial_members=6):FD(timeout=3000):VERIFY_SUSPECT(timeout=1500):pbcast.NAKA CK(gc_lag=10;retransmit_timeout=600,1200,2400,4800):UNICAST(timeout=600,1200,2400,4800):pb cast.STABLE(desired_avg_gossip=10000):FRAG:pbcast.GMS(join_timeout=5000;join_retry_timeout =2000;shun=true;print_local_addr=true):VIEW_ENFORCER
    2008-01-10 15:28:21,216 INFO [STDOUT]
    GMS: address is neptune:3874
    2008-01-10 15:28:24,528 ERROR [com.adobe.livecycle.remoteevents.client.RemoteEventClient] Client JGroup initialization failed to connect to service JGroup. Maximum retries exceeded.
    2008-01-10 15:28:24,528 INFO [STDOUT] Jan 10, 2008 3:28:24 PM com.adobe.workspace.events.RemoteEventClientLifeCycle$RemoteEventInitThread run
    SEVERE: null
    com.adobe.livecycle.remoteevents.client.RemoteEventConnectionFailedException
    at com.adobe.livecycle.remoteevents.client.RemoteEventClient$RemoteEventReceiver.<init>(Remo teEventClient.java:213)
    at com.adobe.livecycle.remoteevents.client.RemoteEventClient$RemoteEventReceiver.getReceiver (RemoteEventClient.java:159)
    at com.adobe.livecycle.remoteevents.client.RemoteEventClient.<init>(RemoteEventClient.java:3 61)
    at com.adobe.workspace.events.RemoteEventClientLifeCycle$RemoteEventInitThread.run(RemoteEve ntClientLifeCycle.java:65)
    at java.lang.Thread.run(Thread.java:595)
    --- LOG QUOTE END ---

    JGroups is an open source project that allows processes to send messages to one another. LiveCycle data services uses it for its messaging implementation (basically it configures the server to multicast messages to all the listening clients...even in a clustered environment across different LAN/WAN).
    In most cases the default configuration will work fine, the problem is that if you are running a firewall on the server (or your local machine...i.e. windows firewall) the ports that JGroups uses for its communications can be blocked. In a local environment its easy enough to disable windows firewall and bounce your server to get things working.
    In a production environment you need to open the ports that JGroups is using. These settings are in the Global Administration settings (as mentioned by WorkspaceUser above). If you export it and look at the JChannelConnectionProperties you'll see the ports its using and you can set your firewall to allow communication to those ports.
    Bryan

  • Sun Access Manager 2005Q1 session failover is not working

    Hi All
    I m using Sun access manager 2005Q1,message queue 2005Q1, Sun Directory server 5.2 ,BerkelyDb 4.2.52 and radware hardware load balancer with sticky session.
    I m have configured message queue and BerkeleyDB and both are running with any error.
    I m using http://docs.sun.com/source/817-7644/ch5_scenarios.html#wp41008 doc for session failover.
    Simple failover is working fine but the Session failover is not working.
    Any body has done session failover with Sun Access manager 2005 Q1 I m trying to resolve this issue last two month.
    Please it is urgent.

    It works fine in 2005Q4, after applying a patch 120954 if I am not mistaken. But 2005Q4 and 2005Q1 are probably different in terms of session failover (site configuration etc.)
    1. Stop both AM servers
    2. Set logging to debug mode in AMConfig.properties.
    3. Delete / move everything in /var/opt/SUNWam/debug
    4. tail -f /var/opt/SUNWam/debug/amSession
    5. Post that file here... you should be able to see if session failover is enabled etc....
    hope this helps.

Maybe you are looking for