thanks for the suggestion. I change the configuration to set their broker name unique, from pop1 to pop5. The phenomenon is as below: pop2 and pop4 can discover each other and establish connection. pop3 and pop5 can discover each other and establish connection. pop1 can discover pop2, pop4, but can't establish connection with them.
seems the problem is why they can't discover all the brokers. pop3 can't discover pop2, neither do pop2. except this, pop1 has another problem. It can't establish connection with the brokers it discovers. Here are some key log of the brokers: log of pop1: INFO | Establishing network connection from vm://pop1 to tcp://b4:61616 INFO | Connector vm://pop1 Started INFO | Establishing network connection from vm://pop1 to tcp://b2:61616 INFO | Network connection between vm://pop1#2 and tcp://b2/172.28.16.137:61616(pop2) has been established. INFO | Network connection between vm://pop1#0 and tcp://b4/172.28.16.139:61616(pop4) has been established. INFO | pop1 bridge to pop2 stopped INFO | Connector vm://pop1 Stopped INFO | pop1 bridge to pop4 stopped log of pop2: INFO | Establishing network connection from vm://pop2 to tcp://b4:61616 INFO | Connector vm://pop2 Started INFO | Network connection between vm://pop2#0 and tcp://b4/172.28.16.139:61616(pop4) has been established. INFO | Establishing network connection from vm://pop2 to tcp://b1:61616 INFO | Network connection between vm://pop2#2 and tcp://b1/172.28.16.136:61616(pop1) has been established. INFO | pop2 bridge to pop1 stopped INFO | Establishing network connection from vm://pop2 to tcp://b1:61616 INFO | Network connection between vm://pop2#4 and tcp://b1/172.28.16.136:61616(pop1) has been established. INFO | pop2 bridge to pop1 stopped log of pop3: INFO | Establishing network connection from vm://pop3 to tcp://b5:61616 INFO | Connector vm://pop3 Started INFO | Network connection between vm://pop3#0 and tcp://b5/172.28.16.140:61616(pop5) has been established. log of pop4 is like pop2, pop5 like pop3. key configuration of broker: <broker xmlns="http://activemq.apache.org/schema/core" brokerName="pop1" dataDirectory="${activemq.base}/data"> <networkConnectors> <networkConnector uri="multicast://default?group=scow" dynamicOnly="true" networkTTL="3" prefetchSize="1" decreaseNetworkConsumerPriority="true" /> </networkConnectors> <transportConnectors> <transportConnector name="openwire" uri="tcp://0.0.0.0:61616" discoveryUri="multicast://default?group=scow" /> </transportConnectors> </broker> all the configuration are the same, except broker/@brokerName. b1, b2, b4 form a cluster. b3, b5 form a cluster, they don't discover each other. b1 has some problems to join. Gary Tully wrote: > > they should have unique names as some if the smarts to suppress > loopbacks depend on unique broker ids > > On 9 July 2010 10:22, scow <zkzy2...@hotmail.com> wrote: >> >> b2,b3,b4 have the same broker name 'dynamic-broker1', b1 and b5 get the >> broker name 'dynamic-broker1', if they all use the same broker name, the >> situation is the same, I have test it. >> >> <broker xmlns="http://activemq.apache.org/schema/core" >> brokerName="dynamic-broker2" dataDirectory="${activemq.base}/data"> >> >> >> >> Gary Tully wrote: >>> >>> have they all got unique brokerName attributes? >>> >>> On 9 July 2010 09:10, scow <zkzy2...@hotmail.com> wrote: >>>> >>>> I have configured a network of brokers(cluster) use dynamic discovery. >>>> The >>>> typical configuration is >>>> >>>> <networkConnectors> >>>> <networkConnector uri="multicast://default?group=com" >>>> dynamicOnly="true" >>>> networkTTL="3" >>>> prefetchSize="1" >>>> decreaseNetworkConsumerPriority="true" /> >>>> </networkConnectors> >>>> >>>> <transportConnectors> >>>> <transportConnector name="openwire" >>>> uri="tcp://0.0.0.0:61616" >>>> discoveryUri="multicast://default?group=com" /> >>>> </transportConnectors> >>>> >>>> There are 5 brokers in the cluster. 3 brokers(b2-b4) work well, other >>>> two(b1 >>>> and b5) can't join the cluster, they are started like single broker. >>>> One >>>> of >>>> them seems can detect other three, it records in log: >>>> >>>> INFO | Network connection between vm://dynamic-broker2#0 and >>>> tcp://b4/172.28.16.139:61616(dynamic-broker1) has been established. >>>> INFO | Network connection between vm://dynamic-broker2#2 and >>>> tcp://b2/172.28.16.137:61616(dynamic-broker1) has been established. >>>> INFO | Network connection between vm://dynamic-broker2#4 and >>>> tcp://b3/172.28.16.138:61616(dynamic-broker1) has been established. >>>> WARN | Failed to register MBean: >>>> org.apache.activemq:BrokerName=dynamic-broker2,Type=Connection,ConnectorName=openwire,Connection=NC_dynamic-broker1_outbound >>>> WARN | Failed to register MBean: >>>> org.apache.activemq:BrokerName=dynamic-broker2,Type=Connection,ConnectorName=openwire,Connection=NC_dynamic-broker1_outbound >>>> INFO | dynamic-broker2 bridge to dynamic-broker1 stopped >>>> INFO | dynamic-broker2 bridge to dynamic-broker1 stopped >>>> INFO | Connector vm://dynamic-broker2 Stopped >>>> INFO | dynamic-broker2 bridge to dynamic-broker1 stopped >>>> >>>> The other one even can't discover other brokers or discovered by >>>> others. >>>> All >>>> the 5 brokers are in the same lan and can connect to each other. >>>> >>>> If I configured b1 and b5 with static uri, they can formed a cluster >>>> and >>>> work well. Do you have any experience over this situation, thanks. >>>> >>>> >>>> >>>> -- >>>> View this message in context: >>>> http://old.nabble.com/some-broker-can%27t-join-network-of-brokers-tp29115245p29115245.html >>>> Sent from the ActiveMQ - User mailing list archive at Nabble.com. >>>> >>>> >>> >>> >>> >>> -- >>> http://blog.garytully.com >>> >>> Open Source Integration >>> http://fusesource.com >>> >>> >> >> -- >> View this message in context: >> http://old.nabble.com/some-broker-can%27t-join-network-of-brokers-tp29115245p29115810.html >> Sent from the ActiveMQ - User mailing list archive at Nabble.com. >> >> > > > > -- > http://blog.garytully.com > > Open Source Integration > http://fusesource.com > > -- View this message in context: http://old.nabble.com/some-broker-can%27t-join-network-of-brokers-tp29115245p29135426.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.