activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Fernandez <joe.fernan...@ttmsolutions.com>
Subject Re: Network of brokers - java.net.ConnectException: Connection refused
Date Tue, 09 Sep 2008 11:10:41 GMT

The 'vm' transport is reserved for clients, so take it out. 

http://activemq.apache.org/vm-transport-reference.html

You also have a network connector that points the broker to itself, so also
take those out. 

Try the following cfg files below.


<!-- For sdt-plat1 -->
<broker xmlns="http://activemq.apache.org/schema/core" useJmx="true">
    <persistenceAdapter>
         <amqPersistenceAdapter syncOnWrite="false"
             directory="../3509/data" maxFileLength="40 mb"/>
    </persistenceAdapter>  
    <transportConnectors>
      <transportConnector name="openwire" uri="tcp://localhost:61616"/>
    </transportConnectors>		
    <networkConnectors>
	<networkConnector name="bridge1" uri="static://(tcp://sdt-plat2:61616)"
          dynamicOnly="true" />
    </networkConnectors>        
  </broker>


<!-- For sdt-plat2 -->
<broker xmlns="http://activemq.apache.org/schema/core" useJmx="true">
    <persistenceAdapter>
         <amqPersistenceAdapter syncOnWrite="false"
             directory="../3509/data" maxFileLength="40 mb"/>
    </persistenceAdapter>  
    <transportConnectors>
      <transportConnector name="openwire" uri="tcp://localhost:61616"/>
    </transportConnectors>		
    <networkConnectors>
	<networkConnector name="bridge2" uri="static://(tcp://sdt-plat1:61616)"
          dynamicOnly="true" />
    </networkConnectors>        
  </broker>

Hope this helps. 
Joe
Get a free ActiveMQ user guide @ http://www.ttmsolutions.com 


mjoshi wrote:
> 
> Hi,
> 
> I am new to activemq. I am trying to setup a message system with a network
> of brokers style configuration as given in the documentation. I have
> brokers running on 2 hosts and I have added network connectors in both
> directions. However, I keep getting this exception in the logs for only
> one of the hosts - 
> Host:sdt-plat2
> 
>  DiscoveryNetworkConnector:84 - Establishing network connection between
> from vm://localhost to
>  tcp://sdt-plat1:61616
>   WARN DiscoveryNetworkConnector:109 - Could not start network bridge
> between: vm://localhost and:
> tcp://sdt-plat1:61616 due to: java.net.ConnectException: Connection
> refused
> 09/08/08 21:26:15  INFO DemandForwardingBridge:368 - localhost bridge to
> Unknown stopped
> 
> However, on the other host (sdt-plat1) I see - 
> 
> NetworkConnector:208 - Network Connector bridge1 Started
> 09/08/08 17:08:03  INFO DiscoveryNetworkConnector:84 - Establishing
> network connection between from vm://localhost to tcp://sdt-plat2:61616
> 09/08/08 17:08:03  INFO NetworkConnector:208 - Network Connector bridge2
> Started
> 
> Why do I get the connect exception only on one host ? Here is my
> configuration - 
> 
> <broker xmlns="http://activemq.apache.org/schema/core" useJmx="true">
> 
> 	<persistenceAdapter>
>             <amqPersistenceAdapter syncOnWrite="false"
> directory="../3509/data" maxFileLength="40 mb"/>
>     </persistenceAdapter>
>   
>     <transportConnectors>
>       <transportConnector name="openwire" uri="tcp://localhost:61616"/>
> 	  <transportConnector name="local" uri="vm://localhost" />
>     </transportConnectors>
> 		
> 	<networkConnectors>
> 		<networkConnector name="bridge1" uri="static://(tcp://sdt-plat1:61616)"
> dynamicOnly="true" />
> 		<networkConnector name="bridge2" uri="static://(tcp://sdt-plat2:61616)"
> dynamicOnly="true" />
> 	</networkConnectors>
>         
>   </broker>
> 
> What am I doing wrong ? Any suggestions would be helpful..
> 
> thanks,
> mj
> 

-- 
View this message in context: http://www.nabble.com/Network-of-brokers---java.net.ConnectException%3A-Connection-refused-tp19386336p19390103.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message