Admin Console does not work after upgrading from 18.0.2 to 19.0.1
See original GitHub issueDescribe the bug
We upgraded from 18.0.2 to 19.0.1 and can no longer access the admin console. We believe that KC_HTTP_RELATIVE_PATH seems to no longer be honored.
FROM quay.io/keycloak/keycloak:19.0.1 as builder
ENV KC_DB=postgres \
KC_HTTP_RELATIVE_PATH=/auth \
KC_HEALTH_ENABLED=true
RUN /opt/keycloak/bin/kc.sh build
FROM quay.io/keycloak/keycloak:19.0.1
COPY --from=builder /opt/keycloak/lib/quarkus/ /opt/keycloak/lib/quarkus/
COPY themes /opt/keycloak/themes
WORKDIR /opt/keycloak
ENTRYPOINT ["/opt/keycloak/bin/kc.sh", "--spi-login-protocol-openid-connect-legacy-logout-redirect-uri=true", "start"]
Version
19.0.1
Expected behavior
Requests to /auth/admin previously returned the admin console for all versions <=18.0.2
Actual behavior
We now receive an error page
How to Reproduce?
Change the relative path to /auth and attempt to access /auth/admin
Anything else?
We have keycloak running as a docker container behind a reverse proxy, but if I use curl to attempt to access the container directly, I get a successful response using /admin which is why I believe the issue is that KC_HTTP_RELATIVE_PATH is not being honored
Issue Analytics
- State:
- Created a year ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Configuration gone after upgrage SFOS 19.0.0 to 19.0.1
The problem was both firewalls are on remote site and lost all external connections (Sophos Central und VPN), so I can't reach the...
Read more >19.0.1 Issues with Admin Console access in Kubernetes
Using 19.0.2 production mode with PSQL. This not an upgrade and is using a GCloud fresh db with the cloud-sql-proxy and correct service...
Read more >The option KC_HOSTNAME_ADMIN does not work
Hi folks, after upgrading to version 17, I have a problem with configuration. I want to set up access to the admin console...
Read more >Upgrading Guide - Keycloak
It is important that you upgrade the Keycloak server first, and then upgrade the admin-client. Earlier versions of the admin-client might work ......
Read more >FileMaker Server and Java - Overview - Claris
The FileMaker Server Admin Console unexpectedly quits; The FileMaker Server Admin Console stops responding; Clicking "Start Admin Console" on the FileMaker ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@lexcao @westmc Now there is a reasonable explanation. Thanks.
Basically, the
start
command behavior changed in19
so that we have “auto-build” enabled by default. That said, the server will try to run abuild
(if there are build time configuration changes) before actually starting the server. To avoid that, you can use theoptimized
option which tells the server to skip the build prior to starting.Sorry about the confusion, the changes are documented here https://www.keycloak.org/docs/latest/upgrading/#changes-to-the-server-configuration-and-startup. Kinda hidden, I think.
@westmc I’m not sure if the container guide is misleading, but if you want we can create a separate issue for it for improvements.
@lexcao I tried your suggestions and it started working. Based on some additional testing, it looks like KC_HTTP_RELATIVE_PATH changed from a build option to a runtime option in 19. The config documentation should probably be updated. I was able to get it to work by removing the flag from the dockerfile entirely and just setting the flag as part of the run command.
The change in the dockerfile to copy the full folder should probably be added to the release notes for 19. I got the original dockerfile from here and I noticed that it has been updated to what you suggested.
FYI @pedroigor