0 Replies Latest reply on Jun 16, 2016 1:55 PM by Andrew Rampulla

    HornetQ creates paging files as soon as backup connects to primary

    Andrew Rampulla Newbie

      I am seeing weird behavior.  When I create a 2 node replicated hornetQ cluster, with a very simple configuration, as soon as the backup server connects to the primary server, the primary server creates 0 length paging files (with their corresponding address.txt file).  They are 0 length, so they aren't really hurting anything (as far as I can tell), but this behavior seems wrong to me.

       

      Below is the relevant portion of the standalone.xml (not this is HornetQ 2.3.? in JBossEAP6.2)

              <hornetq-server xmlns:m="urn:jboss:domain:messaging:1.4" xmlns:s="urn:jboss:domain:1.6" name="distributed-server-provider">
                  <clustered>true</clustered>
                  <security-enabled>false</security-enabled>
                  <cluster-user>x</cluster-user>
                  <cluster-password>y</cluster-password>
                  <allow-failback>true</allow-failback>
                  <failover-on-shutdown>true</failover-on-shutdown>
                  <check-for-live-server>true</check-for-live-server>
                  <shared-store>false</shared-store>
                  <backup>false</backup>
                  <jmx-management-enabled>true</jmx-management-enabled>
                  <connection-ttl-override>60000</connection-ttl-override>
                  <persistence-enabled>true</persistence-enabled>
                  <journal-type>NIO</journal-type>
                  <journal-min-files>10</journal-min-files>
                  <max-saved-replicated-journal-size>2147483647</max-saved-replicated-journal-size>
                  <paging-directory path="${jboss.server.data.dir}/hornetq/distributed-server-provider/paging"/>
                  <bindings-directory path="${jboss.server.data.dir}/hornetq/distributed-server-provider/bindings"/>
                  <journal-directory path="${jboss.server.data.dir}/hornetq/distributed-server-provider/journal"/>
                  <large-messages-directory path="${jboss.server.data.dir}/hornetq/distributed-server-provider/largemessages"/>
                  <connectors>
                      <connector name="primary-node-connector">
                          <factory-class>org.hornetq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>
                          <param key="host" value="1.1.1.1"/>
                          <param key="port" value="${hornetq.remoting.netty.port:5445}"/>
                      </connector>
                      <connector name="backup-node-connector">
                          <factory-class>org.hornetq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>
                          <param key="host" value="2.2.2.2"/>
                          <param key="port" value="${hornetq.remoting.netty.port:5445}"/>
                      </connector>
                  </connectors>

       

                  <acceptors>
                      <netty-acceptor socket-binding="messaging" name="socket-acceptor">
                          <param value="0.0.0.0" key="host"/>
                          <param key="port" value="${hornetq.remoting.netty.port:5445}"/>
                          <param value="false" key="direct-deliver"/>
                          <param value="distributed-cluster" key="cluster-connection"/>
                      </netty-acceptor>
                      <in-vm-acceptor server-id="0" name="in-vm-acceptor"/>
                  </acceptors>
                  <cluster-connections>
                      <cluster-connection name="distributed-cluster">
                          <address>jms</address>
                          <connector-ref>primary-node-connector</connector-ref>
                          <static-connectors>
                              <connector-ref>primary-node-connector</connector-ref>
                              <connector-ref>backup-node-connector</connector-ref>
                          </static-connectors>
                      </cluster-connection>
                  </cluster-connections>
                  <jms-connection-factories>
                      <connection-factory name="systemWideConnectionFactory">
                          <connectors>
                              <connector-ref connector-name="primary-node-connector"/>
                              <connector-ref connector-name="backup-node-connector"/>
                          </connectors>
                          <entries>
                              <entry name="XAConnectionFactory"/>
                              <entry name="java:jboss/XAConnectionFactory"/>
                              <entry name="java:/MgmtXAConnectionFactory"/>
                              <entry name="java:jboss/MgmtXAConnectionFactory"/>
                          </entries>
                          <reconnect-attempts>-1</reconnect-attempts>
                      </connection-factory>
                  </jms-connection-factories>

       

                  <security-settings>
                      <security-setting match="#">
                          <permission roles="guest" type="send"/>
                          <permission roles="guest" type="consume"/>
                          <permission roles="guest" type="createDurableQueue"/>
                          <permission roles="guest" type="deleteDurableQueue"/>
                          <permission roles="guest" type="createNonDurableQueue"/>
                          <permission roles="guest" type="deleteNonDurableQueue"/>
                      </security-setting>
                  </security-settings>
                  <address-settings>
                      <address-setting match="#">
                          <dead-letter-address>jms.queue.DLQ</dead-letter-address>
                          <redelivery-delay>0</redelivery-delay>
                          <max-size-bytes>10485760</max-size-bytes>
                          <page-size-bytes>1048576</page-size-bytes>
                          <address-full-policy>PAGE</address-full-policy>
                          <message-counter-history-day-limit>10</message-counter-history-day-limit>
                          <redistribution-delay>0</redistribution-delay>
                      </address-setting>
                  </address-settings>
                  <jms-destinations>
                      <jms-queue name="myqueue">
                          <entry name="/queue/myqueue"/>
                      </jms-queue>
                  </jms-destinations>
              </hornetq-server>