Hi,
We're running into a bit of a problem when trying to delete users through the API. The error returned is of HTML format with 500 error code:
<html><head><title>Error</title></head><body>Internal Server Error</body></html>
Please note:
- We're using Infinispan for userSessions, realmCache and userCache. Rest of the data is in MySQL.
- Issue only occurs when Keycloak servers are highly available (2 servers in our case). Works fine when only one server is up.
Logs reveal that this is possibly a serialization issue related to Infinispan:
[2015-06-12 04:56:54.0303], ERROR, org.infinispan.interceptors.InvocationContextInterceptor default task-11 - ISPN000136: Execution error: org.infinispan.commons.CacheException: java.lang.RuntimeException: Failure to marshal argument(s)
at org.infinispan.commons.util.Util.rewrapAsCacheException(Util.java:581)
at org.infinispan.remoting.transport.jgroups.CommandAwareRpcDispatcher.invokeRemoteCommand(CommandAwareRpcDispatcher.java:176)
at org.infinispan.remoting.transport.jgroups.JGroupsTransport.invokeRemotely(JGroupsTransport.java:521)
at org.infinispan.remoting.rpc.RpcManagerImpl.invokeRemotely(RpcManagerImpl.java:281)
Caused by: java.lang.RuntimeException: Failure to marshal argument(s)
at org.infinispan.remoting.transport.jgroups.CommandAwareRpcDispatcher.marshallCall(CommandAwareRpcDispatcher.java:333)
at org.infinispan.remoting.transport.jgroups.CommandAwareRpcDispatcher.processSingleCall(CommandAwareRpcDispatcher.java:352)
at org.infinispan.remoting.transport.jgroups.CommandAwareRpcDispatcher.invokeRemoteCommand(CommandAwareRpcDispatcher.java:167)
... 94 more
Caused by: org.infinispan.commons.marshall.NotSerializableException: org.keycloak.models.sessions.infinispan.entities.LoginFailureKey
Caused by: an exception which occurred:
in object org.keycloak.models.sessions.infinispan.entities.LoginFailureKey@f42bdd72
-> toString = org.keycloak.models.sessions.infinispan.entities.LoginFailureKey@f42bdd72
in object org.infinispan.commands.write.RemoveCommand@914fd0ce
-> toString = RemoveCommand{key=org.keycloak.models.sessions.infinispan.entities.LoginFailureKey@f42bdd72, value=null, flags=null, valueMatcher=MATCH_ALWAYS}
in object org.infinispan.commands.remote.SingleRpcCommand@bfee4c5c
-> toString = SingleRpcCommand{cacheName='loginFailures', command=RemoveCommand{key=org.keycloak.models.sessions.infinispan.entities.LoginFailureKey@f42bdd72, value=null, flags=null, valueMatcher=MATCH_ALWAYS}}
[2015-06-12 04:56:54.0301], DEBUG, org.infinispan.marshall.core.VersionAwareMarshaller default task-11 - Object is not serializable: java.io.NotSerializableException: org.keycloak.models.sessions.infinispan.entities.LoginFailureKey
at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:860)
at org.jboss.marshalling.AbstractObjectOutput.writeObject(AbstractObjectOutput.java:58)
at org.jboss.marshalling.AbstractMarshaller.writeObject(AbstractMarshaller.java:111)
at org.infinispan.marshall.exts.ReplicableCommandExternalizer.writeCommandParameters(ReplicableCommandExternalizer.java:57)
at org.infinispan.marshall.exts.ReplicableCommandExternalizer.writeObject(ReplicableCommandExternalizer.java:42)
at org.infinispan.marshall.exts.ReplicableCommandExternalizer.writeObject(ReplicableCommandExternalizer.java:30)
at org.infinispan.marshall.core.ExternalizerTable$ExternalizerAdapter.writeObject(ExternalizerTable.java:395)
at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:138)