3 Replies Latest reply on Jan 28, 2013 7:08 AM by Radoslav Husar

    jvmroute in domain clustering

    Willem Noorduin Newbie

      We have a JBoss 7 / EAP 6 Domain master running on server1 and a JBoss7 / EAP 6 slave running on server2. After the following we have a running domaincluster:

       

      [domain@145.78.121.33:9999 /] /profile=full-ha/subsystem=modcluster/mod-cluster-config=configuration:write-attribute(name=balancer, value="testbalancer")

      {

          "outcome" => "success",

          "result" => undefined,

          "server-groups" => undefined

      }

       

      [domain@145.78.121.33:9999 /] /server-group=test-server-group:add(profile=full-ha, socket-binding-group=full-ha-sockets, socket-binding-port-offset=0)

      {

          "outcome" => "success",

          "result" => undefined,

          "server-groups" => undefined

      }

       

      [domain@145.78.121.33:9999 /] /host=server2/server-config=testserver:add(auto-start=true, group=test-server-group, socket-binding-group=full-ha-sockets, socket-binding-port-offset=0)

      {

          "outcome" => "success",

          "result" => undefined

      }

       

      [domain@145.78.121.33:9999 /] /host=server2/server-config=testserver:add(auto-start=true, group=test-server-group, socket-binding-group=full-ha-sockets, socket-binding-port-offset=0)

      {

          "outcome" => "success",

          "result" => undefined

      }

       

      Only referring with a mod-cluster-manager page, we see that the server is registering it with

      Node 19ca1170-7171-38af-9954-13df0749dd1b

       

      I know I can tweak this by a <system-property>, but this seems only possible on a global schale (such that the JBoss slave running on server2), and not per server-config. Since we like to run various server-config's per physical slave server, my question is whether it is possible to tweak this value. I know it is possible, because I can easily make another server-config which gets another jvmroute.

        • 1. Re: jvmroute in domain clustering
          Paul Ferraro Master

          You can set the jvmRoute per server via the web subsystem.

          e.g.

          {code:xml}<subsystem xmlns="urn:jboss:domain:web:1.2" instance-id="my-node-name"/>{code}

          • 2. Re: jvmroute in domain clustering
            Willem Noorduin Newbie

            Okay, I see:

             

            [domain@145.78.121.33:9999 /] /profile=test-fullha/subsystem=web:write-attribute(name=

            default-virtual-server   instance-id              native

             

            So I can set this property on the profile-level. But:

             

            [domain@145.78.121.33:9999 /] /host=server2/server-config=instance/

            interface         jvm               path              system-property

             

            and:

             

            [domain@145.78.121.33:9999 /] /host=fbewslave/

            core-service      interface         jvm               path              server            server-config     system-property

             

            So I can't use instance-id to refer to a single node in a cluster (or, in JBoss-EAP 6 lingo, a profile). I guess I should one of the system-property tags (either in server-config=instance) or /host=fbewslave).

            • 3. Re: jvmroute in domain clustering
              Radoslav Husar Master

              In a domain, since you are sharing one profile, you will indeed need to use a system property to differentiate the value between the nodes.

               

              You seem to know the rest. Configure instance ID to an expression:

               

              [domain@localhost:9999 /] /host=master/server=server-one/subsystem=web/:read-resource

              {

                  "outcome" => "success",

                  "result" => {

                      "default-virtual-server" => "default-host",

                      "instance-id" => expression "${jboss.web.instance-id}",

              ...

               

              and configure the actual value for each host:

               

              [domain@localhost:9999 /] /host=master/server-config=server-one:read-resource(recursive=true)

              {

                  "outcome" => "success",

                  "result" => {

              ...

                      "system-property" => {"jboss.web.instance-id" => {

                          "boot-time" => false,

                          "value" => "instanceOneJvmRoute"

                      }}

                  }

              }

              1 of 1 people found this helpful