Skip to content

JDBC resources leaked warning on server startup #34195

Open
@ryanemerson

Description

Before reporting an issue

  • I have read and understood the above terms for submitting issues, and I understand that my issue may be closed without action if I do not follow them.

Area

storage

Describe the bug

On server startup the following warn log is always present:

WARN  [io.agroal.pool] (Quarkus Main Thread) Datasource '<default>': JDBC resources leaked: 1 ResultSet(s) and 0 Statement(s)
2024-10-22 12:07:42,243 INFO  [org.keycloak.quarkus.runtime.storage.infinispan.CacheManagerFactory] (Quarkus Main Thread) Starting Infinispan embedded cache manager
2024-10-22 12:07:42,732 INFO  [org.infinispan.CONTAINER] (ForkJoinPool.commonPool-worker-11) ISPN000556: Starting user marshaller 'org.infinispan.commons.marshall.ImmutableProtoStreamMarshaller'
2024-10-22 12:07:42,902 WARN  [org.jgroups.stack.Configurator] (ForkJoinPool.commonPool-worker-11) JGRP000014: ThreadPool.thread_dumps_threshold has been deprecated: ignored
2024-10-22 12:07:42,911 INFO  [org.infinispan.CLUSTER] (ForkJoinPool.commonPool-worker-11) ISPN000078: Starting JGroups channel `ISPN` with stack `udp`
2024-10-22 12:07:42,913 INFO  [org.jgroups.JChannel] (ForkJoinPool.commonPool-worker-11) local_addr: 52a650d1-3653-40bf-8529-65e191c19fe0, name: fedora-34439
2024-10-22 12:07:42,921 WARN  [org.jgroups.protocols.UDP] (ForkJoinPool.commonPool-worker-11) JGRP000015: the send buffer of socket MulticastSocket was set to 1MB, but the OS only allocated 212.99KB
2024-10-22 12:07:42,921 WARN  [org.jgroups.protocols.UDP] (ForkJoinPool.commonPool-worker-11) JGRP000015: the receive buffer of socket MulticastSocket was set to 20MB, but the OS only allocated 2.50MB
2024-10-22 12:07:42,922 WARN  [org.jgroups.protocols.UDP] (ForkJoinPool.commonPool-worker-11) JGRP000015: the send buffer of socket MulticastSocket was set to 1MB, but the OS only allocated 212.99KB
2024-10-22 12:07:42,922 WARN  [org.jgroups.protocols.UDP] (ForkJoinPool.commonPool-worker-11) JGRP000015: the receive buffer of socket MulticastSocket was set to 25MB, but the OS only allocated 2.50MB
2024-10-22 12:07:42,927 INFO  [org.jgroups.protocols.FD_SOCK2] (ForkJoinPool.commonPool-worker-11) server listening on *.28074
2024-10-22 12:07:43,662 INFO  [org.keycloak.broker.provider.AbstractIdentityProviderMapper] (Quarkus Main Thread) Registering class org.keycloak.broker.provider.mappersync.ConfigSyncEventListener
2024-10-22 12:07:44,932 INFO  [org.jgroups.protocols.pbcast.GMS] (ForkJoinPool.commonPool-worker-11) fedora-34439: no members discovered after 2002 ms: creating cluster as coordinator
2024-10-22 12:07:44,937 INFO  [org.infinispan.CLUSTER] (ForkJoinPool.commonPool-worker-11) ISPN000094: Received new cluster view for channel ISPN: [fedora-34439|0] (1) [fedora-34439]
2024-10-22 12:07:44,971 INFO  [org.infinispan.CLUSTER] (ForkJoinPool.commonPool-worker-11) ISPN000079: Channel `ISPN` local address is `fedora-34439`, physical addresses are `[192.168.225.169:43610]`
2024-10-22 12:07:45,301 INFO  [org.keycloak.connections.infinispan.DefaultInfinispanConnectionProviderFactory] (Quarkus Main Thread) Node name: fedora-34439, Site name: null
2024-10-22 12:07:45,947 WARN  [io.agroal.pool] (Quarkus Main Thread) Datasource '<default>': JDBC resources leaked: 1 ResultSet(s) and 0 Statement(s)
2024-10-22 12:07:46,039 INFO  [io.quarkus] (Quarkus Main Thread) Keycloak 999.0.0-SNAPSHOT on JVM (powered by Quarkus 3.15.1) started in 9.985s. Listening on: http://0.0.0.0:8080. Management interface listening on http://0.0.0.0:9000.
2024-10-22 12:07:46,039 INFO  [io.quarkus] (Quarkus Main Thread) Profile dev activated. Live Coding activated.
2024-10-22 12:07:46,039 INFO  [io.quarkus] (Quarkus Main Thread) Installed features: [agroal, cdi, hibernate-orm, jdbc-h2, jdbc-mariadb, jdbc-mssql, jdbc-mysql, jdbc-oracle, jdbc-postgresql, keycloak, micrometer, narayana-jta, opentelemetry, reactive-routes, rest, rest-jackson, smallrye-context-propagation, smallrye-health, vertx]
2024-10-22 12:07:46,040 WARN  [org.keycloak.quarkus.runtime.KeycloakMain] (Quarkus Main Thread) Running the server in development mode. DO NOT use this configuration in production.

Version

26.0.0

Regression

  • The issue is a regression

Expected behavior

JDBC resource lifecycle should be managed correctly and no warning logs presented to the user

Actual behavior

Warning log is present.

How to Reproduce?

kc.sh start-dev --metrics-enabled=true --health-enabled=true --http-enabled=true --hostname-strict=false --health-enabled=true --metrics-enabled=true --cache=ispn

Anything else?

No response

Blocked external

quarkusio/quarkus#45583

Metadata

Assignees

No one assigned

    Labels

    area/storageIndicates an issue that touches storage (change in data layout or data manipulation)help wantedkind/bugCategorizes a PR related to a bugpriority/normalstatus/blocked-externalUsed for marking Issues/PRs as blocked by some external factors like a bug in Quarkusteam/cloud-native

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions