Uploaded image for project: 'Red Hat build of Keycloak'
  1. Red Hat build of Keycloak
  2. RHBK-4019

Regression in DEBUG_PORT handling since 26.4.0 – host binding (*:port / 0.0.0.0:port) no longer works [GHI#43160]

XMLWordPrintable

    • False
    • Hide

      None

      Show
      None
    • False

      Before reporting an issue

      [x] 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

      dist/quarkus

      Describe the bug

      Since Keycloak 26.4.0 (after #39924), running Keycloak in Docker with remote debugging enabled fails when using host binding in DEBUG_PORT (e.g., :8787 or :5005).

      In 26.3.5, the same setup worked as expected.

      Version

      26.4.0

      Regression

      [x] The issue is a regression

      Expected behavior

      Keycloak should start successfully with DEBUG_PORT="*:5005" and the debugger should be listening on the specified port.

      Actual behavior

      In 26.4.0, Keycloak fails to start with the following error when using host binding in DEBUG_PORT:

      ERROR: transport error 202: getaddrinfo: failed to parse address
      ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510)
      JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized [src/jdk.jdwp.agent/share/native/libjdwp/debugInit.c:700]
      

      ✅ Works with DEBUG_PORT=5005 (just the port number, no host binding).
      ✅ Works with only DEBUG: "true" (no DEBUG_PORT), which binds to the default port 8787.
      ❌ Fails with DEBUG_PORT="*:5005".

      How to Reproduce?

      1. Create a docker-compose.yml using Keycloak 26.4.0 with debugging enabled:

      Unable to find source-code formatter for language: yml. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
      services:
        keycloak-26-4-0:
      

      image: quay.io/keycloak/keycloak:26.4.0
      container_name: keycloak-26-4-0
      ports:

      • "8080:8080"
      • "5005:5005"
        environment:
        KC_BOOTSTRAP_ADMIN_USERNAME: "admin"
        KC_BOOTSTRAP_ADMIN_PASSWORD: "admin"
        KC_HTTP_PORT: "8080"
        DEBUG: "true"
        DEBUG_PORT: "*:5005"
        command: ["start-dev"]
        
        

      2. Start the container:

      docker compose up

      3. Observe the startup failure with JDWP transport errors.

      Repeat with Keycloak 26.3.5 using the same setup — the container starts successfully and the debugger listens on port 5005.

      Anything else?

      No response

              Unassigned Unassigned
              pvlha Pavel Vlha
              Keycloak Cloud Native
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: