keycloak-clustered
keycloak-clustered copied to clipboard
JGROUPS_DISCOVERY_EXTERNAL_IP to be set dynamically
@ivangfr, i took inspiration from your valuable work.
I work with an orchestrator, and I cannot manually set the JGROUPS_DISCOVERY_EXTERNAL_IP, as I do not know the ip address of the container nor on which host it will land during the orchestrations.
The simple modification sets up JGROUPS_DISCOVERY_EXTERNAL_IP upon the output provided by the command "hostname -i".
Best /michimau
Please, consider follow the documentation https://infinispan.org/docs/stable/titles/server/server.html in order to understand the services needed for infinispan:
- Al first, you need that each node has a static IP to bind the port. Keep in mind that using
127.0.0.1
will NOT expose the service to other nodes and you should use the IP LAN. - Notice that you also need two open ports to keep the active-active cluster:
tcp/57800
andtcp/7800
. In case your nodes run in the same network segment, you can use a udp-autodiscover function
The first node in the startup process will be the master. This startup process provides all the information you need in case of troubles.