消息在apache activemq主从配置中受到攻击

时间:2014-06-05 13:08:51

标签: linux apache activemq messaging messagebroker

我遇到了在activemq队列中遇到消息的问题(使用主从配置),当我将约100条消息泵入不同的队列时,消费者无法使用消息。

我在主从模式的两个独立的Linux实例中配置了ActiveMQ(v5.9.0)消息代理。对于两个实例上的persistenceAdapter conf,我已将NAS存储安装到运行activemq服务器的两个实例上。因此,在挂载点'/ mnt / nas'的两个activemq实例上都安装了相同的NAS存储。 NAS存储的大小为20 GB。

所以我的persistenceAdapter conf看起来像下面的

<persistenceAdapter>
      <kahaDB directory="/mnt/nas" ignoreMissingJournalfiles="true" checkForCorruptJournalFiles="true" checksumJournalFiles="true"/>
</persistenceAdapter>

activemq服务器上的systemUsage配置如下所示

<systemUsage>
        <systemUsage>
            <memoryUsage>
                <memoryUsage percentOfJvmHeap = "70"/>
            </memoryUsage>
            <storeUsage>
                <storeUsage limit = "15 gb"/>
            </storeUsage>
            <tempUsage>
                <tempUsage limit = "7 gb"/>
            </tempUsage>
        </systemUsage>
 </systemUsage>

我只启用了“tcp”传输连接器

<transportConnector name = "openwire" uri = "tcp://0.0.0.0:61616     maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/>

当我在两个activemq实例上看到挂载点'/ mnt / nas'的分区详细信息时,我看到以下命令df -k

Filesystem              1K-blocks        Used   Available Use% Mounted on
/dev/xvda2              102953264     5840280    91883264   6% /
tmpfs                      967652           0      967652   0% /dev/shm
/dev/xvda1                 253871       52511      188253  22% /boot
//nas151.service.softlayer.com/IBM278684-16
                      139328579072 56369051136 82959527936  41% /mnt/nas

因此我看到41%的/ mnt / nas被使用

问题是当我启动activemq服务器时(在两个实例上),我在activemq.log中看到以下消息

 **************** START ***************
 2014-06-05 12:48:40,350 | INFO  | PListStore:[/var/lib/apache-activemq-5.9.0/data/localhost/tmp_storage] started | org.apache.activemq.store.kahadb.plist.PListStoreImpl | main
 2014-06-05 12:48:40,454 | INFO  | JMX consoles can connect to service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi | org.apache.activemq.broker.jmx.ManagementContext | JMX connector
 2014-06-05 12:48:40,457 | INFO  | Using Persistence Adapter: KahaDBPersistenceAdapter[/mnt/nas] | org.apache.activemq.broker.BrokerService | main
 2014-06-05 12:48:40,612 | INFO  | Corrupt journal records found in '/mnt/nas/db-1.log' between offsets: 8163..8209 | org.apache.activemq.store.kahadb.disk.journal.Journal | main
 2014-06-05 12:48:40,613 | INFO  | Corrupt journal records found in '/mnt/nas/db-1.log' between offsets: 12256..12327 | org.apache.activemq.store.kahadb.disk.journal.Journal | main
 2014-06-05 12:48:40,649 | INFO  | Corrupt journal records found in '/mnt/nas/db-1.log' between offsets: 20420..20585 | org.apache.activemq.store.kahadb.disk.journal.Journal | main
 2014-06-05 12:48:40,650 | INFO  | Corrupt journal records found in '/mnt/nas/db-1.log' between offsets: 28559..28749 | org.apache.activemq.store.kahadb.disk.journal.Journal | main
 2014-06-05 12:48:40,651 | INFO  | Corrupt journal records found in '/mnt/nas/db-1.log' between offsets: 32677..32842 | org.apache.activemq.store.kahadb.disk.journal.Journal | main
 2014-06-05 12:48:40,652 | INFO  | Corrupt journal records found in '/mnt/nas/db-1.log' between offsets: 36770..36960 | org.apache.activemq.store.kahadb.disk.journal.Journal | main
 2014-06-05 12:48:40,655 | INFO  | Corrupt journal records found in '/mnt/nas/db-1.log' between offsets: 49099..49264 | org.apache.activemq.store.kahadb.disk.journal.Journal | main
 2014-06-05 12:48:40,657 | INFO  | Corrupt journal records found in '/mnt/nas/db-1.log' between offsets: 61403..61474 | org.apache.activemq.store.kahadb.disk.journal.Journal | main
 2014-06-05 12:48:40,658 | INFO  | Corrupt journal records found in '/mnt/nas/db-1.log' between offsets: 65521..65567 | org.apache.activemq.store.kahadb.disk.journal.Journal | main
 2014-06-05 12:48:40,659 | INFO  | Corrupt journal records found in '/mnt/nas/db-1.log' between offsets: 69614..69685 | org.apache.activemq.store.kahadb.disk.journal.Journal | main
 2014-06-05 12:48:40,660 | INFO  | Corrupt journal records found in '/mnt/nas/db-1.log' between offsets: 77778..77824 | org.apache.activemq.store.kahadb.disk.journal.Journal | main
 2014-06-05 12:48:41,543 | INFO  | KahaDB is version 5 | org.apache.activemq.store.kahadb.MessageDatabase | main
 2014-06-05 12:48:41,592 | INFO  | Recovering from the journal ... | org.apache.activemq.store.kahadb.MessageDatabase | main
 2014-06-05 12:48:41,604 | INFO  | Recovery replayed 66 operations from the journal in 0.028 seconds. | org.apache.activemq.store.kahadb.MessageDatabase | main
 2014-06-05 12:48:41,772 | INFO  | Apache ActiveMQ 5.9.0 (localhost, ID:10.106.99.101-60576-1401972521638-0:1) is starting | org.apache.activemq.broker.BrokerService | main
 2014-06-05 12:48:41,892 | INFO  | Listening for connections at: tcp://10.106.99.101:61616?maximumConnections=1000&wireFormat.maxFrameSize=104857600 | org.apache.activemq.transport.TransportServerThreadSupport | main
 2014-06-05 12:48:41,893 | INFO  | Connector openwire started | org.apache.activemq.broker.TransportConnector | main
 2014-06-05 12:48:41,893 | INFO  | Apache ActiveMQ 5.9.0 (localhost, ID:10.106.99.101-60576-1401972521638-0:1) started | org.apache.activemq.broker.BrokerService | main
 2014-06-05 12:48:41,893 | INFO  | For help or more information please see: http://activemq.apache.org | org.apache.activemq.broker.BrokerService | main
 2014-06-05 12:48:41,897 | WARN  | Store limit is 2048 mb, whilst the data directory: /mnt/nas only has 0 mb of usable space - resetting to maximum available disk space: 0 mb | org.apache.activemq.broker.BrokerService | main
 2014-06-05 12:48:41,897 | ERROR | Store limit is 0 mb, whilst the max journal file size for the store is: 32 mb, the store will not accept any data when used. | org.apache.activemq.broker.BrokerService | main
 ******************** END **************

我在'/mnt/nas/db-1.log'中看到'损坏的日记录'。即使我删除此文件并重新启动,也会在每次重新启动时执行此操作。 我已经将标志恢复,但每次重新启动时仍会显示此日志条目。

另一个问题是,即使我的NAS存储空间为20GB,也显示'/ mnt / nas只有0 MB的可用空间'。这真的很奇怪。我不确定为什么0 MB可用于activemq

我请求这里的人给我一些关于它为什么会这样发生的建议,并建议我更好的配置,以避免消息在队列中被击中。

谢谢

Raagu

0 个答案:

没有答案