0 Replies Latest reply on Jun 25, 2007 4:54 PM by ddai

    problems with session replication

    ddai Newbie

      I followed the steps in document and Wiki in doing this but it just doesn't work to me at all. I an just wondering if I missed something.

      First of all, the sticky session part is working perfectly for me. So I think I set the loadbalancer correctly

      Then, I changed the sticiky session varaible in the worker.propties to 0, added the tag to the web.xml and created the jboss-web.xml in web-inf. Here is what that fille looks like:
      ------------------------------------------------------------------------------
      <?xml version="1.0" encoding="UTF-8"?>
      <jboss-web version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">

      <replication-config>
      <replication-granularity>SESSION</replication-granularity>
      <replication-trigger>SET_AND_NON_PRIMITIVE_GET</replication trigger>
      </replication-config>

      </jboss-web>
      ------------------------------------------------------------------------------

      Is it all I need to do? Did I get them right?

      Then I started two JBoss servers on two separate machines and run the application. 3 kinds of problems show up.

      1. It seems all the requests only go to one server while leave the other one untouched.

      2. "Session Expire"
      I still cannot get rid of it. Isn't the session information supposed to be duplicated across all the nodes within the same cluster this time?? What makes thing worse is that the problem pops up irregularly. Sometimes, it shows up right after I log in. Sometimes, it looks good for the first several steps, but it still shows up in the end. It is totally irregular so that I have no clue how to track down the problem

      3. Exceptions
      Sometime before the session expires, a webpage showing all the exceptions will show up. The exceptions are like:

      ------------------------------------------------------------------------------
      HTTP Status 500 -


      type Exception report

      message

      description The server encountered an internal error () that prevented it from fulfilling this request.

      exception

      org.apache.jasper.JasperException: setAttribute: Non-serializable attribute
      org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:512)
      org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:395)
      org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
      org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
      InputValidationFilter.doFilter(InputValidationFilter.java:54)
      org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)


      root cause

      java.lang.IllegalArgumentException: setAttribute: Non-serializable attribute
      org.jboss.web.tomcat.tc5.session.ClusteredSession.setAttribute(ClusteredSession.java:532)
      org.apache.catalina.session.StandardSessionFacade.setAttribute(StandardSessionFacade.java:129)
      org.apache.jsp.gcsMenu_jsp._jspService(gcsMenu_jsp.java:450)
      org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
      org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:334)
      org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
      org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
      InputValidationFilter.doFilter(InputValidationFilter.java:54)
      org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)


      note The full stack trace of the root cause is available in the Apache Tomcat/5.5.20 logs.

      Apache Tomcat/5.5.20
      -----------------------------------------------------------------------------------

      My JBoss version is 4.0.5GA. My web server is IIS v 6.0.

      I would say I have killed myself doing this these days. I am a new comer to JBoss, so any clue on what's happening here will be highly appreciated.

      Thanks!!