activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From TheKK <jkrishnaku...@gmail.com>
Subject Shared File System Master/Slave Problem
Date Wed, 02 May 2007 15:24:48 GMT

BrokerA.xml
============
<beans>

  <!-- Allows us to use system properties as variables in this configuration
file -->
  <bean
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
<!--  
  <broker xmlns="http://activemq.org/config/1.0" brokerName="BrokerA"
dataDirectory="${activemq.base}/data">
  -->
  
   <broker  xmlns="http://activemq.org/config/1.0" useJmx="false"
brokerName="BrokerA" persistent="true" 

deleteAllMessagesOnStartup="false"  shutdownOnMasterFailure="false"
populateJMSXUserID="true" 

dataDirectory="${activemq.base}/data"> 
   
      
    <!-- The transport connectors ActiveMQ will listen to -->
    <transportConnectors>
       <transportConnector uri="tcp://localhost:61616"
discoveryUri="multicast://default"/>
      </transportConnectors>


    <networkConnectors>
      <networkConnector name="default-nc1" uri="multicast://default"/>
     </networkConnectors>
    
    <!-- Added for Shared FileSystem - Master/Slave feature starts -->
     <persistenceAdapter> 
        <journaledJDBC journalLogFiles="5" useJournal="true"
dataDirectory="${activemq.base}/sharedFileSystem/BrokerA"/> 
    </persistenceAdapter> 
    <!-- Added for Shared FileSystem - Master/Slave feature ends -->
        

      
  </broker>



  <!-- lets create a command agent to respond to message based admin
commands on the ActiveMQ.Agent topic -->
  <commandAgent xmlns="http://activemq.org/config/1.0"/>
  
  
  
  
  <!-- An embedded servlet engine for serving up the Admin console -->
  <jetty xmlns="http://mortbay.com/schemas/jetty/1.0">
    <connectors>
      <nioConnector port="8161"/>
    </connectors>

    <handlers>
      <webAppContext contextPath="/admin"
resourceBase="${activemq.base}/webapps/admin" logUrlOnStart="true" />
      <webAppContext contextPath="/demo"
resourceBase="${activemq.base}/webapps/demo" logUrlOnStart="true" />
    </handlers>
  </jetty>
</beans>


BrokerB.xml
============
<beans>

  <!-- Allows us to use system properties as variables in this configuration
file -->
  <bean
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
  

    <broker  xmlns="http://activemq.org/config/1.0" useJmx="false"
brokerName="BrokerB" persistent="true" deleteAllMessagesOnStartup="false" 
shutdownOnMasterFailure="false" populateJMSXUserID="true"
dataDirectory="${activemq.base}/data"> 
    
    <!-- The transport connectors ActiveMQ will listen to -->
    <transportConnectors>
       <transportConnector  uri="tcp://localhost:61617"
discoveryUri="multicast://default"/>
      </transportConnectors>

    <networkConnectors>
      <networkConnector name="default-nc2" uri="multicast://default"/>
    </networkConnectors>
    
    <!-- Added for Shared FileSystem - Master/Slave feature starts -->
     <persistenceAdapter> 
        <journaledJDBC journalLogFiles="5" useJournal="true"
dataDirectory="${activemq.base}/sharedFileSystem/BrokerB"/> 
    </persistenceAdapter> 
    <!-- Added for Shared FileSystem - Master/Slave feature ends -->
   
	   
      
  </broker>



  <!-- lets create a command agent to respond to message based admin
commands on the ActiveMQ.Agent topic -->
  <commandAgent xmlns="http://activemq.org/config/1.0"/>
  
  
  
  <!-- An embedded servlet engine for serving up the Admin console -->
  <jetty xmlns="http://mortbay.com/schemas/jetty/1.0">
    <connectors>
      <nioConnector port="8162"/>
    </connectors>

    <handlers>
      <webAppContext contextPath="/admin"
resourceBase="${activemq.base}/webapps/admin" logUrlOnStart="true" />
      <webAppContext contextPath="/demo"
resourceBase="${activemq.base}/webapps/demo" logUrlOnStart="true" />
    </handlers>
  </jetty>
 

</beans>

BrokerC.xml
============
<beans>

  <!-- Allows us to use system properties as variables in this configuration
file -->
  <bean
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
  
     <broker  xmlns="http://activemq.org/config/1.0" useJmx="false"
brokerName="BrokerC" persistent="true" deleteAllMessagesOnStartup="false" 
shutdownOnMasterFailure="false" populateJMSXUserID="true"
dataDirectory="${activemq.base}/data"> 
  
    
    <!-- The transport connectors ActiveMQ will listen to -->
    <transportConnectors>
       <transportConnector  uri="tcp://localhost:61618"
discoveryUri="multicast://default"/>
      </transportConnectors>

    <networkConnectors>
      <networkConnector name="default-nc3" uri="multicast://default"/>
    </networkConnectors>
    
    <!-- Added for Shared FileSystem - Master/Slave feature starts -->
     <persistenceAdapter> 
        <journaledJDBC journalLogFiles="5" useJournal="true"
dataDirectory="${activemq.base}/sharedFileSystem/BrokerC"/> 
    </persistenceAdapter> 
    <!-- Added for Shared FileSystem - Master/Slave feature ends -->
   
	 
      
  </broker>
  
  

  <!-- lets create a command agent to respond to message based admin
commands on the ActiveMQ.Agent topic -->
  <commandAgent xmlns="http://activemq.org/config/1.0"/>
  
  
  <!-- An embedded servlet engine for serving up the Admin console -->
  <jetty xmlns="http://mortbay.com/schemas/jetty/1.0">
    <connectors>
      <nioConnector port="8163"/>
    </connectors>

    <handlers>
      <webAppContext contextPath="/admin"
resourceBase="${activemq.base}/webapps/admin" logUrlOnStart="true" />
      <webAppContext contextPath="/demo"
resourceBase="${activemq.base}/webapps/demo" logUrlOnStart="true" />
    </handlers>
  </jetty>
 

</beans>



Broker A Console:
================
INFO  NetworkConnector - Establishing network connection between from
vm://BrokerA to tcp://DDP4345:61617

INFO  TransportConnector     - Connector vm://BrokerA Started
INFO  DemandForwardingBridge - Network connection between vm://BrokerA#2 and
tcp://localhost/127.0.0.1:61617(BrokerB) has 

been established.

INFO  NetworkConnector        - Establishing network connection between from
vm://BrokerA to tcp://DDP4345:61618
INFO  DemandForwardingBridge  - Network connection between vm://BrokerA#4
and tcp://localhost/127.0.0.1:61618(BrokerC) has 

been established.

While shutting Broker A:
------------------------
INFO  BrokerService - ActiveMQ Message Broker (BrokerA,
ID:DDP4345-4656-1178095530359-1:0) is shutting down

INFO  DemandForwardingBridge   - BrokerA bridge to BrokerC stopped
INFO  TransportConnector 	- Connector vm://BrokerA Stopped

INFO  DemandForwardingBridge  - BrokerA bridge to BrokerB stopped
INFO  NetworkConnector - Network Connector
org.apache.activemq.transport.discovery.multicast.MulticastDiscoveryAgent@be76c7 

Stopped

INFO  TransportConnector - Connector tcp://localhost:61616 Stopped
INFO  BrokerService    - ActiveMQ JMS Message Broker (BrokerA,
ID:DDP4345-4656-1178095530359-1:0) stopped
Terminate batch job (Y/N)? y


Broker B Console:
=================
INFO  DemandForwardingBridge - BrokerB bridge to BrokerA stopped

Broker C Console:
=================
INFO  DemandForwardingBridge - BrokerC bridge to BrokerA stopped



Sender Application Log:
=======================
Read File: [File1.txt]
Send Message: [File1 - Message1File1 - Message2File1 - Message3File1 -
Message4]
Read File: [File10.txt]
Send Message: [File10 - Message1File10 - Message2File10 - Message3File10 -
Message4]
Read File: [File11.txt]
Send Message: [File11 - Message1File11 - Message2File11 - Message3File11 -
Message4]
Read File: [File12.txt]
Send Message: [File12 - Message1File12 - Message2File12 - Message3File12 -
Message4]
Read File: [File13.txt]
Send Message: [File13 - Message1File13 - Message2File13 - Message3File13 -
Message4]
Read File: [File14.txt]
Send Message: [File14 - Message1File14 - Message2File14 - Message3File14 -
Message4]
Read File: [File15.txt]
Send Message: [File15 - Message1File15 - Message2File15 - Message3File15 -
Message4]
Read File: [File16.txt]
Send Message: [File16 - Message1File16 - Message2File16 - Message3File16 -
Message4]
Read File: [File17.txt]
Send Message: [File 17 - Message1File 17 - Message2File 17 - Message3File 17
- Message4]
Read File: [File18.txt]
Send Message: [File18 - Message1File18 - Message2File18 - Message3File18 -
Message4]
Read File: [File2.txt]
Send Message: [File2 - Message1File2 - Message2File2 - Message3File2 -
Message4]
Read File: [File3.txt]
Exception in thread "ActiveMQ Transport: tcp://localhost/127.0.0.1:61616"
java.lang.ClassCastException: 

org.apache.activemq.transport.InactivityMonitor$1
	at 

edu.emory.mathcs.backport.java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.compareTo(ScheduledThreadPoolE

xecutor.java:189)
	at
edu.emory.mathcs.backport.java.util.PriorityQueue.remove(PriorityQueue.java:507)
	at
edu.emory.mathcs.backport.java.util.concurrent.DelayQueue.remove(DelayQueue.java:379)
	at 

edu.emory.mathcs.backport.java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.remove(ScheduledThreadPoolExecuto

r.java:707)
	at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.remove(ThreadPoolExecutor.java:1582)
	at org.apache.activemq.thread.Scheduler.cancel(Scheduler.java:55)
	at
org.apache.activemq.transport.InactivityMonitor.stopMonitorThreads(InactivityMonitor.java:176)
	at
org.apache.activemq.transport.InactivityMonitor.onException(InactivityMonitor.java:149)
	at
org.apache.activemq.transport.TransportSupport.onException(TransportSupport.java:97)
	at
org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:150)
	at java.lang.Thread.run(Thread.java:595)
Send Message: [File3 - Message1File3 - Message2File3 - Message3File3 -
Message4]
Read File: [File4.txt]
Send Message: [File4 - Message1File4 - Message2File4 - Message3File4 -
Message4]
Read File: [File5.txt]
Send Message: [File5 - Message1File5 - Message2File5 - Message3File5 -
Message4]
Read File: [File6.txt]
Send Message: [File6 - Message1File6 - Message2File6 - Message3File6 -
Message4]
Read File: [File7.txt]
Send Message: [File7 - Message1File7 - Message2File7 - Message3File7 -
Message4]
Read File: [File8.txt]
Send Message: [File8 - Message1File8 - Message2File8 - Message3File8 -
Message4]
Read File: [File9.txt]
Send Message: [File9 - Message1File9 - Message2File9 - Message3File9 -
Message4]
Exception in thread "ActiveMQ Transport: tcp://localhost/127.0.0.1:61617"
java.lang.ClassCastException: 

org.apache.activemq.transport.InactivityMonitor$1
	at 

edu.emory.mathcs.backport.java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.compareTo(ScheduledThreadPoolE

xecutor.java:189)
	at
edu.emory.mathcs.backport.java.util.PriorityQueue.remove(PriorityQueue.java:507)
	at
edu.emory.mathcs.backport.java.util.concurrent.DelayQueue.remove(DelayQueue.java:379)
	at 

edu.emory.mathcs.backport.java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.remove(ScheduledThreadPoolExecuto

r.java:707)
	at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.remove(ThreadPoolExecutor.java:1582)
	at org.apache.activemq.thread.Scheduler.cancel(Scheduler.java:55)
	at
org.apache.activemq.transport.InactivityMonitor.stopMonitorThreads(InactivityMonitor.java:176)
	at
org.apache.activemq.transport.InactivityMonitor.onException(InactivityMonitor.java:149)
	at
org.apache.activemq.transport.TransportSupport.onException(TransportSupport.java:97)
	at
org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:150)
	at java.lang.Thread.run(Thread.java:595)
Shutting down


Receiver Application Log:
=========================
Got Message: [File1 - Message1File1 - Message2File1 - Message3File1 -
Message4]
Got Message: [File10 - Message1File10 - Message2File10 - Message3File10 -
Message4]
Got Message: [File11 - Message1File11 - Message2File11 - Message3File11 -
Message4]
Got Message: [File12 - Message1File12 - Message2File12 - Message3File12 -
Message4]
Got Message: [File13 - Message1File13 - Message2File13 - Message3File13 -
Message4]
Got Message: [File14 - Message1File14 - Message2File14 - Message3File14 -
Message4]
Got Message: [File15 - Message1File15 - Message2File15 - Message3File15 -
Message4]
Got Message: [File16 - Message1File16 - Message2File16 - Message3File16 -
Message4]
Got Message: [File 17 - Message1File 17 - Message2File 17 - Message3File 17
- Message4]
Got Message: [File18 - Message1File18 - Message2File18 - Message3File18 -
Message4]
Got Message: [File2 - Message1File2 - Message2File2 - Message3File2 -
Message4]
Exception in thread "ActiveMQ Transport: tcp://localhost/127.0.0.1:61616"
java.lang.ClassCastException: 

org.apache.activemq.transport.InactivityMonitor$1
	at 

edu.emory.mathcs.backport.java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.compareTo(ScheduledThreadPoolE

xecutor.java:189)
	at
edu.emory.mathcs.backport.java.util.PriorityQueue.remove(PriorityQueue.java:507)
	at
edu.emory.mathcs.backport.java.util.concurrent.DelayQueue.remove(DelayQueue.java:379)
	at 

edu.emory.mathcs.backport.java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.remove(ScheduledThreadPoolExecuto

r.java:707)
	at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.remove(ThreadPoolExecutor.java:1582)
	at org.apache.activemq.thread.Scheduler.cancel(Scheduler.java:55)
	at
org.apache.activemq.transport.InactivityMonitor.stopMonitorThreads(InactivityMonitor.java:176)
	at
org.apache.activemq.transport.InactivityMonitor.onException(InactivityMonitor.java:149)
	at
org.apache.activemq.transport.TransportSupport.onException(TransportSupport.java:97)
	at
org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:150)
	at java.lang.Thread.run(Thread.java:595)




Summary:
=========

Version : apache-activemq-4.2-SNAPSHOT

Sender is able to reconnect the with Broker B and continues publishing
messages to destination testTopic. 
The receiver is not able to reconnect like the sender and not able to
receive any messages.
Please let me know if there is any configuration/property needs to set for
the receiver to reconnect.

Also pls let me know the steps for configuring JBDC Master/Slave.

Thanks in advance,
KK

-- 
View this message in context: http://www.nabble.com/Shared-File-System-Master-Slave-Problem-tf3680949s2354.html#a10287099
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message