Keycloak in domain mode - strange behavior with the replication

Hi everyone,

I hope you will be able to help me about a strange behavior I have :slight_smile:

I’m testing Keycloak in a cluster context (domain).
I builded 2 local VMs (VirtualBox) on my computer:

  • OS: Ubuntu 20.04 LTS
  • Keycloak version: 16.1.0
  • no firewall

Details about VM 1/2:

  • 1 * domain controler (port 9990)
  • 1 * host controler
  • 1 * server (port 8180)

Details about VM 2/2:

  • 1 * host controler
  • 1 * server (port 8180)

I builded a PostgreSQL database to share “objects” (don’t know if the word is the right word) between my 2 servers.

In HAL Management Console > Runtime > Topology I can see everything I configured and it’s green.

Scenario 1:

  • I connect to the Keycloak 1/2 (<IP of VM 1>:8180/auth)
  • I connect to the Keycloak 2/2 (<IP of VM 2>:8180/auth)
  • from Keycloak 1/2 I create a user
  • from Keycloak 2/2 I can see it directly
    → it works as expected

Scenario 2:

  • I connect to the Keycloak 1/2 (<IP of VM 1>:8180/auth)
  • I connect to the Keycloak 2/2 (<IP of VM 2>:8180/auth)
  • from Keycloak 2/2 I create a user
  • from Keycloak 1/2 I can see it directly
    → it works as expected

Scenario 3:

  • I connect to the Keycloak 1/2 (<IP of VM 1>:8180/auth)
  • I connect to the Keycloak 2/2 (<IP of VM 2>:8180/auth)
  • from Keycloak 1/2 I create a new Realm
  • from Keycloak 2/2 I can’t see it directly: I need to reload the server from HAL Management Console
    → it doesn’t work as expected

Scenario 4:

  • I connect to the Keycloak 1/2 (<IP of VM 1>:8180/auth)
  • I connect to the Keycloak 2/2 (<IP of VM 2>:8180/auth)
  • from Keycloak 2/2 I create a new Realm
  • from Keycloak 1/2 I can see it directly
    → it works as expected

Is someone knows why Scenario 3 has this behavior?
I expect to be able to create objects / to configure my keycloak from any instance without having to reload all other instances :confused:

It’s probably a parameter in my configuration file but I confess I’m lost :confused:

Thank you very much :slight_smile: