Keycloak cluster has 404 not found issue intermittently

Viewed 22

I have a keycloak cluster that has two instances, that is deployed in k8s, and they are connected to postgress. The two instances are behind a load-balancer.

I intermittently get 404 resouces not found. After some investigation, I found that it's not able to get resouces from one of the instances. It seems that the two instances are not sync.

For exmaple, the browser is not able to found the resource intermittently https://keycloak.example.com/resources/ygoi1/admin/keycloak/js/controllers/groups.js

when I run curl localhost:8080/resources/ygoi1/admin/keycloak/js/controllers/groups.js inside the pods.

  • in pod 1, the resource is found.
  • in pod 2, I got 404 not found error

I am thinking how keycloak generate the value after URL path resouces(ygoi1 in this example). After restart the pod2. the issue would disappeared.

I think there maybe some db connection issues, but I don't get any log to verify that.

Anyone has idea how ygoi1 in this example is generated, and is it stored in the db?

0 Answers
Related