Cluster Keycloak - HA, JDBC_PING - JGROUPS_DISCOVERY_EXTERNAL_IP

Dear all,
I’m trying to setup a Keycloak cluster with docker. I have 2 VM one with keycloak and MariaDB another one with kecloak. I have problem with infinispan cache because I setup JGROUPS_DISCOVERY_EXTERNAL_IP: 192.168.100.1 but channel ejb is created with physical address 172.18.0.2:7600

09:16:14,050 INFO [org.infinispan.CLUSTER] (ServerService Thread Pool – 60) ISPN000079: Channel ejb local address is 227c9712f89b, physical addresses are [172.18.0.2:7600]

and the second node of cluster that is on VM2, it is not able to use this address
Have someone the same problem?

Here the yml file for first node
thanks for your time

keycloak_1:
image: jboss/keycloak:latest
environment:
DB_VENDOR: mariadb
DB_ADDR: localhost
DB_DATABASE: keycloak
DB_USER: root
DB_PORT: 3306
DB_PASSWORD: Password
KEYCLOAK_USER: root
KEYCLOAK_PASSWORD: Password
KEYCLOAK_FRONTEND_URL: “http://test.local.com/auth
PROXY_ADDRESS_FORWARDING: “true”
JGROUPS_DISCOVERY_EXTERNAL_IP: 192.168.100.1
JGROUPS_DISCOVERY_PROTOCOL: JDBC_PING
CACHE_OWNERS_COUNT: 2
CACHE_OWNERS_AUTH_SESSIONS_COUNT: 2
ports:
- 80:8080
- 7600:7600
restart: on-failure

Hi, I am facing the exact same issue.
Were you able to solve it?

@guerai or whoever is looking for a solution.
See comment below.

The suggested workaround works. I have set ip up with success today.
Create a custom JDBC_PING.cli that adds the JGROUPS_DISCOVERY_EXTERNAL_IP in the configuration.
Mount this custom file in place of the normal one.

I am surprised that it is not part of the official container but the multi-host docker deployment must not be a supported topology.

@infra-monkey , thank you for suggestion. It works for me as well.
Really it is very surprised that many manuals contains information about this env variable but it doesn’t work without modification.