2 Replies Latest reply on Jun 26, 2012 12:50 PM by kazaag

    JBoss AS 7 JVM Route not defined in clustering

    lumia

      Hi

      Now i have tried clustering for standalone application with AS7 and Apache 2.2. First i will explain what i did. First i run the standalone server on ip:192.168.111.19:8231. And following is the changes what i did in httpd.conf file

       

       

      Listen 80

       

       

      LoadModule slotmem_module modules/mod_slotmem.so

      LoadModule manager_module modules/mod_manager.so

      LoadModule proxy_cluster_module modules/mod_proxy_cluster.so

      LoadModule advertise_module modules/mod_advertise.so

       

      # Virtual hosts

      Include conf/extra/httpd-vhosts.conf

       

      Now following is the code which i changed in httpd-vhosts.conf file

       

       

      Listen 192.168.111.19:6666

       

      <VirtualHost 192.168.111.19:6666>

         

          <Location />

              Order deny,allow

              Deny from all

              Allow from 192.168.111.

          </Location>

         

          <Location /mod_cluster_manager>

              SetHandler mod_cluster-manager

              Order deny,allow

              Deny from all

              Allow from 192.168.111.

          </Location>

         

          KeepAliveTimeout 60

          MaxKeepAliveRequests 0

         

          ManagerBalancerName mycluster

          ServerAdvertise On

      </VirtualHost>

       

      Now when i start the server i cant get the advertise message and i cant get my application from following i.p:192.168.111.19/Demo/test.jsp. When i checked through :list-proxies command in jboss-cli.bat file then it shows no proxy. Then i add the proxy through the following command

       

       

      [standalone@localhost:9999 subsystem=modcluster]:add-proxy(host=proxy_name,port=6666)

       

      Proxy was added successfully. Then i can get the application from 192.168.111.19/Demo/test.jsp. Now when i monitor the mod-cluster-manager in my browser then i got the following screen.

       

      mod_cluster_manager.gif

       

      So following are the problems:

      • I cant get specific node name. So how can i get?
      • Now in jboss-cli.bat file if i tried for :read-proxies-configuration command i get following output:

       

       

      [standalone@localhost:20149 subsystem=modcluster]

       

      :read-proxies-configuration

      {    "outcome" => "success",  

            "result" => ["localhost:6666","balancer: [1]

             Name: mycluster Sticky: 1 [JSESSIONID]/[jsessionid]

            remove: 0 force: 0 Timeout: 0 Maxtry:

            1node: [1:1],Balancer: mycluster,

           JVMRoute: undefined,LBGroup: [],Host: 192.168.111.19,

          Port: 8159,Type: ajp,flushpackets: 0,flushwait: 10,

          ping: 10,smax: 65,ttl: 60,timeout: 0

         host: 1 [example.com]

         vhost: 1 node: 1host: 2 [localhost] vhost: 1

         node: 1host: 3 [default-host] vhost: 1 node: 1

         context: 1 [/Demo] vhost: 1 node: 1 status: 1"    ]

      }

       

      So here i cant get JVMRoute specifically. So what should i do?

      And i cant get specific clustering. How clustering and load balancing is done in standalone mode.

      Thanks in advance

        • 1. Re: JBoss AS 7 JVM Route not defined in clustering
          rhusar

          So here i cant get JVMRoute specifically. So what should i do?

          mod_cluster should generate a route automatically on registering with the load-balancer.

           

          You can set up JVM route yourself in web subsystem element with instance-id attribute.

           

          <subsystem xmlns="urn:jboss:domain:web:1.1"... instance-id="{jvmroute}">

           

          HTH,

          Rado

          • 2. Re: JBoss AS 7 JVM Route not defined in clustering
            kazaag

            As Rado said, it should generate a UUID for the jvmroute when no jvmroute is specified, but a regression in 7.1.1 blocked this feature.

             

            You can get the source of the 7.1.2 or the 7.2 branch and build to get the issue fixed (As I remembered this has been fixed, but I haven't tested 7.1.2 or 7.2 builds).

             

            Setting the jvmroute in the web subsystem configue as explained by Rado is the workaround that works with 7.1.1 (have tested this one).