Skip to main content

JGroups demos on SuSE Linux 10.0

Posted by dcengija on April 3, 2006 at 3:42 PM PDT

JGroups is a toolkit for reliable multicast communication in Java. If you're like me, which means that you barely know what multicast means, and you're running SuSE 10.0, you'll have troubles to understand why JGroups demos don't work and what you need to do to have it working.

First of all, lets see what multicast is: it's a way to send a message over network to selected recipients which belong to the same, appropriate multicast group. If you need more details on multicast, and network protocols in general, you might find interesting a book by W. Richard Stevens, TCP/IP Illustrated, which is even available online for free. (I have to say 'thank you for pointing me to it' to a very good friend of mine -- šta ima, Muratići? :-)

Why would we need JGroups? There are many uses, among them the most interesting are implementation of clustering features for applications and application servers, distributed cache, http session replication etc. See Success stories on JGroups website for more ideas.

Now we can start with JGroups evaluation. Download it from, unpack and open INSTALL.html. Scroll down and look for an explanation on how to run a demo program. Setup your classpath -- you could use this simple shell trick:

davor@linux:~/memtmp/JGroups-> C=.; for i in *.jar; do C=$C:$i; done
davor@linux:~/memtmp/JGroups-> echo $C

Now you're ready to run a demo program:

davor@linux:~/memtmp/JGroups-> java -cp $C org.jgroups.demos.Draw
-- snip log4j warnings --
org.jgroups.ChannelException: failed to start protocol stack
        at org.jgroups.JChannel.connect(
        at org.jgroups.demos.Draw.go(
        at org.jgroups.demos.Draw.main(
Caused by: java.lang.Exception: exception caused by UDP.start(): Cannot assign requested address
        at org.jgroups.stack.Protocol.handleSpecialDownEvent(

Unfortunatelly, on SuSE 10.0 default installation, demo fails with the message shown above. What you need is VM option in order to start demo:

davor@linux:~/memtmp/JGroups-> java -cp $C org.jgroups.demos.Draw

GMS: address is
** View=[|0] []

Start demo at lease twice and try to draw something on one window.


Unfortunatelly, on SuSE10 with firewall enabled, demo fails: firewall is blocking multicast. I admit that I don't understand much about firewalls, so I simply disable it for the purpose of this evaluation.


Now the demo finally works:


If you do understand firewalls and know how to configure them without disabling, please post a comment. Thanks.

Related Topics >>