jGroups is not finding other computers

2019-09-14 23:06发布

问题:

I am using jGroups to be able to determine the master for multiple instances of of an app I have, however, all works well on the same computer, but other computers on the same subnet does not get notified. I tried many options I found on the net such as starting with -Djgroups.bind.addr= I also started two instances on different machines (windows) and the other machine does not get notified:

java -cp jgroups-4.0.3.Final.jar -Djgroups.bind_addr=10.1.2.80 -Djava.net.preferIPv4Stack=true org.jgroups.demos.Draw

java -cp jgroups-4.0.3.Final.jar -Djgroups.bind_addr=10.1.10.82 -Djava.net.preferIPv4Stack=true org.jgroups.demos.Draw

Any help would be much appreciated. BTW- I also created a channel with the udp.xml: xml at: http://grepcode.com/file/repository.jboss.org/nexus/content/repositories/releases/org.infinispan/infinispan-core/7.0.3.Final/default-configs/default-jgroups-udp.xml

回答1:

I suggest go through the items in this checklist [1]. Also set GMS.print_local_addr to true and confirm that the instances bind to the correct bind address (e.g. not 127.0.0.1).

Note that if you start Draw without arguments, default udp.xml included in jgroups.jar will be used. You need to start Draw with the -props argument pointing to the udp.xml you customized.

[1] https://github.com/belaban/workshop/blob/master/slides/admin.adoc#problem-1-members-don-t-find-each-other



标签: jgroups