I'm a Java programming novice. I liked the sound of JGroups and thought I'd have a look. Downloaded the ReplCaheDemo jar and thought it was great. Downloaded the JGroups-master zip, extracted, used the ReplCacheDemo class in a Netbeans package and imported the JGroups final jar as a library. ran multiple instances fine on a single computer. However when trying to run multiple instances over different computers, the instances don't find each other. But the ReplCacheDemo jar from the website does find other instances of itself. I am confused and frustrated. Please help! P.S. I dont know if it has any bearing, but instances I run of the ReplcCacheDemo I made report a physical address that is my PC name, not just an IP address like in the jar from the website
Asked
Active
Viewed 239 times
0
-
So what exactly is the question? Some further information on how this has been set up would be helpful. – ORION Sep 03 '14 at 12:26
-
The main question I have is why do my instances not find each other over a network like the demo jar does and how do I get this to work? Using Windows 7 Ultimate, Netbeans 6.9.1, Java 1.6.0_21. I copied the ReplCacheDemo class from JGroups-master\JGroups-master\src\org\jgroups\demos to a new package in Netbeans, added the JGroups jar to the libraries then ran the program. Tried creating a jar and running that but it also failed to detect instances on different computers on my lan. What other info would you like? – vonsydow Sep 03 '14 at 13:03
-
What I'd love is the tiniest java class that will run on separate machines just so I can figure out how to build from there. As far as I am aware from the documentation, the default udp.xml should multicast. Also as long as all JChannels are initiated the same and are named for the same cluster they should join it. Is there anything special I need to do to make the instances find each other on different machines? Every time I try it will only recognise instances on the same machine. I downloaded another demo jar from Bela Ban and this worked perfectly. I'm lost... – vonsydow Sep 03 '14 at 21:27
1 Answers
3
A couple of things to check:
Are firewalls enabled (iptables -L) ? Disable them to see if this works.
Make sure the bind address is correct, e.g. start the app with -Djgroups.bind_addr=192.168.1.5 (pick the right address, not 127.0.0.1)
You may have to pick an IPv4 address, unless IPv6 routing is setup correctly: -Djava.net.preferIPv4Stack=true

Bela Ban
- 2,186
- 13
- 12
-
Thanks for the information. I had previously tried binding the address and turning off my firewalls, but to no avail. -Djava.net.preferIPv4Stack=true worked.Thanks again, I had been going crazy and was contemplating burning all my computer equipment, renouncing technology and going to live in a cave! – vonsydow Sep 04 '14 at 14:52