GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Bug: Keycloak health check not working with HTTP relative path · Issue #964 · testcontainers/testcontainers-python

Bug: Keycloak health check not working with HTTP relative path #964

New issue
Copy link
New issue
Copy link
Closed
#982
Closed
Bug: Keycloak health check not working with HTTP relative path#964
#982
Copy link

Description

@KatharinaGoerlach
KatharinaGoerlach
opened on Feb 4, 2026
Issue body actions

Describe the bug

In case a HTTP relative path is configured the health check requires to consider this relative path.
The Keycloak module does support port number and hard-coded health endpoint but not HTTP relative path during readiness probe (ie Keycloak health check).

(Related topic: With Keycloak version 26.3 the health endpoint is only provided via managament port but not other ports.)

To Reproduce

from testcontainers.keycloak import KeycloakContainer

keycloak = KeycloakContainer('quay.io/keycloak/keycloak:latest') \
        .with_env("KEYCLOAK_ADMIN", 'test') \
        .with_env("KEYCLOAK_ADMIN_PASSWORD", 'test') \
        .with_env("KC_HTTP_RELATIVE_PATH", "/auth") \
        .with_env("KC_HEALTH_ENABLED", 'true') \
        .with_env("KC_HTTP_MANAGEMENT_RELATIVE_PATH", "/auth") \
        .with_command("start-dev")

keycloak.start()

With this Keycloak Container the readiness probe is failing with HTTP error

requests.exceptions.HTTPError: 404 Client Error: Not Found for url: http://localhost:53741/health/ready

However, keycloak health check is successful when HTTP relative path is included,i.e. when the following request is used:

http://localhost:53741/auth/health/ready

For readiness probe in testcontainer please see
https://github.com/testcontainers/testcontainers-python/blob/main/modules/keycloak/testcontainers/keycloak/__init__.py#L89

Runtime environment

Windows System
python 3.13.3
docker 28.4.0
testcontainers-python 4.14.0

Activity

  1. themavik commented on Mar 19, 2026

    @themavik
    themavik
    on Mar 19, 2026
    More actions

    Fix submitted in #988.

  2. Tranquility2
    added a commit that references this issue on Apr 1, 2026

    feat(keycloak): support for relative path and management relative path (

    898faf6
  3. Tranquility2
    linked a pull request that will close this issuefeat(keycloak): support for relative path and management relative path #982on Apr 24, 2026
  4. Tranquility2
    closed this as completedon Apr 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.