1

I want to run jGroups within a machine with more than one interface. Consider these two interfaces and two IPs:

ens256 -> 172.16.2.2

ens128 -> 192.168.1.2

I want to force my program to bind jGroups channel to ens256 with this command

java -jar my.jar -Djgroups.bind_addr=172.16.2.2

but in the result I'v got :

GMS: address=coordinator, cluster=test, physical address=192.168.1.2:7800

I read this link and I used this as my tcp.xml. Any hint?

littleali
  • 408
  • 1
  • 6
  • 22

2 Answers2

2

Seems that you're sending the argument to your main method, instead of sending it to the JVM. To send it as a system property:

java -Djgroups.bind_addr=172.16.2.2 -jar my.jar
ernest_k
  • 44,416
  • 5
  • 53
  • 99
1

You use an outdated docu, the new one is here: [1] In [1] (scroll down), you could write the bind address directly into your config, e.g. using bind_addr="match-address:172.*".

[1] http://www.jgroups.org/manual4/index.html#Transport

Bela Ban
  • 2,186
  • 13
  • 12