问题
As a result, when I put the machines under an ELB, the login doesn't work. I have tried TCP and UDP for IP casting. Tried using TCPPING instead of MPING (although not sure whether I used them correctly). Infinispan is being used for distributed caching. Here is the default configuration, followed by the changes I had made:
<subsystem xmlns="urn:jboss:domain:jgroups:7.0">
<channels default="tcp">
<channel name="ee" stack="udp" cluster="ejb"/>
</channels>
<stacks>
<stack name="udp">
<transport type="UDP" socket-binding="jgroups-udp"/>
<protocol type="PING"/>
<protocol type="MERGE3"/>
<socket-protocol type="FD_SOCK" socket-binding="jgroups-udp-fd"/>
<protocol type="FD_ALL"/>
<protocol type="VERIFY_SUSPECT"/>
<protocol type="pbcast.NAKACK2"/>
<protocol type="UNICAST3"/>
<protocol type="pbcast.STABLE"/>
<protocol type="pbcast.GMS"/>
<protocol type="UFC"/>
<protocol type="MFC"/>
<protocol type="FRAG3"/>
</stack>
<stack name="tcp">
<transport type="TCP" socket-binding="jgroups-tcp"/>
<socket-protocol type="MPING" socket-binding="jgroups-mping"/>
<protocol type="MERGE3"/>
<socket-protocol type="FD_SOCK" socket-binding="jgroups-tcp-fd"/>
<protocol type="FD_ALL"/>
<protocol type="VERIFY_SUSPECT"/>
<protocol type="pbcast.NAKACK2"/>
<protocol type="UNICAST3"/>
<protocol type="pbcast.STABLE"/>
<protocol type="pbcast.GMS"/>
<protocol type="MFC"/>
<protocol type="FRAG3"/>
</stack>
</stacks>
</subsystem>
Changed to TCP, and in TCP stack, removed MPING to add TCPPING:
<transport type="TCP" socket-binding="jgroups-tcp"/>
<protocol type="TCPPING">
<property name="initial_hosts"><IP of VM1>[7600],<IP of VM2>[7600]</property>
<property name="port_range">0</property>
</protocol>
How can I further debug the deployment?
回答1:
This is how I debugged it:
Make sure that
jgroups-tcp
andjgroups-tcp-fd
is listening to public interface, and not private interface. These properties are instandalone/configurations/standalone-ha.xml
.While starting the the instances of your cluster via
bin/standalone.sh | bin/standalone.bat
make sure you pass-b <public interface IP>
and not0.0.0.0
(all interfaces). To find the public interface IP, run the following command:ifconfig eth0 | grep -i mask | awk '{print $2}'| cut -f2 -d:
When you start the first instance (should be the instance you passed in
initial_hosts
property; you can trytelnet <IP> 7600
to test if your TCPPING is working or not. It should work for cluster discovery.
来源:https://stackoverflow.com/questions/62673917/keycloakwildfly-infinispan-in-ha-mode-issue-in-detecting-other-machines-in-t