Thanks Joe. However, I have just one activemq.xml config file that gets published to both hosts. Is there a way to do it in the same configuration ?
I also tried the suggestions below. I removed the vm transport and added only one network connector. So it now looks like this- <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-plat1:61616)" dynamicOnly="true" /> </networkConnectors> </broker> I still see in the logs on sdt-plat2- DiscoveryNetworkConnector:84 - Establishing network connection between from vm://localhost to tcp://sdt-plat1:61616 09/09/08 10:48:48 INFO TransportConnector:252 - Connector vm://localhost Started 09/09/08 10:48:48 INFO TransportConnector:273 - Connector vm://localhost Stopped 09/09/08 10:48:48 WARN DiscoveryNetworkConnector:109 - Could not start network bridge between: vm://localhost and: tcp://sdt-plat1:61616 due to: java.net.ConnectException: Connection refused 09/09/08 10:48:48 INFO DemandForwardingBridge:368 - localhost bridge to Unknown stopped Shouldn't this configuration have generated a bridge from sdt-plat2 to sdt-plat1 in one direction ? thanks for your time, MJ Joe Fernandez wrote: > > 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-tp19386336p19398273.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.