HornetQ 2.4.0不会在备份服务器上复制绑定日志文件

时间:2015-05-06 08:29:22

标签: replication hornetq journal

起初,抱歉我的英文) 我们有RHEL 6.6,带有实时和备份配置的HornetQ 2.4.0以及2到11兆字节的消息队列。 当备份服务器启动活动节点在备份时启动复制,但此过程未结束且未下降为whit错误。

例如 登录实时服务器以了解启动复制

[2015-05-05 17:27:32,587] [INFO ] [Thread-2] [org.hornetq.core.server] HQ221025: Replication: sending JournalFileImpl: (hornetq-data-759.hq id = 192, recordID = 192) (size=10,485,760) to backup. NIOSequentialFile ../data/server0/data/messaging/journal/hornetq-data-759.hq
[2015-05-05 17:27:32,633] [INFO ] [Thread-2] [org.hornetq.core.server] HQ221025: Replication: sending JournalFileImpl: (hornetq-data-749.hq id = 755, recordID = 755) (size=10,485,760) to backup. NIOSequentialFile ../data/server0/data/messaging/journal/hornetq-data-749.hq
[2015-05-05 17:27:32,675] [INFO ] [Thread-2] [org.hornetq.core.server] HQ221025: Replication: sending JournalFileImpl: (hornetq-bindings-365.bindings id = 1, recordID = 1) (size=1,048,576) to backup. NIOSequentialFile ../data/server0/data/messaging/bindings/hornetq-bindings-365.bindings
[2015-05-05 17:27:32,686] [INFO ] [Thread-2] [org.hornetq.core.server] HQ221025: Replication: sending JournalFileImpl: (hornetq-bindings-369.bindings id = 2, recordID = 2) (size=1,048,576) to backup. NIOSequentialFile ../data/server0/data/messaging/bindings/hornetq-bindings-369.bindings
[2015-05-05 17:27:32,689] [INFO ] [Thread-2] [org.hornetq.core.server] HQ221025: Replication: sending JournalFileImpl: (hornetq-bindings-362.bindings id = 366, recordID = 366) (size=1,048,576) to backup. NIOSequentialFile ../data/server0/data/messaging/bindings/hornetq-bindings-362.bindings

在备份设备上记录日志文件

[2015-05-05 18:56:15,558] [TRACE] [Thread-1 (HornetQ-client-netty-threads-1442326569)] [org.hornetq.journal] Creating file hornetq-data-190.hq
[2015-05-05 18:56:15,655] [TRACE] [Thread-1 (HornetQ-client-netty-threads-1442326569)] [org.hornetq.journal] Renaming file hornetq-data-190.hq.tmp as hornetq-data-190.hq
[2015-05-05 18:56:15,662] [TRACE] [Thread-1 (HornetQ-client-netty-threads-1442326569)] [org.hornetq.journal] Creating file hornetq-data-191.hq
[2015-05-05 18:56:15,722] [TRACE] [Thread-1 (HornetQ-client-netty-threads-1442326569)] [org.hornetq.journal] Renaming file hornetq-data-191.hq.tmp as hornetq-data-191.hq
[2015-05-05 18:56:15,723] [TRACE] [Thread-1 (HornetQ-client-netty-threads-1442326569)] [org.hornetq.journal] Creating file hornetq-data-774.hq
[2015-05-05 18:56:15,771] [TRACE] [Thread-1 (HornetQ-client-netty-threads-1442326569)] [org.hornetq.journal] Renaming file hornetq-data-774.hq.tmp as hornetq-data-774.hq
[2015-05-05 18:56:15,775] [TRACE] [Thread-1 (HornetQ-client-netty-threads-1442326569)] [org.hornetq.journal] Creating file hornetq-data-775.hq
[2015-05-05 18:56:15,826] [TRACE] [Thread-1 (HornetQ-client-netty-threads-1442326569)] [org.hornetq.journal] Renaming file hornetq-data-775.hq.tmp as hornetq-data-775.hq
[2015-05-05 18:56:15,826] [TRACE] [Thread-1 (HornetQ-client-netty-threads-1442326569)] [org.hornetq.journal] Creating file hornetq-data-776.hq
[2015-05-05 18:56:15,879] [TRACE] [Thread-1 (HornetQ-client-netty-threads-1442326569)] [org.hornetq.journal] Renaming file hornetq-data-776.hq.tmp as hornetq-data-776.hq
[2015-05-05 18:56:15,880] [TRACE] [Thread-1 (HornetQ-client-netty-threads-1442326569)] [org.hornetq.journal] pushing openFile JournalFileImpl: (hornetq-data-776.hq id = 776, recordID = 776)
[2015-05-05 18:56:15,882] [TRACE] [Thread-1 (HornetQ-client-netty-threads-1442326569)] [org.hornetq.journal] Creating file hornetq-bindings-1.bindings
[2015-05-05 18:56:15,889] [TRACE] [Thread-1 (HornetQ-client-netty-threads-1442326569)] [org.hornetq.journal] Renaming file hornetq-bindings-1.bindings.tmp as hornetq-bindings-1.bindings
[2015-05-05 18:56:15,889] [TRACE] [Thread-1 (HornetQ-client-netty-threads-1442326569)] [org.hornetq.journal] Creating file hornetq-bindings-380.bindings
[2015-05-05 18:56:15,898] [TRACE] [Thread-1 (HornetQ-client-netty-threads-1442326569)] [org.hornetq.journal] Renaming file hornetq-bindings-380.bindings.tmp as hornetq-bindings-380.bindings
[2015-05-05 18:56:15,898] [TRACE] [Thread-1 (HornetQ-client-netty-threads-1442326569)] [org.hornetq.journal] Creating file hornetq-bindings-381.bindings
[2015-05-05 18:56:15,905] [TRACE] [Thread-1 (HornetQ-client-netty-threads-1442326569)] [org.hornetq.journal] Renaming file hornetq-bindings-381.bindings.tmp as hornetq-bindings-381.bindings
[2015-05-05 18:56:15,906] [TRACE] [Thread-1 (HornetQ-client-netty-threads-1442326569)] [org.hornetq.journal] Creating file hornetq-bindings-382.bindings
[2015-05-05 18:56:15,916] [TRACE] [Thread-1 (HornetQ-client-netty-threads-1442326569)] [org.hornetq.journal] Renaming file hornetq-bindings-382.bindings.tmp as hornetq-bindings-382.bindings
[2015-05-05 18:56:15,917] [TRACE] [Thread-1 (HornetQ-client-netty-threads-1442326569)] [org.hornetq.journal] pushing openFile JournalFileImpl: (hornetq-bindings-382.bindings id = 382, recordID = 382)

启动备份服务器

[2015-05-06 11:16:26,919] [INFO ] [main] [org.hornetq.integration.bootstrap] HQ101000: Starting HornetQ Server
[2015-05-06 11:16:27,880] [INFO ] [main] [org.hornetq.core.server] HQ221000: backup server is starting with configuration HornetQ Configuration (clustered=true,backup=true,sharedStore=false,journalDirectory=../data/server0/data/messaging/journal,bindingsDirectory=../data/server0/data/messaging/bindings,largeMessagesDirectory=../data/server0/data/messaging/largemessages,pagingDirectory=../data/server0/data/messaging/paging)
[2015-05-06 11:16:27,892] [WARN ] [HQ119000: Activation for server HornetQServerImpl::serverUUID=null] [org.hornetq.core.server] HQ222162: Moving data directory ../data/server0/data/messaging/bindings to ../data/server0/data/messaging/bindings12
[2015-05-06 11:16:27,893] [WARN ] [HQ119000: Activation for server HornetQServerImpl::serverUUID=null] [org.hornetq.core.server] HQ222162: Moving data directory ../data/server0/data/messaging/journal to ../data/server0/data/messaging/journal12
[2015-05-06 11:16:27,893] [WARN ] [HQ119000: Activation for server HornetQServerImpl::serverUUID=null] [org.hornetq.core.server] HQ222162: Moving data directory ../data/server0/data/messaging/paging to ../data/server0/data/messaging/paging12
[2015-05-06 11:16:27,893] [WARN ] [HQ119000: Activation for server HornetQServerImpl::serverUUID=null] [org.hornetq.core.server] HQ222162: Moving data directory ../data/server0/data/messaging/largemessages to ../data/server0/data/messaging/largemessages12
[2015-05-06 11:16:28,095] [INFO ] [HQ119000: Activation for server HornetQServerImpl::serverUUID=null] [org.hornetq.core.server] HQ221013: Using NIO Journal
[2015-05-06 11:16:28,140] [WARN ] [HQ119000: Activation for server HornetQServerImpl::serverUUID=null] [org.hornetq.core.server] HQ222007: Security risk! HornetQ is running with the default cluster admin user and default password. Please see the HornetQ user guide, cluster chapter, for instructions on how to change this.
[2015-05-06 11:16:28,166] [INFO ] [HQ119000: Activation for server HornetQServerImpl::serverUUID=null] [org.hornetq.core.server] HQ221043: Adding protocol support CORE
[2015-05-06 11:16:28,169] [INFO ] [HQ119000: Activation for server HornetQServerImpl::serverUUID=null] [org.hornetq.core.server] HQ221043: Adding protocol support STOMP
[2015-05-06 11:16:28,171] [INFO ] [HQ119000: Activation for server HornetQServerImpl::serverUUID=null] [org.hornetq.core.server] HQ221043: Adding protocol support AMQP
[2015-05-06 11:16:28,618] [INFO ] [HQ119000: Activation for server HornetQServerImpl::serverUUID=null] [org.hornetq.core.server] HQ221109: HornetQ Backup Server version 2.5.0.SNAPSHOT (Wild Hornet, 124) [null] started, waiting live to fail before it gets active

hornetq-configuration.xml文件

<configuration xmlns="urn:hornetq"
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xsi:schemaLocation="urn:hornetq /schema/hornetq-configuration.xsd">

   <bindings-directory>${data.dir:../data}/server0/data/messaging/bindings</bindings-directory>
   <journal-directory>${data.dir:../data}/server0/data/messaging/journal</journal-directory>
   <large-messages-directory>${data.dir:../data}/server0/data/messaging/largemessages</large-messages-directory>
   <paging-directory>${data.dir:../data}/server0/data/messaging/paging</paging-directory>

   <shared-store>false</shared-store>
   <backup-group-name>hub_group</backup-group-name>
   <failover-on-shutdown>true</failover-on-shutdown>
   <allow-failback>true</allow-failback>
   <connection-ttl-override>100000</connection-ttl-override>
   <check-for-live-server>true</check-for-live-server>
   <security-enabled>false</security-enabled>
   <journal-type>NIO</journal-type>
   <!-- Connectors -->

   <connectors>
      <connector name="netty-connector">
         <factory-class>org.hornetq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>
         <param key="port" value="5445"/>
         <param key="host" value="host1"/>
         <param key="tcp-send-buffer-size" value="524288"/>
         <param key="tcp-receive-buffer-size" value="524288"/>
      </connector>
   </connectors>

   <!-- Acceptors -->
   <acceptors>
      <acceptor name="netty-acceptor">
         <factory-class>org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
         <param key="port" value="5445"/>
         <param key="host" value="host1"/>
         <param key="tcp-send-buffer-size" value="524288"/>
         <param key="tcp-receive-buffer-size" value="524288"/>
      </acceptor>
   </acceptors>

   <!-- Clustering configuration -->

   <broadcast-groups>
      <broadcast-group name="my-broadcast-group">
         <group-address>${udp-address:231.7.7.9}</group-address>
         <group-port>9876</group-port>
         <broadcast-period>100</broadcast-period>
         <connector-ref>netty-connector</connector-ref>
     </broadcast-group>
   </broadcast-groups>

   <discovery-groups>
      <discovery-group name="my-discovery-group">
         <group-address>${udp-address:231.7.7.9}</group-address>
         <group-port>9876</group-port>
         <refresh-timeout>10000</refresh-timeout>
      </discovery-group>
   </discovery-groups>

   <cluster-connections>
      <cluster-connection name="my-cluster">
         <address>jms</address>
         <connector-ref>netty-connector</connector-ref>
         <check-period>5000</check-period>
         <connection-ttl>10000</connection-ttl>
         <retry-interval>1000</retry-interval>
         <reconnect-attempts>-1</reconnect-attempts>
         <use-duplicate-detection>true</use-duplicate-detection>
         <forward-when-no-consumers>true</forward-when-no-consumers>
         <max-hops>1</max-hops>
         <discovery-group-ref discovery-group-name="my-discovery-group"/>
      </cluster-connection>
   </cluster-connections>
</configuration>

将hornetq-jms.xml文件

<configuration xmlns="urn:hornetq"
               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
               xsi:schemaLocation="urn:hornetq /schema/hornetq-jms.xsd">
    <!--the connection factory used by the example-->
    <connection-factory name="ConnectionFactory">
        <connectors>
            <connector-ref connector-name="netty-connector"/>
        </connectors>
        <entries>
            <entry name="ConnectionFactory"/>
        </entries>
        <min-large-message-size>10240</min-large-message-size>
        <connection-ttl>5000</connection-ttl>
        <client-failure-check-period>5000</client-failure-check-period>
        <retry-interval>1000</retry-interval>
        <retry-interval-multiplier>1.5</retry-interval-multiplier>
        <max-retry-interval>60000</max-retry-interval>
        <reconnect-attempts>1000</reconnect-attempts>
        <consumer-window-size>0</consumer-window-size>
    </connection-factory>

   <queue name="DLQ">
      <entry name="/queue/DLQ"/>
   </queue>
</configuration>

0 个答案:

没有答案