keycloak / keycloak

Open Source Identity and Access Management For Modern Applications and Services
https://www.keycloak.org
Apache License 2.0
23.18k stars 6.73k forks source link

Reopen: Keycloak docker image corrupts itself after a few hours of use #26746

Closed NicoloLazzaroni closed 8 months ago

NicoloLazzaroni commented 9 months ago

Before reporting an issue

Area

dist/quarkus

Describe the bug

This is a reopen of the ticket #21697. Keycloak on docker cannot be started after a few hours of work.

Version

Latest

Expected behavior

Keycloak should continue working normally.

Actual behavior

Keycloak on docker cannot be started after a few hours.

How to Reproduce?

Use the docker-compose file provided in ticket #21697.

Anything else?

All the details are in my new answer in #21697.

NicoloLazzaroni commented 9 months ago

I also send here the message I just sent in the old ticket:

Hello,

I thought it was an issue on my side, but now I bought a new VPS and moved there the docker compose, same exact issue.

docker-compose.yml: `version: '3'

services: keycloak: container_name: keycloak image: quay.io/keycloak/keycloak:latest networks:

Server: Engine: Version: 20.10.24+dfsg1 API version: 1.41 (minimum version 1.12) Go version: go1.19.8 Git commit: 5d6db84 Built: Thu May 18 08:38:34 2023 OS/Arch: linux/amd64 Experimental: false containerd: Version: 1.6.20~ds1 GitCommit: 1.6.20~ds1-1+b1 runc: Version: 1.1.5+ds1 GitCommit: 1.1.5+ds1-1+b1 docker-init: Version: 0.19.0 GitCommit: `

docker-compose version: docker-compose version 1.29.2, build unknown docker-py version: 5.0.3 CPython version: 3.11.2 OpenSSL version: OpenSSL 3.0.11 19 Sep 2023

Latest version of Keycloak with auto-update via Watchtower.

The new error:

keycloak | keycloak | 2024-02-02 15:06:01,914 DEBUG [io.quarkus.bootstrap.classloading.QuarkusClassLoader] (main) Adding elements io.quarkus.bootstrap.classloading.PathTreeClassPathElement[io.prometheus:simpleclient_common / runtime=true resources=null] to QuarkusClassLoader Augmentation Class Loader: PROD keycloak | keycloak | 2024-02-02 15:06:01,914 DEBUG [io.quarkus.bootstrap.classloading.QuarkusClassLoader] (main) Adding elements io.quarkus.bootstrap.classloading.PathTreeClassPathElement[io.prometheus:simpleclient / runtime=true resources=null] to QuarkusClassLoader Augmentation Class Loader: PROD keycloak | keycloak | 2024-02-02 15:06:01,914 DEBUG [io.quarkus.bootstrap.classloading.QuarkusClassLoader] (main) Adding elements io.quarkus.bootstrap.classloading.PathTreeClassPathElement[io.prometheus:simpleclient_tracer_otel / runtime=true resources=null] to QuarkusClassLoader Augmentation Class Loader: PROD keycloak | keycloak | 2024-02-02 15:06:01,914 DEBUG [io.quarkus.bootstrap.classloading.QuarkusClassLoader] (main) Adding elements io.quarkus.bootstrap.classloading.PathTreeClassPathElement[io.prometheus:simpleclient_tracer_common / runtime=true resources=null] to QuarkusClassLoader Augmentation Class Loader: PROD keycloak | keycloak | 2024-02-02 15:06:01,914 DEBUG [io.quarkus.bootstrap.classloading.QuarkusClassLoader] (main) Adding elements io.quarkus.bootstrap.classloading.PathTreeClassPathElement[io.prometheus:simpleclient_tracer_otel_agent / runtime=true resources=null] to QuarkusClassLoader Augmentation Class Loader: PROD keycloak | keycloak | 2024-02-02 15:06:01,915 DEBUG [io.quarkus.bootstrap.classloading.QuarkusClassLoader] (main) Adding elements io.quarkus.bootstrap.classloading.PathTreeClassPathElement[io.quarkus:quarkus-logging-json / runtime=true resources=null] to QuarkusClassLoader Augmentation Class Loader: PROD keycloak | keycloak | 2024-02-02 15:06:01,915 DEBUG [io.quarkus.bootstrap.classloading.QuarkusClassLoader] (main) Adding elements io.quarkus.bootstrap.classloading.PathTreeClassPathElement[io.smallrye.config:smallrye-config-source-keystore / runtime=true resources=null] to QuarkusClassLoader Augmentation Class Loader: PROD keycloak | keycloak | 2024-02-02 15:06:01,915 DEBUG [io.quarkus.bootstrap.classloading.QuarkusClassLoader] (main) Adding elements io.quarkus.bootstrap.classloading.PathTreeClassPathElement[info.picocli:picocli / runtime=true resources=null] to QuarkusClassLoader Augmentation Class Loader: PROD keycloak | keycloak | 2024-02-02 15:06:01,916 DEBUG [io.quarkus.bootstrap.classloading.QuarkusClassLoader] (main) Adding elements io.quarkus.bootstrap.classloading.PathTreeClassPathElement[org.keycloak:keycloak-services / runtime=true resources=null] to QuarkusClassLoader Augmentation Class Loader: PROD keycloak | keycloak | ERROR: Failed to run 'build' command. keycloak | ERROR: java.lang.IllegalArgumentException: /opt/keycloak/lib/lib/main/org.keycloak.keycloak-js-adapter-jar-23.0.5.jar does not exist keycloak | ERROR: /opt/keycloak/lib/lib/main/org.keycloak.keycloak-js-adapter-jar-23.0.5.jar does not exist keycloak | ERROR: /opt/keycloak/lib/lib/main/org.keycloak.keycloak-js-adapter-jar-23.0.5.jar keycloak | For more details run the same command passing the '--verbose' option. Also you can use '--help' to see the details about the usage of the particular command.

shawkins commented 8 months ago

@NicoloLazzaroni this is still going to be an issue with your docker instance. Keycloak will not delete it's own lib jars. If the issue you are experiencing is related to the auto-build, have you instead tried creating an optimized image such that you can use start --optimized instead?

shawkins commented 8 months ago

As mentioned on the other issue, please try to reproduce this outside of docker, and without involving things like watchtower. Maybe that will make it clearer why you seem to be missing jars on subsequent restarts. Closing until there is further feedback.