-
1. Re: how to use tcp for jgroups communication in infinispan?
galder.zamarreno Apr 7, 2010 3:22 AM (in response to yelin66)Sorry but I'm confused by what is it that you do different in step 3 compared to step 2, is it the use of -Dbind.address property? Can you try using the newer -Djgroups.bind_addr ( http://community.jboss.org/wiki/SystemProps)?
Also, check Infinispan log to see what's the physical address bound to, i.e.
2010-04-07 09:19:53,443 INFO [JGroupsTransport] (Incoming-2,Infinispan-Cluster,eq-15439) Received new cluster view: [eq-15439|1] [eq-15439, eq-28947] ... 2010-04-07 09:19:53,486 INFO [JGroupsTransport] (main) Cache local address is eq-28947, physical addresses are [127.0.0.1:7901]
Compare these lines between the different tests you run and you should be able to spot the difference.
Also, note that by default, flush-tcp.xml uses a jgroups.tcpping.initial_hosts composed of: localhost[7800],localhost[7801]. So, if you're using anything other than localhost, you'll also need to pass a -D jgroups.tcpping.initial_hosts with the corresponding host values.
-
2. Re: how to use tcp for jgroups communication in infinispan?
manik Apr 7, 2010 4:45 AM (in response to galder.zamarreno)Galder is correct, TCP setups usually have hardcoded initial hosts in the XML file. The flush-tcp.xml in JGroups is a sample only, and only has hardcoded values for localhost. This is why your 2 nodes see each other in step 2 but not in step 3. See:
You will need to copy flush-tcp.xml and edit the initial hosts, or pass in the initial hosts using:
-Djgroups.tcpping.initial_hosts=HOST1:PORT1,HOST2:PORT2,HOST3:PORT3
Or, you could use MPING for discovery instead of TCPPING, which uses UDP multicast for discovery and then TCP for the actual transport:
HTH
Manik
-
3. Re: how to use tcp for jgroups communication in infinispan?
yelin66 Apr 7, 2010 4:15 PM (in response to manik)Got you. Thanks a lot!
-
4. Re: how to use tcp for jgroups communication in infinispan?
jia Apr 21, 2010 5:41 PM (in response to yelin66)I am trying to do the same thing, cluster instances from different nodes. I am successful to creat a cluster on one node with more than one instances, but when I start instance on different nodes, it does not seem to for the cluster. I did do step one in your post, what else I need to do? Also I have one instance on WindowXP, another instance on Unix, does that matter?
Thanks for any help,
Jessica
-
5. Re: how to use tcp for jgroups communication in infinispan?
yelin666 Apr 23, 2010 9:38 AM (in response to jia)Jessica,
To make TCP working, you have to set the initial_hosts either in the JGroups config file or override it by Java system property. An alternative is to use MPING for node discovery and TCP for data communication. Please reference Manik's response in this thread for more details.
Cheers,
Lin
-
6. Re: how to use tcp for jgroups communication in infinispan?
jia Apr 23, 2010 9:45 AM (in response to yelin666)Lin,
Thanks for your reply. But my problem is I can not make the default --- which is the first step in your original posting work. When I use the -Dbind.address=IP for that node, the cluster on different nodes seems do not see another node at all. I have been played with this different ways, just does not seem to get it work. Can you think of any reason why is that?
I will really appreciate any help,
Thanks,
Jessica
-
7. Re: how to use tcp for jgroups communication in infinispan?
yelin666 Apr 23, 2010 9:56 AM (in response to jia)First, did you set -Dbind.address to the actual IP of your box, I tried 0.0.0.0 and it didn't work.
Second, can you try with two nodes having the same OS, so you can exclude the possible issue with different OS.
At last, if it still does not work, the following page got information on how to test if your machine is set up for IP multicast.
http://www.jgroups.org/manual/html/ch02.html
I hope the above information is helpful. Good luck!
-
8. Re: how to use tcp for jgroups communication in infinispan?
jia Apr 23, 2010 10:21 AM (in response to yelin666)Lin,
Thank you very much for your quick reply. I did have things setup on two Linux nodes now, but the result is the same. I am going to check the link you list to see if my system is set good for multicase.
On the other note, for TCP communication, you guys mentioned change the flush-tcp.xml, but this file is in a .jar file, isn't it? How do I get this .xml file to change if it is in a .jar file? I am new to this.
Thanks for all the help,
Jessica
-
9. Re: how to use tcp for jgroups communication in infinispan?
yelin666 Apr 23, 2010 10:32 AM (in response to jia)Jessica,
For the TCP part, you can create an external file, and copy the contents from flush-tcp.xml and update your externernal file. Make sure your external file is under the classpath after deployment. Or just override the Java system property, or use MPING.
Another thing to mention, I am using 4.0.0.FINAL currently, it seems you are using 4.1.0 and somehow query module is under your classpath...
Cheers,
Lin
-
10. Re: how to use tcp for jgroups communication in infinispan?
jia Apr 23, 2010 10:41 AM (in response to yelin666)Yes, Lin,
I am using 4.1.0.ALPHA2, is query in my path a problem? Is there anyway I can get rid of it?
So if I use -Djgroups.tcpping.initial_hosts=HOST1:PORT1,HOST2:PORT2,HOST3:PORT3 when I start guiDemo, will that do the same trick as modifying the flush-tcp.xml?
Thanks,
Jessica
-
11. Re: how to use tcp for jgroups communication in infinispan?
jia Apr 23, 2010 1:03 PM (in response to yelin666)Hi, Lin,
Made TCP work, but default UDP still not working.
Thanks for all th ehelp,
Jessica
-
12. Re: how to use tcp for jgroups communication in infinispan?
yelin666 Apr 23, 2010 2:00 PM (in response to jia)Jessica,
TCP is using unicast. Sounds like multicast may be disabled on your network. Try the procedures in the JGroups document I sent earlier. That probably can help to tell.
Lin