-
1. Re: Which ports does infinispan use?
arun2arunraj Jan 23, 2015 3:05 AM (in response to nguyenbkcse)Hi Nguyen,
But when I started my cluster of two nodes, Infinispan cache is not sync between 2 nodes
Can you please explain How did you ensured Infinispan cache is not synced ?Thanks & Regards,
ArunRaj. R -
2. Re: Which ports does infinispan use?
nguyenbkcse Jan 23, 2015 3:49 AM (in response to arun2arunraj)I used two clients for two server nodes (client A connected to server A, client B connected to server B). When I used client A to add an entry to the cache of server A (call entry X), it's expected that the cache of server B must have entry X (because of the synchronization of Infinispan cache of 2 nodes). But when I used client B to get cache content of server B, I didn't see entry X. That's my simple explanation of my situation.
Thanks.
-
3. Re: Which ports does infinispan use?
nadirx Jan 23, 2015 4:32 AM (in response to nguyenbkcse)By default jgroups will use the udp stack from the wildfly configuration, so from the above the ports that matter are:
jgroups-mping 45700 (multicast, used for discovery)
jgroups-udp 55200 (unicast), 45688 (multicast) (used for data transfer)
jgroups-udp-fd 54200 (unicast) (used for failure detection)
Unicast traffic will use the default server bind address, while multicast traffic will use a dedicated multicast address (230.0.0.4 by default in your config)
In order to see if the cluster has formed, look at the logs of both nodes. It will show clustering views forming. Attach them here so that we can look at them
-
4. Re: Re: Which ports does infinispan use?
nguyenbkcse Jan 23, 2015 5:03 AM (in response to nadirx)Hi Tristan,
I have open all ports you mentioned, but my server port-offset is 250 as in my host.xml configuration:
<server name="server-three" group="other-server-group" auto-start="true"> <!-- server-three avoids port conflicts by incrementing the ports in the default socket-group declared in the server-group --> <socket-bindings port-offset="250"/> <jvm name="default"> <jvm-options> <option value="-agentlib:jdwp=transport=dt_socket,address=8787,server=y,suspend=n"/> </jvm-options> </jvm> </server>
so I added 250 for each port, 55200 => 55450, 54200 => 54450, other multicast ports are remained same value (45700, 45688). But when I tested 2 servers, their cache still not synced. I attached here my 2 server logs:
-
server_one.log.zip 10.2 KB
-
server_two.log.zip 10.3 KB
-
-
5. Re: Re: Which ports does infinispan use?
rvansa Jan 23, 2015 9:04 AM (in response to nguyenbkcse)Do you have correctly set multicast routing in your cluster? Could you test that it works using netcat (nc) on those machines? Especially the multicasts.
Do those machines have the same IPv4/v6 settings?
Beyond that, logs with TRACE level on org.jgroups package provides us with more clues.
-
6. Re: Re: Re: Which ports does infinispan use?
nguyenbkcse Jan 26, 2015 1:33 AM (in response to rvansa)Hi Radim, I have tested multicast on my machine using McastReceiverTest and McastSenderTest of Jgroups, multicast worked correctly. But for my 2 server nodes, it seems to be not working. Here are my logs file of Jgroups of 2 servers, can you take a look and tell me if there are any trouble.
Thank you
-
jgroups_node_master.log.zip 29.5 KB
-
jgroups_node_slave.log.zip 7.2 KB
-
-
7. Re: Re: Re: Which ports does infinispan use?
rvansa Jan 26, 2015 4:02 AM (in response to nguyenbkcse)From the logs it seems that those nodes are correctly clustered:
2015-01-26 13:36:01,423 DEBUG [org.jgroups.protocols.pbcast.GMS] (Incoming-1,shared=udp) master:server-three1/web: installing view [master:server-three1/web|1] (2) [master:server-three1/web, slave:server-three-slave/web]
2015-01-26 11:36:01,485 DEBUG [org.jgroups.protocols.pbcast.GMS] (ServerService Thread Pool -- 58) slave:server-three-slave/web: installing view [master:server-three1/web|1] (2) [master:server-three1/web, slave:server-three-slave/web]
-
8. Re: Re: Re: Which ports does infinispan use?
nguyenbkcse Jan 26, 2015 11:09 AM (in response to rvansa)But inspite of the logs, cache was not synced betwwen two nodes.
-
9. Re: Re: Re: Which ports does infinispan use?
nadirx Jan 26, 2015 11:17 AM (in response to nguyenbkcse)Can you post your domain.xml ?
-
10. Re: Re: Re: Which ports does infinispan use?
rvansa Jan 26, 2015 12:01 PM (in response to nadirx)Okay, so we need the TRACE logs on both org.jgroups and org.infinispan to find what's wrong.
-
11. Re: Re: Re: Re: Which ports does infinispan use?
nguyenbkcse Jan 26, 2015 11:22 PM (in response to rvansa)Hi Tristan and Radim, I posted my domain.xml and Infinispan logs, can you check if there's any problems. Thank all.
-
domain.xml 84.5 KB
-
infinispan_node_master.log.zip 71.2 KB
-
infinispan_node_slave.log.zip 73.3 KB
-
-
12. Re: Re: Re: Which ports does infinispan use?
nadirx Jan 27, 2015 2:18 AM (in response to nguyenbkcse)Sorry Nguyen, but something is escaping me: from the domain.xml configuration I don't see any declaration of custom caches (in addition to the "system" ones used by clustering internals). Above you claim you are writing data to the cache from one node and reading it from another. Which cache is this ? A custom one ? And how are you initializing/retrieving it ?
-
13. Re: Re: Re: Which ports does infinispan use?
rvansa Jan 27, 2015 4:06 AM (in response to nadirx)When have you executed cache.get()? I don't see any execution of GetKeyValueCommand in the logs. I can see that the value slave:server-three-slave=null was replicated to master.
-
14. Re: Re: Re: Which ports does infinispan use?
nguyenbkcse Jan 29, 2015 11:40 AM (in response to nadirx)Yes, I used a custom Infinispan cache and declared it in my pom.xml. Cache run normally when I disable the firewall.