3 Replies Latest reply on Dec 7, 2016 3:49 AM by Oluwasegun Diyan

    Cant create cluster successfully on WIldfly 8.2.0

    Oluwasegun Diyan Newbie

      Hi

       

      I created a cluster on wildfly by replicating the standalone and giving a port offset for each standalone.

      My hornetq configuration is as below:

       

      <hornetq-server>

                      <persistence-enabled>true</persistence-enabled>

                      <security-enabled>false</security-enabled>

                      <cluster-user>seamfixadmin</cluster-user>

                      <cluster-password>hashedpaswword</cluster-password>

                      <backup>true</backup>

                      <failover-on-shutdown>true</failover-on-shutdown>

                      <shared-store>true</shared-store>

                      <journal-file-size>102400</journal-file-size>

                      <paging-directory path="data/paging" relative-to="user.home"/>

       

                      <bindings-directory path="data/messagingbindings" relative-to="user.home"/>

                      <journal-directory path="data/messagingjournal" relative-to="user.home"/>

                      <large-messages-directory path="data/messaginglargemessages" relative-to="user.home"/>

       

       

                      <connectors>

                          <http-connector name="http-connector" socket-binding="http">

                              <param key="http-upgrade-endpoint" value="http-acceptor"/>

                          </http-connector>

                          <http-connector name="http-connector-throughput" socket-binding="http">

                              <param key="http-upgrade-endpoint" value="http-acceptor-throughput"/>

                              <param key="batch-delay" value="50"/>

                          </http-connector>

                          <in-vm-connector name="in-vm" server-id="0"/>

                      </connectors>

       

       

                      <acceptors>

                          <http-acceptor http-listener="default" name="http-acceptor"/>

                          <http-acceptor http-listener="default" name="http-acceptor-throughput">

                              <param key="batch-delay" value="50"/>

                              <param key="direct-deliver" value="false"/>

                          </http-acceptor>

                          <in-vm-acceptor name="in-vm" server-id="0"/>

                      </acceptors>

       

       

                      <broadcast-groups>

                          <broadcast-group name="bg-group1">

                              <socket-binding>messaging-group</socket-binding>

                              <connector-ref>

                                  http-connector

                              </connector-ref>

                          </broadcast-group>

                      </broadcast-groups>

       

       

                      <discovery-groups>

                          <discovery-group name="dg-group1">

                              <socket-binding>messaging-group</socket-binding>

                          </discovery-group>

                      </discovery-groups>

       

       

                      <cluster-connections>

                          <cluster-connection name="my-cluster">

                              <address>jms</address>

                              <connector-ref>http-connector</connector-ref>

                              <discovery-group-ref discovery-group-name="dg-group1"/>

                          </cluster-connection>

                      </cluster-connections>

       

       

                      <security-settings>

                          <security-setting match="#">

                              <permission type="send" roles="guest"/>

                              <permission type="consume" roles="guest"/>

                              <permission type="createNonDurableQueue" roles="guest"/>

                              <permission type="deleteNonDurableQueue" roles="guest"/>

                          </security-setting>

                      </security-settings>

       

       

                      <address-settings>

                          <address-setting match="#">

                              <dead-letter-address>jms.queue.DLQ</dead-letter-address>

                              <expiry-address>jms.queue.ExpiryQueue</expiry-address>

                              <max-size-bytes>10485760</max-size-bytes>

                              <page-size-bytes>2097152</page-size-bytes>

                              <message-counter-history-day-limit>10</message-counter-history-day-limit>

                              <redistribution-delay>1000</redistribution-delay>

                          </address-setting>

                      </address-settings>

       

       

                      <jms-connection-factories>

                          <connection-factory name="InVmConnectionFactory">

                              <connectors>

                                  <connector-ref connector-name="in-vm"/>

                              </connectors>

                              <entries>

                                  <entry name="java:/ConnectionFactory"/>

                              </entries>

                          </connection-factory>

                          <connection-factory name="RemoteConnectionFactory">

                              <discovery-group-ref discovery-group-name="dg-group1"/>

                              <entries>

                                  <entry name="java:jboss/exported/jms/RemoteConnectionFactory"/>

                              </entries>

                              <ha>true</ha>

                              <block-on-acknowledge>true</block-on-acknowledge>

                              <reconnect-attempts>-1</reconnect-attempts>

                          </connection-factory>

                          <pooled-connection-factory name="hornetq-ra">

                              <transaction mode="xa"/>

                              <connectors>

                                  <connector-ref connector-name="in-vm"/>

                              </connectors>

                              <entries>

                                  <entry name="java:/JmsXA"/>

                                  <entry name="java:jboss/DefaultJMSConnectionFactory"/>

                              </entries>

                              <ha>true</ha>

                              <block-on-acknowledge>true</block-on-acknowledge>

                              <reconnect-attempts>-1</reconnect-attempts>

                          </pooled-connection-factory>

                      </jms-connection-factories>

       

       

                      <jms-destinations>

                          <jms-queue name="ExpiryQueue">

                              <entry name="java:/jms/queue/ExpiryQueue"/>

                          </jms-queue>

                          <jms-queue name="DLQ">

                              <entry name="java:/jms/queue/DLQ"/>

                          </jms-queue>

                          <jms-queue name="mailQueue">

                              <entry name="java:/jms/queue/Mail"/>

                              <durable>true</durable>

                          </jms-queue>

                </jms-destinations>

      </hornetq-server>

       

      I have just two standalone nodes, both configured for LIVE.

      The first node starts up successfully and registers as a live node on the cluster. The second node starts up but never gets deployed fully cause it hangs at the point where it is trying to obtain a live lock.

      If I switch the second node to backup configuration it start successfully, gets a backup lock successfully, deploys completely, but then throws error about missing dependents; everything regarding the queuing system is missing - the hornetq-ra driver, the connectionfactory, and obviously the queues.

       

      I'm really not an expert in this, this is my first attempt at clustering or load balancing with Wildfly. I'm really hoping someone can put me through on where I went wrong and how to get this cluster working right.

      I need to be able to have multiple live nodes and multiple backup nodes configured.

       

      Thanks in advance