If you are running a HornetQ cluster you find that the nodes can't find each other. The discovery protocol is built using UDP and multicasts information around the cluster. If there are problems typically it is because of one of the following reasons:
- The nodes are behind a firewall. If your nodes are on different machines then it is possible that the firewall is blocking the multicasts. you can test this by disabling the firewall for each node or adding the appropriate rules.
- You are using a home network or are behind a gateway. Typically home networks will redirect any UDP traffic to the Internet Service Provider which is then either dropped by the ISP or just lost. To fix this you will need to add a route to the firewall/gateway that will redirect any multicast traffic back on to the local network instead.
- All the nodes are one one machine. If this is the case then it is a similar problem to point 2 and the same solution should fix it. Alternatively you could add a multicast route to the loopback interface. On linux the command would be route add -net 224.0.0.0 netmask 240.0.0.0 dev lo which should be run as root. This will redirect any traffic directed to the 224.0.0.0 to the loopback interface. This will also work if you have no network at all.
- on Mac OS X, the command is slightly different: sudo route add 224.0.0.0 127.0.0.1 -netmask 240.0.0.0
Comments