Keycloak 18.0.2 Quarkus debug not working

I try to start Quarkus with the --debug param and I get the following:

Listening for transport dt_socket at address: 8787
2022-10-11 08:14:44,025 INFO  [org.keycloak.common.Profile] (main) Preview feature enabled: token_exchange
2022-10-11 08:14:44,026 WARN  [org.keycloak.common.Profile] (main) Experimental feature enabled: dynamic_scopes
2022-10-11 08:14:44,044 INFO  [org.keycloak.quarkus.runtime.hostname.DefaultHostnameProvider] (main) Hostname settings: FrontEnd: localhost, Strict HTTPS: false, Path: <request>, Strict BackChannel: false, Admin: <request>, Port: -1, Proxied: false
2022-10-11 08:14:44,644 WARN  [org.infinispan.PERSISTENCE] (keycloak-cache-init) ISPN000554: jboss-marshalling is deprecated and planned for removal
2022-10-11 08:14:44,662 WARN  [org.infinispan.CONFIG] (keycloak-cache-init) ISPN000569: Unable to persist Infinispan internal caches as no global state enabled
2022-10-11 08:14:44,683 INFO  [org.infinispan.CONTAINER] (keycloak-cache-init) ISPN000556: Starting user marshaller 'org.infinispan.jboss.marshalling.core.JBossUserMarshaller'
2022-10-11 08:14:44,891 INFO  [org.infinispan.CONTAINER] (keycloak-cache-init) ISPN000128: Infinispan version: Infinispan 'Triskaidekaphobia' 13.0.9.Final
2022-10-11 08:14:45,192 INFO  [org.keycloak.connections.infinispan.DefaultInfinispanConnectionProviderFactory] (main) Node name: node_168962, Site name: null
2022-10-11 08:14:45,593 ERROR [org.keycloak.services] (main) KC-SERVICES0010: Failed to add user 'admin' to realm 'master': user with username exists
2022-10-11 08:14:45,951 INFO  [io.quarkus] (main) Keycloak 18.0.2 on JVM (powered by Quarkus 2.7.5.Final) started in 3.744s. Listening on: http://0.0.0.0:8080 and https://0.0.0.0:8443
2022-10-11 08:14:45,951 INFO  [io.quarkus] (main) Profile dev activated.
2022-10-11 08:14:45,951 INFO  [io.quarkus] (main) Installed features: [agroal, cdi, hibernate-orm, jdbc-h2, jdbc-mariadb, jdbc-mssql, jdbc-mysql, jdbc-oracle, jdbc-postgresql, keycloak, narayana-jta, reactive-routes, resteasy, resteasy-jackson, smallrye-context-propagation, smallrye-health, smallrye-metrics, vault, vertx]
2022-10-11 08:14:45,954 WARN  [org.keycloak.quarkus.runtime.KeycloakMain] (main) Running the server in development mode. DO NOT use this configuration in production.
                                                                                                                 
telnet localhost 8787
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Connection closed by foreign host.

I start the docker container with these ports: -p 8787:8787 -p 8443:8443 -p 8080:8080
the 8080 & 8443 work

Any ideas?

Try to set these env vars:

DEBUG: 'true'
DEBUG_PORT: '*:8787'

Also, I don’t use the --debug switch.

I have already tried with the variables, that wasn’t the problem. However, your answer helped me, because I was missing the *: in front of the port and apparently with the new java that’s mandatory.
So thank you!

1 Like