I'm trying to run the Draw example and communicate between two different machines. It works fine on same machine using this command:
java -Djgroups.bind_addr=127.0.0.1 -Djava.net.preferIPv4Stack=true org.jgroups.demos.Draw
Now I tried giving the IPv4Address of the other machine in bind_addr and it gave me an error saying
/'other.machine.ip' is not a valid address on any local network interface
Please tell me the command or what bind_addr
should I give for the both machines to connect.
Sorry I just started on this, so please tell me in simple works and exact details.
EDIT:
Ok. Here are the steps I followed:
- Downloaded jgroups.jar
- Gave the CLASSPATH like this: "C:\jgroups\jgroups-3.6.1.Final.jar"
- Extracted the jar file.
- Ran this command on machine A:
java -Djgroups.bind_addr="Gave local IPv4 Address" -Djava.net.preferIPv4Stack=true org.jgroups.demos.Draw
- Ran this command on machine B:
java -Djgroups.bind_addr="Gave local IPv4 Address" -Djava.net.preferIPv4Stack=true org.jgroups.demos.Draw
- But I was unable to communicate (Drew something on machine A and it was not updated on machine B)
Note: By the way, I was able to ping both machines. And I also disabled the firewall just in case.
Am I doing something wrong or is missing something? Any help would be appreciated.
EDIT 2:
SOLVED!
As it turned out, I was doing everything right. What I did was just downloaded the previous version of jgroups (in my case, 3.4.7
). And everything worked fine.