[keycloak-user] Infinispan caching issues because of unserializable classes

Lohitha Chiranjeewa kalc04 at gmail.com
Thu Dec 3 00:18:00 EST 2015


Many thanks for looking into this and getting the issue sorted out in quick
time Stian. We're looking forward to try out the new version.

I created a JIRA for the class serialization problem here (in case someone
wants to try out ASYNC mode): https://issues.jboss.org/browse/KEYCLOAK-2192


Regards,
Lohitha

On Wed, Dec 2, 2015 at 2:02 PM, Stian Thorgersen <sthorger at redhat.com>
wrote:

> Been digging into this some more and turns out there's a pretty nasty bug
> [1] in the way we our caches are implemented. It's a simple fix though and
> will be resolved for 1.7.
>
> [1] https://issues.jboss.org/browse/KEYCLOAK-2179
>
> On 1 December 2015 at 10:40, Stian Thorgersen <sthorger at redhat.com> wrote:
>
>> We can make those classes serializable. Create a JIRA for it. It's to
>> late for 1.7 release though so won't be fixed until 1.8.
>>
>> We also don't do any testing with ASYNC (as we know it will be
>> problematic, especially since Keycloak doesn't require sticky sessions) or
>> replicated caches, as we recommend using sync + invalidation caches.
>>
>> On 30 November 2015 at 17:56, Lohitha Chiranjeewa <kalc04 at gmail.com>
>> wrote:
>>
>>> I agree that there could be inconsistent behavior with ASYNC mode
>>> depending on what your use case is.
>>>
>>> However, shouldn't the classes I mentioned be made serializable in any
>>> case? They are directly referenced from the classes inside infinispan cache
>>> model package.
>>> On Nov 30, 2015 7:56 PM, "Stian Thorgersen" <sthorger at redhat.com> wrote:
>>>
>>>> I wouldn't not recommend setting async as you may get unpredictable
>>>> behavior
>>>>
>>>> On 30 November 2015 at 15:07, Lohitha Chiranjeewa <kalc04 at gmail.com>
>>>> wrote:
>>>>
>>>>> Yes, the 'mode' of 'realms' and 'users' caches were changed to
>>>>> 'ASYNC'. This causes the app to store the invalidations temporarily w/o
>>>>> sending to other nodes and flush them all only when a threshold value is
>>>>> arrived. I think this storage method causes the Serialization issue.
>>>>>
>>>>> On Mon, Nov 30, 2015 at 7:30 PM, Bill Burke <bburke at redhat.com> wrote:
>>>>>
>>>>>> Did you change caching configuration?
>>>>>>
>>>>>> On 11/30/2015 8:50 AM, Lohitha Chiranjeewa wrote:
>>>>>>
>>>>>>> Issue came up with Realm and User caches. Not User Sessions.
>>>>>>>
>>>>>>> On Mon, Nov 30, 2015 at 7:17 PM, Bill Burke <bburke at redhat.com
>>>>>>> <mailto:bburke at redhat.com>> wrote:
>>>>>>>
>>>>>>>     Or is this related to UserSession cache?
>>>>>>>
>>>>>>>     On 11/30/2015 8:45 AM, Bill Burke wrote:
>>>>>>>      > We don't replicate at all.  Why would this be an issue?
>>>>>>>      >
>>>>>>>      > On 11/30/2015 8:41 AM, Lohitha Chiranjeewa wrote:
>>>>>>>      >> When Infinispan caching is enabled in ASYNC mode, exceptions
>>>>>>> get
>>>>>>>     logged
>>>>>>>      >> at startup due to serialization issues. Basically the
>>>>>>> following
>>>>>>>     classes
>>>>>>>      >> have to implement the Serialiazable interface:
>>>>>>>      >>
>>>>>>>      >> org.keycloak.models.OTPPolicy
>>>>>>>      >> org.keycloak.models.
>>>>>>>      >> RequiredActionProviderModel
>>>>>>>      >>
>>>>>>>      >> There could be other classes as well.
>>>>>>>      >>
>>>>>>>      >> Is this already fixed in 1.7.0 code or shall I put a JIRA?
>>>>>>>      >>
>>>>>>>      >>
>>>>>>>      >> Regards,
>>>>>>>      >> Lohitha.
>>>>>>>      >>
>>>>>>>      >>
>>>>>>>      >> _______________________________________________
>>>>>>>      >> keycloak-user mailing list
>>>>>>>      >> keycloak-user at lists.jboss.org <mailto:
>>>>>>> keycloak-user at lists.jboss.org>
>>>>>>>      >> https://lists.jboss.org/mailman/listinfo/keycloak-user
>>>>>>>      >>
>>>>>>>      >
>>>>>>>
>>>>>>>     --
>>>>>>>     Bill Burke
>>>>>>>     JBoss, a division of Red Hat
>>>>>>>     http://bill.burkecentral.com
>>>>>>>     _______________________________________________
>>>>>>>     keycloak-user mailing list
>>>>>>>     keycloak-user at lists.jboss.org <mailto:
>>>>>>> keycloak-user at lists.jboss.org>
>>>>>>>     https://lists.jboss.org/mailman/listinfo/keycloak-user
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>> --
>>>>>> Bill Burke
>>>>>> JBoss, a division of Red Hat
>>>>>> http://bill.burkecentral.com
>>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> keycloak-user mailing list
>>>>> keycloak-user at lists.jboss.org
>>>>> https://lists.jboss.org/mailman/listinfo/keycloak-user
>>>>>
>>>>
>>>>
>>
>
> _______________________________________________
> keycloak-user mailing list
> keycloak-user at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/keycloak-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/keycloak-user/attachments/20151203/d7442c9b/attachment.html 


More information about the keycloak-user mailing list