UDP Cluster Exception
jbaruchs Mar 18, 2010 12:22 PMHi, folks!
First, thank you for the great product. Works like charm, except of one strange point.
I have established UDP cluster according to the Chapter 38 (see the xmls below), and trying to start the exact same code on 2 different machines. One of them starts well, sends and recieves messages. On another one I get "Timed out waiting to receive initial broadcast from discovery group" exception.
I wonder what it means, and why it appears so inconsistenly?
Both machines runs WinXP, the second machine differs in having more than one network adapter, but local-bind-port should take care of it, shouldn't it?
Thanks in advance, here are the configs:
hornetq-configuration.xml
{code:xml}<configuration xmlns="urn:hornetq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:hornetq /schema/hornetq-configuration.xsd
urn:hornetq">
<clustered>true</clustered>
<broadcast-groups>
<broadcast-group name="my-broadcast-group">
<local-bind-port>65432</local-bind-port>
<group-address>231.7.7.7</group-address>
<group-port>9876</group-port>
<connector-ref connector-name="netty"/>
</broadcast-group>
</broadcast-groups>
<discovery-groups>
<discovery-group name="my-discovery-group">
<group-address>231.7.7.7</group-address>
<group-port>9876</group-port>
</discovery-group>
</discovery-groups>
<connectors>
<connector name="netty">
<factory-class>org.hornetq.integration.transports.netty.NettyConnectorFactory</factory-class>
<param key="host" value="${hornetq.remoting.netty.host:localhost}"/>
<param key="port" value="${hornetq.remoting.netty.port:5445}"/>
</connector>
</connectors>
<cluster-connections>
<cluster-connection name="my-cluster">
<address>jms</address>
<use-duplicate-detection>true</use-duplicate-detection>
<forward-when-no-consumers>false</forward-when-no-consumers>
<max-hops>1</max-hops>
<discovery-group-ref discovery-group-name="my-discovery-group"/>
</cluster-connection>
</cluster-connections>
<acceptors>
<acceptor name="netty">
<factory-class>org.hornetq.integration.transports.netty.NettyAcceptorFactory</factory-class>
<param key="host" value="${hornetq.remoting.netty.host:localhost}"/>
<param key="port" value="${hornetq.remoting.netty.port:5445}"/>
</acceptor>
</acceptors>
<security-settings>
....
</security-settings>
<address-settings>
<address-setting match="#">
<redistribution-delay>0</redistribution-delay>
<dead-letter-address>jms.queue.DLQ</dead-letter-address>
<expiry-address>jms.queue.ExpiryQueue</expiry-address>
<redelivery-delay>0</redelivery-delay>
<max-size-bytes>-1</max-size-bytes>
<page-size-bytes>10485760</page-size-bytes>
<message-counter-history-day-limit>10</message-counter-history-day-limit>
</address-setting>
</address-settings>
<paging-directory>${hornetq.data.dir}/paging</paging-directory>
<bindings-directory>${hornetq.data.dir}/bindings</bindings-directory>
<journal-directory>${hornetq.data.dir}/journal</journal-directory>
<large-messages-directory>${hornetq.data.dir}/large-messages</large-messages-directory>
</configuration>{code}
hornetq-jms.xml
{code:xml}<configuration xmlns="urn:hornetq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:hornetq /schema/hornetq-jms.xsd">
<connection-factory name="NettyConnectionFactory">
<discovery-group-ref discovery-group-name="my-discovery-group"/>
<entries>
<entry name="/ConnectionFactory"/>
<entry name="/XAConnectionFactory"/>
</entries>
<connection-load-balancing-policy-class-name>
org.hornetq.api.core.client.loadbalance.RandomConnectionLoadBalancingPolicy
</connection-load-balancing-policy-class-name>
</connection-factory>
<queue name="DLQ">
<entry name="/queue/DLQ"/>
</queue>
<queue name="ExpiryQueue">
<entry name="/queue/ExpiryQueue"/>
</queue>
<queue name="ExampleQueue">
<entry name="/queue/ExampleQueue"/>
</queue>
<topic name="ExampleTopic">
<entry name="/topic/ExampleTopic"/>
</topic>
</configuration>
{code}