# Keycloak fails to authenticate openid-connect token in cluster mode

**URL:** <https://forum.keycloak.org/t/keycloak-fails-to-authenticate-openid-connect-token-in-cluster-mode/14963>\
**Category:** Configuring the server\
**Tags:** clustering\
**Created:** [April 13, 2022, 5:05pm UTC](https://forum.keycloak.org/t/keycloak-fails-to-authenticate-openid-connect-token-in-cluster-mode/14963 "2022-04-13T17:05:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![selvakumar-invicara](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/selvakumar-invicara/32/4993_2.png) [@selvakumar-invicara](https://forum.keycloak.org/u/selvakumar-invicara)\
**Post date:** [April 13, 2022, 5:05pm UTC](https://forum.keycloak.org/t/keycloak-fails-to-authenticate-openid-connect-token-in-cluster-mode/14963/1 "2022-04-13T17:05:39Z")

</div>

I’m running two keycloak docker instances and configured cluster as specified here [Docker Hub](https://hub.docker.com/r/jboss/keycloak/)

I can able see logs related to clustering and two records in `JGROUPSPING` table. Also it works when authenticate(openid-connect) through Host1 and get access token/refresh token and able to retrieve new access\_token using refresh token via Host2, which means I believe clustering setup is working.

But Im getting 401 error when I make API call to Host2 either using the access token I received from Host1 or access\_token I got from Host1’s refresh token. It works only when I use access\_token received from same host.

My understanding is that these access\_tokens doesn’t related to cookie it should be working seamlessly. But it fails.
