Standalone-ha.xml configuration for externalizing Infinispan from Keycloak

We are trying to externalizing the Infinispan Cache from KeyCloak. So basically we have a Keycloak cluster, and then a separate Infinispan cluster (both on Google Cloud Platform). The Infinispan cluster was successfully created and pods run ok. We are trying to modify the standalone-ha.xml file in Keycloak to using the newly created Infinispan cluster. Here is what we did so far according to this:

In Standalone-ha.xml, modified the work, sessions, authentcationsSession, clientSessions, offlineClientSession, loginFailures and actionTokens caches as below (example is for “work” cache):

<replicated-cache name="work">
    <remote-store cache="work" remote-servers="remote-cache" passivation="false" fetch-state="false" purge="false" preload="false" shared="true">
         <property name="rawValues">true</property>
         <property name="marshaller">org.keycloak.cluster.infinispan.KeycloakHotRodMarshallerFactory</property>
         <property name="protocolVersion">2.9</property>
    </remote-store>
</replicated-cache>

  Also, added this to the <socket-binding-group> 

<outbound-socket-binding name="remote-cache"> 
   <remote-destination host="35.223.218.139" port="11222"/> 
 </outbound-socket-binding>

BTW, 35.223.218.139 is the external IP of the Infinispan cluster and the cluster itself is working now (verified by curl post and get).

The issue is that:
1. When keycloak pod runs, it cannot find this class "org.keycloak.cluster.infinispan.KeycloakHotRodMarshallerFactory" 
2. Next we removed this marshaller configure, it then shows error logs like below: 
----------------------------------------------------------

[0m [33m23:59:00,158 WARN [org.infinispan.persistence.manager.PersistenceManagerImpl] (expiration-thread–p26-t1) ISPN000026: Caught exception purging data container!: org.infinispan.persistence.spi.StoreUnavailableException: Store org.infinispan.persistence.remote.RemoteStore@3ffe88ba is unavailable at org.infinispan.persistence.manager.PersistenceManagerImpl.pollStoreAvailability(PersistenceManagerImpl.java:198) at org.infinispan.persistence.manager.PersistenceManagerImpl.start(PersistenceManagerImpl.java:171) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.infinispan.commons.util.SecurityActions.lambda$invokeAccessibly$0(SecurityActions.java:79) at org.infinispan.commons.util.SecurityActions.doPrivileged(SecurityActions.java:71) at org.infinispan.commons.util.SecurityActions.invokeAccessibly(SecurityActions.java:76) at org.infinispan.commons.util.ReflectionUtil.invokeAccessibly(ReflectionUtil.java:181) at org.infinispan.factories.impl.BasicComponentRegistryImpl.startWrapper(BasicComponentRegistryImpl.java:527) at org.infinispan.factories.impl.BasicComponentRegistryImpl$ComponentWrapper.running(BasicComponentRegistryImpl.java:714) at org.infinispan.factories.impl.BasicComponentRegistryImpl.startDependencies(BasicComponentRegistryImpl.java:557) at org.infinispan.factories.impl.BasicComponentRegistryImpl.startWrapper(BasicComponentRegistryImpl.java:513) at org.infinispan.factories.impl.BasicComponentRegistryImpl$ComponentWrapper.running(BasicComponentRegistryImpl.java:714) at org.infinispan.factories.impl.BasicComponentRegistryImpl.startDependencies(BasicComponentRegistryImpl.java:557) at org.infinispan.factories.impl.BasicComponentRegistryImpl.startWrapper(BasicComponentRegistryImpl.java:513) at org.infinispan.factories.impl.BasicComponentRegistryImpl$ComponentWrapper.running(BasicComponentRegistryImpl.java:714) at org.infinispan.factories.impl.BasicComponentRegistryImpl.startDependencies(BasicComponentRegistryImpl.java:557) at org.infinispan.factories.impl.BasicComponentRegistryImpl.startWrapper(BasicComponentRegistryImpl.java:513) at org.infinispan.factories.impl.BasicComponentRegistryImpl$ComponentWrapper.running(BasicComponentRegistryImpl.java:714) at org.infinispan.factories.impl.BasicComponentRegistryImpl.startDependencies(BasicComponentRegistryImpl.java:557) at org.infinispan.factories.impl.BasicComponentRegistryImpl.startWrapper(BasicComponentRegistryImpl.java:513) at org.infinispan.factories.impl.BasicComponentRegistryImpl$ComponentWrapper.running(BasicComponentRegistryImpl.java:714) at org.infinispan.factories.AbstractComponentRegistry.internalStart(AbstractComponentRegistry.java:421) at org.infinispan.factories.AbstractComponentRegistry.start(AbstractComponentRegistry.java:325) at org.infinispan.factories.ComponentRegistry.start(ComponentRegistry.java:165) at org.infinispan.cache.impl.CacheImpl.start(CacheImpl.java:1110) at org.infinispan.cache.impl.AbstractDelegatingCache.start(AbstractDelegatingCache.java:511) at org.infinispan.manager.DefaultCacheManager.wireAndStartCache(DefaultCacheManager.java:654) at org.infinispan.manager.DefaultCacheManager.createCache(DefaultCacheManager.java:599) at org.infinispan.manager.DefaultCacheManager.internalGetCache(DefaultCacheManager.java:481) at org.infinispan.manager.DefaultCacheManager.getCache(DefaultCacheManager.java:465) at org.infinispan.manager.DefaultCacheManager.getCache(DefaultCacheManager.java:451) at org.jboss.as.clustering.infinispan.DefaultCacheContainer.getCache(DefaultCacheContainer.java:83) at org.wildfly.clustering.infinispan.spi.service.CacheServiceConfigurator.get(CacheServiceConfigurator.java:77) at org.wildfly.clustering.infinispan.spi.service.CacheServiceConfigurator.get(CacheServiceConfigurator.java:55) at org.wildfly.clustering.service.FunctionalService.start(FunctionalService.java:67) at org.wildfly.clustering.service.AsyncServiceConfigurator$AsyncService.lambda$start$0(AsyncServiceConfigurator.java:117) at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35) at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1982) at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486) at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1348) at java.lang.Thread.run(Thread.java:748) at org.jboss.threads.JBossThread.run(JBossThread.java:485)

If anyone can help, it’s really appreciated. Thanks.