keycloak
keycloak copied to clipboard
Clear expired events errors
Describe the bug
After upgrading to Keycloak 19.0.0, the following errors are logged in the server log:
ERROR [org.keycloak.services.scheduled.ScheduledTaskRunner] (Timer-2) Failed to run scheduled task ClearExpiredEvents: java.lang.IllegalAccessError: class org.keycloak.services.scheduled.ClusterAwareScheduledTaskRunner$1 tried to access protected field org.keycloak.services.scheduled.ScheduledTaskRunner.task (org.keycloak.services.scheduled.ClusterAwareScheduledTaskRunner$1 is in unnamed module of loader '[email protected]' @1c229870; org.keycloak.services.scheduled.ScheduledTaskRunner is in unnamed module of loader '[email protected]' @558b25b9)
at [email protected]//org.keycloak.services.scheduled.ClusterAwareScheduledTaskRunner$1.call(ClusterAwareScheduledTaskRunner.java:56)
at [email protected]//org.keycloak.services.scheduled.ClusterAwareScheduledTaskRunner$1.call(ClusterAwareScheduledTaskRunner.java:52)
at [email protected]//org.keycloak.cluster.infinispan.InfinispanClusterProvider.executeIfNotExecuted(InfinispanClusterProvider.java:78)
at [email protected]//org.keycloak.services.scheduled.ClusterAwareScheduledTaskRunner.runTask(ClusterAwareScheduledTaskRunner.java:52)
at [email protected]//org.keycloak.services.scheduled.ScheduledTaskRunner.run(ScheduledTaskRunner.java:54)
at [email protected]//org.keycloak.timer.basic.BasicTimerProvider$1.run(BasicTimerProvider.java:53)
at java.base/java.util.TimerThread.mainLoop(Timer.java:556)
at java.base/java.util.TimerThread.run(Timer.java:506)
Version
19.0.0-legacy
Expected behavior
No response
Actual behavior
No response
How to Reproduce?
No response
Anything else?
The issue may be caused by the fact that this class was moved in cb81a17.
Same here, for 19.0.0-legacy. I can reproduce simply by running:
docker run --rm -p 8080:8080 -e KEYCLOAK_USER=admin -e KEYCLOAK_PASSWORD=admin quay.io/keycloak/keycloak:19.0.0-legacy
and waiting for 5-15 minutes. I also tried the non-docker version and it has the same issue. I didn't try Quarkus / keycloak X.
Just for any others finding this issue - keycloak 19.0.1 still has this issue.
I have made a mistake - I was also referring to the legacy version. I have fixed the description.
Same issue here with version 19.0.1-legacy. What's the potential impact of this error and can it be fixed on installation side (e.g. via configuration / scripts)?
This seems to not be included in 19.0.2 despite the milestone set to 19.0.2.
Indeed. I guess this warrants a 19.0.3...
@ahus1, @abstractj issue #13396 is mentioned in the 19.0.2 release notes as fixed, but there have been a few messages saying that this is not the case - there have also been other issues mentioning this.
The problem is still present in 19.0.2-legacy (see https://github.com/keycloak/keycloak/issues/14476) Unfortunately, the commit has not been shipped in the 19.0.2.
@ahus1 do you know if the fix was shipped on 19.0.2? We got some reports from people mentioning the opposite, please see the comments above.
I confirm that this has sadly not shipped as part of 19.0.2. I'll prepare a PR for the 19.x branch to backport this.
Milestone and project assignment updated; @abstractj please review.
PR #14574 created, builds are still running.
This error still occurs in our KeyCloak-Instance. In this feed i couldnt quite read out if the error is fixed now and if so what steps i have to take to solve it in our instance
You have to update to KC 19.0.3, it is fixed there.
Faced the same problem and solved by below workaround.
In our case, somehow the username "admin" under master realm changed to some other username. Issue resolved after creating username "admin" under master realm and assigned with admin roles.