5 Replies Latest reply on Nov 27, 2013 9:50 AM by prahari

    mod_jk with jboss 7 mode domain

    carlosbg

      Hello everyone.

       

      I have a problem with load balancing on two jboss-eap-6.1 (7.2.0.Final) in a solaris 10 domain mode started. The rolling performed by mod_jk follows:

       

      worker.master:server-two.type = ajp13

      worker.master:server-two.host = 10.16.40.161

      worker.master:server-two.connect_timeout = 10000

      worker.master:server-two.prepost_timeout = 5000

      worker.master:server-two.socket_timeout = 20

      worker.master:server-two.connection_pool_timeout = 600

      worker.master:server-two.port = 8159

       

       

      worker.host1:server-two.type = ajp13

      worker.host1:server-two.host = 10.16.40.24

      worker.host1:server-two.connect_timeout = 10000

      worker.host1:server-two.prepost_timeout = 5000

      worker.host1:server-two.socket_timeout = 20

      worker.host1:server-two.connection_pool_timeout = 600

      worker.host1:server-two.port = 8159

       

      worker.jboss7b.type = lb

      worker.jboss7b.balance_workers = master:server-two, host1:server-two

      worker.jboss7b.sticky_session = 0

       

      I made all kinds of changes in the domain.xml. I try to go by the node that has the session using the following line:

       

      <subsystem xmlns="urn:jboss:domain:web:1.4" default-virtual-server="default-host" native="false" instance-id="${jboss.node.name}">

       

      The problem is that when I have a node started the application works without problem, but when I boot both instances the apache redirects requests constantly.

       

      Does anyone know what I'm doing wrong?

       

      Thank you very much.

        • 1. Re: mod_jk with jboss 7 mode domain
          pferraro

          What do you mean by "apache redirects requests constantly"?  I see that you have sticky sessions disabled.  This means that requests for the same session won't stick to a specific node, but can bounce around to any node in your cluster.  We don't recommend this for stateful applications.

          • 2. Re: mod_jk with jboss 7 mode domain
            carlosbg

            Hi Paul.

            I changed the session stick, but the problem continuous . A request I make the server always throws me in this message in the access logs APACHE(to say that between apache and jboss is a Single Sign On for Oracle).

             

            """

            10.16.41.28 - - [11/Jun/2013:13:20:00 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:01 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:01 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:02 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:05 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:05 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:06 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:07 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:07 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:08 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:09 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:09 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:10 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:11 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:12 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:12 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:13 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:13 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:14 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:14 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:15 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:15 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:16 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:16 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:17 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:17 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:17 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:18 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:18 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:19 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:19 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:19 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:20 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:21 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:21 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:22 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:22 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:23 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:23 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:23 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:24 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:25 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:25 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:26 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:26 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:27 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:27 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:28 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:28 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:29 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:29 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:29 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:30 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:30 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:31 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:31 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:32 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:32 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:33 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:33 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:34 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:34 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:34 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:35 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:35 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:36 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:36 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:36 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:37 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:37 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:38 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:38 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:38 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:39 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:39 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:40 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:41 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:41 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:42 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:43 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:44 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:44 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:45 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:45 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:46 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:46 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:46 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:47 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:47 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:48 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:48 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:49 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:49 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:49 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:50 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:51 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:51 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:52 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:52 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:52 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:53 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:53 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:53 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:54 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:55 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:55 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:55 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:56 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:56 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:56 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:57 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:57 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:57 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:58 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:58 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:58 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:59 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            10.16.41.28 - - [11/Jun/2013:13:20:59 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

            """

            • 3. Re: mod_jk with jboss 7 mode domain
              erasmomarciano

              Hi Carlos

               

              If you see this message into log of apache

               

              10.16.41.28 - - [11/Jun/2013:13:20:59 +0200] "GET /SIG/faces/vistas/selectorProvincia.xhtml HTTP/1.1" 302 -

               

              It doesn't mean that it is an error

               

              The code request 302

               

                The requested resource resides temporarily under a different URI.

                 Since the redirection might be altered on occasion, the client SHOULD

                 continue to use the Request-URI for future requests.  This response

                 is only cacheable if indicated by a Cache-Control or Expires header

                 field.

               

                 The temporary URI SHOULD be given by the Location field in the

                 response. Unless the request method was HEAD, the entity of the

                 response SHOULD contain a short hypertext note with a hyperlink to

                 the new URI(s).

              • 4. Re: mod_jk with jboss 7 mode domain
                carlosbg

                Hi erasmo2.

                 

                Thank you very much for the reply.

                 

                Is that there is no error, but the apache is not able to redirect the request to the correct instance of jboss. And that gives the message 302 (apache redirection).

                 

                I will work with mod_cluster until I find a solution to mod_jk.

                 

                Thank you.

                • 5. Re: mod_jk with jboss 7 mode domain
                  prahari

                  Hi Carlos,

                   

                  Were you ever able to figure out why mod_jk was giving the 302 redirection message. I am also in the same situation, the log shows 302 messages and the application page re-loads itself. Please do let me know , if you were able to solve it.

                   

                  Thanks in advance.