[jboss-user] [Clustering/JBoss] - Re: Lost in the documentation UDP->TCP
do-not-reply at jboss.com
Fri Jun 26 14:00:51 EDT 2009
Good question. This topic deserves a wiki page of its own.
Simplest way to solve your problem:
1) Include the following in your command line args that you pass to JBoss:
That will change most of the services that use a JGroups channel to use one based on the "tcp" stack instead of the default "udp" stack.
2) The actual JGroups configurations for the "tcp" stack and the "udp" stack are found in the deploy/cluster/jgroups-channelfactory.sar/META-INF/jgroups-channelfactory-stacks.xml file. For more on the service that configures, see 
You can't use multicast, but the "tcp" config actually uses multicast for it's peer-discovery function. It does this because not using multicast requires configuring the addresses/ports of all the possible nodes in the cluster, which is of course environment-specific and doesn't just work out of the box. But, the "tcp" config in jgroups-channelfactory-stacks.xml tries to help. It includes two discovery protocol configurations, one "MPING" that is uncommented and one "TCPPING" that is commented. You need to comment out MPING and uncommment TCPPING.
For more on MPING and TCPPING see  and .
3) As noted above, not using multicast requires configuring the addresses/ports of all the possible nodes in the cluster. You need to compile this information. The port is the value of the "tcp" stack's TCP.start_port configuration, by default 7600. The address for each node is usually the value you pass to -b when you start JBoss; can also be the value you assign to -Djgroups.bind_addr if you're using that technique to tell JGroups to use a different interface than the -b one. You can also use hostnames instead of addresses.
Gather all these into a comma-delimited list and pass them to JBoss at startup via a system property:
4) If you are running clustered JBoss Messaging, JBM has their own UDP multicast-based JGroups config they use. You'll need to change that to use the "tcp" config. This is configured in the deploy/messaging/XXX-persistence-service.xml file. (The value of XXX will depend on what RDBMS you are using for message persistence.) Change:
| <mbean code="org.jboss.messaging.core.jmx.MessagingPostOfficeService" ...>
| . . .
| <attribute name="ControlChannelName">jbm-control</attribute>
| . . .
| <mbean code="org.jboss.messaging.core.jmx.MessagingPostOfficeService" ...">
| . . .
| <attribute name="ControlChannelName">tcp</attribute>
| . . .
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4240430#4240430
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4240430
More information about the jboss-user