[keycloak-user] Update from 1.8.1 to 1.9.2: Persistent sessions fail to load
Marek Posolda
mposolda at redhat.com
Mon Apr 18 06:43:51 EDT 2016
We don't support (and never tested) the setup, which is using infinispan
file-store to store the infinispan user/client sessions by infinispan.
Are you using offline sessions? If so, you don't need to configure
infinispan store. Keycloak takes care of persisting offline user/client
sessions into it's database and restore them automatically to infinispan
at next startup. We plan to add support for optionally persist
non-offline user/client sessions too to have them "survive" server
restart. But it's not yet supported ATM.
So for now, I suggest you manually delete the file where are infinispan
sessions stored.
Marek
On 18/04/16 12:32, Martin Ott wrote:
> Hi,
>
> I have an instance of Keycloak 1.8.1 running which is configured to persist the sessions stored in infinispan. I have added this change to the configuration in order to keep sessions in case of a restart of the process or machine.
>
> Configuration in standalone.xml looks like this:
>
> <local-cache name="sessions”>
> <file-store purge="false"/>
> </local-cache>
>
>
> After upgrading the Keycloak instance to version 1.9.2 the console includes the following stacktrace when acessing the sessions in the admin UI. It also cannot load org.keycloak.models.sessions.infinispan.entities.UserSessionEntity:
>
> — - snip — -
> 17:49:07,056 ERROR [org.infinispan.persistence.file.SingleFileStore] (persistence-thread--p9-t1) ISPN000252: Error executing parallel store task: org.infinispan.persistence.spi.PersistenceException: java.io.InvalidClassException: org.keycloak.models.sessions.infinispan.entities.ClientSessionEntity; Module load failed
> at org.infinispan.marshall.core.MarshalledEntryImpl.unmarshall(MarshalledEntryImpl.java:116)
> at org.infinispan.marshall.core.MarshalledEntryImpl.getValue(MarshalledEntryImpl.java:61)
> at org.infinispan.persistence.PersistenceUtil.convert(PersistenceUtil.java:133)
> at org.infinispan.persistence.util.PersistenceManagerCloseableSupplier$SupplierCacheLoaderTask.processEntry(PersistenceManagerCloseableSupplier.java:75)
> at org.infinispan.persistence.file.SingleFileStore$2.call(SingleFileStore.java:537)
> at org.infinispan.persistence.file.SingleFileStore$2.call(SingleFileStore.java:531)
> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> at org.infinispan.util.concurrent.WithinThreadExecutor.execute(WithinThreadExecutor.java:21)
> at java.util.concurrent.ExecutorCompletionService.submit(ExecutorCompletionService.java:181)
> at org.infinispan.executors.ExecutorAllCompletionService.submit(ExecutorAllCompletionService.java:31)
> at org.infinispan.persistence.file.SingleFileStore.process(SingleFileStore.java:531)
> at org.infinispan.persistence.manager.PersistenceManagerImpl.processOnAllStores(PersistenceManagerImpl.java:447)
> at org.infinispan.persistence.manager.PersistenceManagerImpl.processOnAllStores(PersistenceManagerImpl.java:432)
> at org.infinispan.persistence.util.PersistenceManagerCloseableSupplier.lambda$get$261(PersistenceManagerCloseableSupplier.java:115)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> at java.lang.Thread.run(Thread.java:745)
> Caused by: java.io.InvalidClassException: org.keycloak.models.sessions.infinispan.entities.ClientSessionEntity; Module load failed
> at org.jboss.marshalling.ModularClassResolver.resolveClass(ModularClassResolver.java:104)
> at org.jboss.marshalling.river.RiverUnmarshaller.doReadClassDescriptor(RiverUnmarshaller.java:948)
> at org.jboss.marshalling.river.RiverUnmarshaller.doReadNewObject(RiverUnmarshaller.java:1255)
> at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:276)
> at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:209)
> at org.jboss.marshalling.AbstractObjectInput.readObject(AbstractObjectInput.java:41)
> at org.infinispan.commons.marshall.jboss.AbstractJBossMarshaller.objectFromObjectStream(AbstractJBossMarshaller.java:134)
> at org.infinispan.marshall.core.VersionAwareMarshaller.objectFromByteBuffer(VersionAwareMarshaller.java:101)
> at org.infinispan.commons.marshall.AbstractDelegatingMarshaller.objectFromByteBuffer(AbstractDelegatingMarshaller.java:80)
> at org.infinispan.marshall.core.MarshalledEntryImpl.unmarshall(MarshalledEntryImpl.java:114)
> ... 18 more
> Caused by: org.jboss.modules.ModuleNotFoundException: org.keycloak.keycloak-model-sessions-infinispan:main
> at org.jboss.modules.ModuleLoader.loadModule(ModuleLoader.java:223)
> at org.jboss.marshalling.ModularClassResolver.resolveClass(ModularClassResolver.java:102)
> ... 27 more
> - - snip - -
>
> I assume that the sessions cannot be deserialized due to the module reorg in version 1.9. Is this correct? How could the sessions be migrated to 1.9.x?
>
> Cheers,
> Martin
>
>
>
>
> _______________________________________________
> keycloak-user mailing list
> keycloak-user at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/keycloak-user
More information about the keycloak-user
mailing list