3 Replies Latest reply on Jan 18, 2019 2:34 PM by pferraro

    How configure Wildfly 11 in HA Mode with preferred master?

    lucianoborges

      I am currently using the default HA configuration in Wildfly 11. I would like to know how can I tell which particular cluster is preferred if it is available.

      I believe I should change the singleton subsystem but I do not know how.

              <subsystem xmlns="urn:jboss:domain:singleton:1.0">

                  <singleton-policies default="default">

                      <singleton-policy name="default" cache-container="server">

                          <simple-election-policy/>

                      </singleton-policy>

                  </singleton-policies>

              </subsystem>

       

      EDIT

      Run ./jboss-cli

      Run the command: /subsystem=singleton/singleton-policy=default/election-policy=simple:write-attribute(name=name-preferences,value=[node3,node2,node1])

      The standalone-ha.xml was altered to:

      <subsystem xmlns="urn:jboss:domain:singleton:1.0">

           <singleton-policies default="default">

                <singleton-policy name="default" cache-container="server">

                     <simple-election-policy>

                          <name-preferences>node3 node2 node1</name-preferences>

                     </simple-election-policy>

                </singleton-policy>

           </singleton-policies>

      </subsystem>

       

      Now I'd like to know what is the name to put in place of node3, node2, node1.

      How to define the name from my node?