1 Reply Latest reply on Mar 4, 2012 10:14 PM by daltonwest

    JVMRoute not apending to cookies or showing in jmx-console

    daltonwest Newbie

      Using Jboss AS 5.1, I have created a clustered web profile which all looks fine. The issue I face is with the JVMRoute property in server.xml under deploy/jbossweb.sar not appending to cookies or appearing in the jmx-console view. Sticky sessions are not working.

      We are running a number of 5.0 profiles with sticky sessions working without a problem, but this is quite perplexing.

      We are using mod_proxy for the Apache config, but this does not seem relevant as Jboss is not appending its node name to the outgoing cookies. We have used the same load balance Apache config with 5.0 profiles with success.

      I am tearing my hair out with this, as it should be simple, but I cannot track it down.

        • 1. Re: JVMRoute not apending to cookies or showing in jmx-console
          daltonwest Newbie

          After uncommenting out the '<Valve className="org.apache.catalina.valves.RequestDumperValve" />' line in server.xml, I can see that two cookies are being sent out, as shown below:

           

          2012-03-05 14:01:47,237 INFO  [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] (http-?) REQUEST URI       =/jmx-console/
          2012-03-05 14:01:47,257 INFO  [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] (http-?)           authType=null
          2012-03-05 14:01:47,258 INFO  [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] (http-?)  characterEncoding=null
          2012-03-05 14:01:47,258 INFO  [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] (http-?)      contentLength=-1
          2012-03-05 14:01:47,259 INFO  [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] (http-?)        contentType=null
          2012-03-05 14:01:47,259 INFO  [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] (http-?)        contextPath=/jmx-console
          2012-03-05 14:01:47,259 INFO  [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] (http-?)             cookie=JSESSIONID=C3B3EC2A018CD6E2D121A5BC94A7A242.node2
          2012-03-05 14:01:47,259 INFO  [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] (http-?)             cookie=JSESSIONID=CF79C553F57A4532F1035B8C2129B8E4
          2012-03-05 14:01:47,262 INFO  [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] (http-?)             header=accept=*/*
          2012-03-05 14:01:47,262 INFO  [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] (http-?)             header=accept-language=en-AU
          2012-03-05 14:01:47,262 INFO  [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] (http-?)             header=user-agent=Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/4.0; chromeframe/17.0.963.56; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729)
          2012-03-05 14:01:47,262 INFO  [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] (http-?)             header=accept-encoding=gzip, deflate
          2012-03-05 14:01:47,262 INFO  [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] (http-?)             header=host=?

          2012-03-05 14:01:47,262 INFO  [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] (http-?)             header=connection=Keep-Alive
          2012-03-05 14:01:47,262 INFO  [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] (http-?)             header=cookie=JSESSIONID=C3B3EC2A018CD6E2D121A5BC94A7A242.node2; JSESSIONID=CF79C553F57A4532F1035B8C2129B8E4
          2012-03-05 14:01:47,262 INFO  [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] (http-?)             header=authorization=Basic YWRtaW46YWRtaW4=
          2012-03-05 14:01:47,263 INFO  [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] (http-?)             locale=en_AU
          2012-03-05 14:01:47,263 INFO  [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] (http-?)             method=GET
          2012-03-05 14:01:47,264 INFO  [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] (http-?)           pathInfo=null
          2012-03-05 14:01:47,264 INFO  [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] (http-?)           protocol=HTTP/1.1
          2012-03-05 14:01:47,264 INFO  [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] (http-?)        queryString=null
          2012-03-05 14:01:47,264 INFO  [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] (http-?)         remoteAddr=?

          2012-03-05 14:01:47,264 INFO  [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] (http-?)         remoteHost=?

          2012-03-05 14:01:47,264 INFO  [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] (http-?)         remoteUser=null
          2012-03-05 14:01:47,264 INFO  [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] (http-?) requestedSessionId=CF79C553F57A4532F1035B8C2129B8E4
          2012-03-05 14:01:47,264 INFO  [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] (http-?)             scheme=http
          2012-03-05 14:01:47,264 INFO  [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] (http-?)         serverName=?

          2012-03-05 14:01:47,264 INFO  [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] (http-?)         serverPort=?

          2012-03-05 14:01:47,264 INFO  [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] (http-?)        servletPath=/index.jsp
          2012-03-05 14:01:47,264 INFO  [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] (http-?)           isSecure=false
          2012-03-05 14:01:47,264 INFO  [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] (http-?) ---------------------------------------------------------------


          .
          This seems strange, as on working jvmRoute nodes (Jboss 5.0) only one cookie is in the logs, see below:

           

          2012-03-05 14:06:49,770 INFO  [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] (http-?) REQUEST URI=/jmx-console/
          2012-03-05 14:06:49,791 INFO  [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] (http-?)           authType=null
          2012-03-05 14:06:49,793 INFO  [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] (http-?)  characterEncoding=null
          2012-03-05 14:06:49,793 INFO  [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] (http-?)      contentLength=-1
          2012-03-05 14:06:49,793 INFO  [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] (http-?)        contentType=null
          2012-03-05 14:06:49,793 INFO  [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] (http-?)        contextPath=/jmx-console
          2012-03-05 14:06:49,795 INFO  [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] (http-?)             cookie=JSESSIONID=A66781543ABBC7F32B99EE88DAA68182.node2
          2012-03-05 14:06:49,798 INFO  [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] (http-?)             header=accept=application/x-ms-application, image/jpeg, application/xaml+xml, image/gif, image/pjpeg, application/x-ms-xbap, application/msword, application/vnd.ms-excel, application/vnd.ms-powerpoint, */*
          2012-03-05 14:06:49,798 INFO  [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] (http-?)             header=accept-language=en-AU
          2012-03-05 14:06:49,798 INFO  [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] (http-?)             header=user-agent=Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/4.0; chromeframe/17.0.963.56; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729)
          2012-03-05 14:06:49,798 INFO  [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] (http-?)             header=accept-encoding=gzip, deflate
          2012-03-05 14:06:49,798 INFO  [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] (http-?)             header=host=?

          2012-03-05 14:06:49,799 INFO  [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] (http-?)             header=connection=K eep-Alive
          2012-03-05 14:06:49,799 INFO  [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] (http-?)             header=cookie=JSESS IONID=A66781543ABBC7F32B99EE88DAA68182.node2
          2012-03-05 14:06:49,799 INFO  [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] (http-?)             locale=en_AU
          2012-03-05 14:06:49,799 INFO  [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] (http-?)             method=GET
          2012-03-05 14:06:49,801 INFO  [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] (http-?)           pathInfo=null
          2012-03-05 14:06:49,801 INFO  [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] (http-?)           protocol=HTTP/1.1
          2012-03-05 14:06:49,801 INFO  [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] (http-?)        queryString=null
          2012-03-05 14:06:49,801 INFO  [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] (http-?)         remoteAddr=?

          2012-03-05 14:06:49,801 INFO  [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] (http-?)         remoteHost=?

          2012-03-05 14:06:49,801 INFO  [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] (http-?)         remoteUser=null
          2012-03-05 14:06:49,802 INFO  [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] (http-?) requestedSessionId=A66781543ABBC7F32B99EE88DAA68182.node2
          2012-03-05 14:06:49,802 INFO  [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] (http-?)             scheme=http
          2012-03-05 14:06:49,802 INFO  [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] (http-?)         serverName=?

          2012-03-05 14:06:49,802 INFO  [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] (http-?)         serverPort=?

          2012-03-05 14:06:49,802 INFO  [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] (http-?)        servletPath=/index.jsp
          2012-03-05 14:06:49,802 INFO  [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] (http-?)           isSecure=false
          2012-03-05 14:06:49,802 INFO  [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] (http-?) -------------------------------               --------------------------------

           

           

          has anyone ever seen two cookies being generated?