Skip to content

Conversation

@koelle25
Copy link
Contributor

@koelle25 koelle25 commented Oct 10, 2024

Closes #33780

This PR tries to fix the issue described in #33780 by using the same approach as in jpa-changelog-24.0.2.xml.

I wanted to test it by building Keycloak as described in docs/building.md, but it failed due to other problems, see spoiler below.

mvnw failed with the following error (despite having JDK 21):
$ ./mvnw clean install
...
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project keycloak-common: Fatal error compiling: Fehler: Releaseversion 8 nicht unterstützt -> [Help 1]
$ ./mvnw -version
Apache Maven 3.9.8 (36645f6c9b5079805ea5009217e36f2cffd34256)
Maven home: /home/kevin/.m2/wrapper/dists/apache-maven-3.9.8/af622e91
Java version: 21.0.4, vendor: Ubuntu, runtime: /usr/lib/jvm/java-21-openjdk-amd64
Default locale: de_DE, platform encoding: UTF-8
OS name: "linux", version: "6.8.0-45-generic", arch: "amd64", family: "unix"

Instead I've tested the changes by manually editing and replacing META-INF/jpa-changelog-26.0.0.xml in /opt/keycloak/lib/lib/main/org.keycloak.keycloak-model-jpa-26.0.0.jar (using jar xf and jar uf).

Migration was then successful and Keycloak started without problems.

Docker container logs:
keycloak     | 2024-10-10 15:35:04,277 ERROR [org.keycloak.quarkus.runtime.configuration.mappers.PropertyMappers] (main) Hostname v1 options [hostname-strict-backchannel, proxy] are still in use, please review your configuration
keycloak     | 2024-10-10 15:35:16,868 INFO  [org.keycloak.quarkus.runtime.storage.infinispan.CacheManagerFactory] (main) Starting Infinispan embedded cache manager
keycloak     | 2024-10-10 15:35:19,856 INFO  [org.infinispan.CONTAINER] (Thread-5) ISPN000556: Starting user marshaller 'org.infinispan.commons.marshall.ImmutableProtoStreamMarshaller'
keycloak     | 2024-10-10 15:35:21,352 WARN  [org.jgroups.stack.Configurator] (Thread-5) JGRP000014: ThreadPool.thread_dumps_threshold has been deprecated: ignored
keycloak     | 2024-10-10 15:35:21,363 INFO  [org.infinispan.CLUSTER] (Thread-5) ISPN000078: Starting JGroups channel `ISPN` with stack `udp`
keycloak     | 2024-10-10 15:35:21,451 INFO  [org.jgroups.JChannel] (Thread-5) local_addr: 8ced2657-1ec8-48b4-bfb6-b2f7c13e14e8, name: 6e8ff1c3a903-30763
keycloak     | 2024-10-10 15:35:21,456 WARN  [org.jgroups.protocols.UDP] (Thread-5) JGRP000015: the send buffer of socket MulticastSocket was set to 1MB, but the OS only allocated 212.99KB
keycloak     | 2024-10-10 15:35:21,457 WARN  [org.jgroups.protocols.UDP] (Thread-5) JGRP000015: the receive buffer of socket MulticastSocket was set to 20MB, but the OS only allocated 212.99KB
keycloak     | 2024-10-10 15:35:21,457 WARN  [org.jgroups.protocols.UDP] (Thread-5) JGRP000015: the send buffer of socket MulticastSocket was set to 1MB, but the OS only allocated 212.99KB
keycloak     | 2024-10-10 15:35:21,458 WARN  [org.jgroups.protocols.UDP] (Thread-5) JGRP000015: the receive buffer of socket MulticastSocket was set to 25MB, but the OS only allocated 212.99KB
keycloak     | 2024-10-10 15:35:21,465 INFO  [org.jgroups.protocols.FD_SOCK2] (Thread-5) server listening on *.28684
keycloak     | 2024-10-10 15:35:23,554 INFO  [org.jgroups.protocols.pbcast.GMS] (Thread-5) 6e8ff1c3a903-30763: no members discovered after 2003 ms: creating cluster as coordinator
keycloak     | 2024-10-10 15:35:23,563 INFO  [org.infinispan.CLUSTER] (Thread-5) ISPN000094: Received new cluster view for channel ISPN: [6e8ff1c3a903-30763|0] (1) [6e8ff1c3a903-30763]
keycloak     | 2024-10-10 15:35:24,052 INFO  [org.infinispan.CLUSTER] (Thread-5) ISPN000079: Channel `ISPN` local address is `6e8ff1c3a903-30763`, physical addresses are `[172.18.0.3:44220]`
keycloak     | 2024-10-10 15:35:25,453 INFO  [org.keycloak.connections.infinispan.DefaultInfinispanConnectionProviderFactory] (main) Node name: 6e8ff1c3a903-30763, Site name: null
keycloak     | 2024-10-10 15:35:30,767 INFO  [org.keycloak.quarkus.runtime.storage.database.liquibase.QuarkusJpaUpdaterProvider] (main) Updating database. Using changelog META-INF/jpa-changelog-master.xml
keycloak     | 
keycloak     | UPDATE SUMMARY
keycloak     | Run:                          3
keycloak     | Previously run:             141
keycloak     | Filtered out:                 0
keycloak     | -------------------------------
keycloak     | Total change sets:          144
keycloak     | 
keycloak     | 2024-10-10 15:35:33,255 WARN  [io.agroal.pool] (main) Datasource '<default>': JDBC resources leaked: 3 ResultSet(s) and 0 Statement(s)
keycloak     | 2024-10-10 15:35:33,256 WARN  [io.agroal.pool] (main) Datasource '<default>': JDBC resources leaked: 9 ResultSet(s) and 0 Statement(s)
keycloak     | 2024-10-10 15:35:34,664 INFO  [org.keycloak.storage.datastore.DefaultMigrationManager] (main) Migrating older model to 26.0.0
keycloak     | 2024-10-10 15:35:40,369 INFO  [org.keycloak.broker.provider.AbstractIdentityProviderMapper] (main) Registering class org.keycloak.broker.provider.mappersync.ConfigSyncEventListener
keycloak     | 2024-10-10 15:35:40,529 WARN  [io.agroal.pool] (main) Datasource '<default>': JDBC resources leaked: 3 ResultSet(s) and 0 Statement(s)
keycloak     | 2024-10-10 15:35:41,357 INFO  [io.quarkus] (main) Keycloak 26.0.0 on JVM (powered by Quarkus 3.15.1) started in 44.397s. Listening on: https://0.0.0.0:8443
keycloak     | 2024-10-10 15:35:41,358 INFO  [io.quarkus] (main) Profile prod activated. 
keycloak     | 2024-10-10 15:35:41,358 INFO  [io.quarkus] (main) Installed features: [agroal, cdi, hibernate-orm, jdbc-postgresql, keycloak, narayana-jta, opentelemetry, reactive-routes, rest, rest-jackson, smallrye-context-propagation, vertx]

@koelle25 koelle25 requested a review from a team as a code owner October 10, 2024 13:47
Copy link
Contributor

@ahus1 ahus1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, one small change necessary IMHO

@ahus1 ahus1 enabled auto-merge (squash) October 10, 2024 14:54
@ahus1 ahus1 merged commit 23a6822 into keycloak:main Oct 10, 2024
@koelle25 koelle25 deleted the koelle25-patch-1 branch October 15, 2024 09:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Upgrade to 26 fails with 'ERROR: index "idx_us_sess_id_on_cl_sess" does not exist'

4 participants