Keycloak 17 docker admin console 404 not found
See original GitHub issueDescribe the bug
Keycloak 17 admin console shows 404 error
keycloak.js?version=lpr7f:1956 GET https://[domain]/realms/master/protocol/openid-connect/3p-cookies/step1.html?version=lpr7f 404
Even curl in the container still has the same issue
bash-4.4$ curl https://[domain]/realms/master/protocol/openid-connect/3p-cookies/step1.html?version=lpr7f
<html>
<head><title>404 Not Found</title></head>
<body bgcolor="white">
<center><h1>404 Not Found</h1></center>
<hr><center>nginx</center>
</body>
</html>
Version
17.0.0
Expected behavior
No response
Actual behavior
$ docker logs keycloak
Changes detected in configuration. Updating the server image.
Updating the configuration and installing your custom providers, if any. Please wait.
2022-02-17 03:24:10,702 INFO [io.quarkus.deployment.QuarkusAugmentor] (main) Quarkus augmentation completed in 6149ms
Server configuration updated and persisted. Run the following command to review the configuration:
kc.sh show-config
Next time you run the server, just run:
kc.sh start --spi-connections-jpa-default-migration-strategy=update
2022-02-17 03:24:13,217 INFO [org.keycloak.quarkus.runtime.hostname.DefaultHostnameProvider] (main) Hostname settings: FrontEnd: <domain>, Strict HTTPS: true, Path: <request>, Strict BackChannel: false, Admin: <request>
2022-02-17 03:24:13,987 WARN [org.infinispan.CONFIG] (keycloak-cache-init) ISPN000569: Unable to persist Infinispan internal caches as no global state enabled
2022-02-17 03:24:14,003 WARN [org.infinispan.PERSISTENCE] (keycloak-cache-init) ISPN000554: jboss-marshalling is deprecated and planned for removal
2022-02-17 03:24:14,052 INFO [org.infinispan.CONTAINER] (keycloak-cache-init) ISPN000556: Starting user marshaller 'org.infinispan.jboss.marshalling.core.JBossUserMarshaller'
2022-02-17 03:24:14,271 INFO [org.infinispan.CONTAINER] (keycloak-cache-init) ISPN000128: Infinispan version: Infinispan 'Triskaidekaphobia' 13.0.5.Final
2022-02-17 03:24:14,367 INFO [org.infinispan.CLUSTER] (keycloak-cache-init) ISPN000078: Starting JGroups channel `ISPN`
2022-02-17 03:24:14,368 INFO [org.infinispan.CLUSTER] (keycloak-cache-init) ISPN000088: Unable to use any JGroups configuration mechanisms provided in properties {}. Using default JGroups configuration!
2022-02-17 03:24:14,436 WARN [org.jgroups.protocols.UDP] (keycloak-cache-init) JGRP000015: the send buffer of socket MulticastSocket was set to 1.00MB, but the OS only allocated 212.99KB
2022-02-17 03:24:14,437 WARN [org.jgroups.protocols.UDP] (keycloak-cache-init) JGRP000015: the receive buffer of socket MulticastSocket was set to 20.00MB, but the OS only allocated 212.99KB
2022-02-17 03:24:14,437 WARN [org.jgroups.protocols.UDP] (keycloak-cache-init) JGRP000015: the send buffer of socket MulticastSocket was set to 1.00MB, but the OS only allocated 212.99KB
2022-02-17 03:24:14,437 WARN [org.jgroups.protocols.UDP] (keycloak-cache-init) JGRP000015: the receive buffer of socket MulticastSocket was set to 25.00MB, but the OS only allocated 212.99KB
2022-02-17 03:24:16,448 INFO [org.jgroups.protocols.pbcast.GMS] (keycloak-cache-init) 3ad955a78ecb-42249: no members discovered after 2004 ms: creating cluster as coordinator
2022-02-17 03:24:16,461 INFO [org.infinispan.CLUSTER] (keycloak-cache-init) ISPN000094: Received new cluster view for channel ISPN: [3ad955a78ecb-42249|0] (1) [3ad955a78ecb-42249]
2022-02-17 03:24:16,465 INFO [org.infinispan.CLUSTER] (keycloak-cache-init) ISPN000079: Channel `ISPN` local address is `3ad955a78ecb-42249`, physical addresses are `[172.17.0.2:43808]`
2022-02-17 03:24:16,904 INFO [org.keycloak.connections.infinispan.DefaultInfinispanConnectionProviderFactory] (main) Node name: 3ad955a78ecb-42249, Site name: null
2022-02-17 03:24:17,408 ERROR [org.keycloak.services] (main) KC-SERVICES0010: Failed to add user 'kc-admin' to realm 'master': user with username exists
2022-02-17 03:24:17,799 INFO [io.quarkus] (main) Keycloak 17.0.0 on JVM (powered by Quarkus 2.7.0.Final) started in 6.964s. Listening on: https://0.0.0.0:8443
2022-02-17 03:24:17,800 INFO [io.quarkus] (main) Profile prod activated.
2022-02-17 03:24:17,800 INFO [io.quarkus] (main) Installed features: [agroal, cdi, hibernate-orm, infinispan-client, 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-02-17 03:31:50,850 INFO [org.infinispan.CLUSTER] (Shutdown thread) ISPN000080: Disconnecting JGroups channel `ISPN`
2022-02-17 03:31:50,897 INFO [io.quarkus] (Shutdown thread) Keycloak stopped in 0.087s
2022-02-17 03:31:54,715 INFO [org.keycloak.quarkus.runtime.hostname.DefaultHostnameProvider] (main) Hostname settings: FrontEnd: <domain>, Strict HTTPS: true, Path: <request>, Strict BackChannel: false, Admin: <request>
2022-02-17 03:31:55,467 WARN [org.infinispan.PERSISTENCE] (keycloak-cache-init) ISPN000554: jboss-marshalling is deprecated and planned for removal
2022-02-17 03:31:55,489 WARN [org.infinispan.CONFIG] (keycloak-cache-init) ISPN000569: Unable to persist Infinispan internal caches as no global state enabled
2022-02-17 03:31:55,515 INFO [org.infinispan.CONTAINER] (keycloak-cache-init) ISPN000556: Starting user marshaller 'org.infinispan.jboss.marshalling.core.JBossUserMarshaller'
2022-02-17 03:31:55,707 INFO [org.infinispan.CONTAINER] (keycloak-cache-init) ISPN000128: Infinispan version: Infinispan 'Triskaidekaphobia' 13.0.5.Final
2022-02-17 03:31:55,847 INFO [org.infinispan.CLUSTER] (keycloak-cache-init) ISPN000078: Starting JGroups channel `ISPN`
2022-02-17 03:31:55,847 INFO [org.infinispan.CLUSTER] (keycloak-cache-init) ISPN000088: Unable to use any JGroups configuration mechanisms provided in properties {}. Using default JGroups configuration!
2022-02-17 03:31:55,908 WARN [org.jgroups.protocols.UDP] (keycloak-cache-init) JGRP000015: the send buffer of socket MulticastSocket was set to 1.00MB, but the OS only allocated 212.99KB
2022-02-17 03:31:55,909 WARN [org.jgroups.protocols.UDP] (keycloak-cache-init) JGRP000015: the receive buffer of socket MulticastSocket was set to 20.00MB, but the OS only allocated 212.99KB
2022-02-17 03:31:55,909 WARN [org.jgroups.protocols.UDP] (keycloak-cache-init) JGRP000015: the send buffer of socket MulticastSocket was set to 1.00MB, but the OS only allocated 212.99KB
2022-02-17 03:31:55,909 WARN [org.jgroups.protocols.UDP] (keycloak-cache-init) JGRP000015: the receive buffer of socket MulticastSocket was set to 25.00MB, but the OS only allocated 212.99KB
2022-02-17 03:31:57,918 INFO [org.jgroups.protocols.pbcast.GMS] (keycloak-cache-init) 3ad955a78ecb-30044: no members discovered after 2003 ms: creating cluster as coordinator
2022-02-17 03:31:57,926 INFO [org.infinispan.CLUSTER] (keycloak-cache-init) ISPN000094: Received new cluster view for channel ISPN: [3ad955a78ecb-30044|0] (1) [3ad955a78ecb-30044]
2022-02-17 03:31:57,929 INFO [org.infinispan.CLUSTER] (keycloak-cache-init) ISPN000079: Channel `ISPN` local address is `3ad955a78ecb-30044`, physical addresses are `[172.17.0.2:53471]`
2022-02-17 03:31:58,374 INFO [org.keycloak.connections.infinispan.DefaultInfinispanConnectionProviderFactory] (main) Node name: 3ad955a78ecb-30044, Site name: null
2022-02-17 03:31:59,519 INFO [org.keycloak.quarkus.runtime.storage.database.liquibase.QuarkusJpaUpdaterProvider] (main) Initializing database schema. Using changelog META-INF/jpa-changelog-master.xml
2022-02-17 03:32:21,554 INFO [org.keycloak.services] (main) KC-SERVICES0050: Initializing master realm
2022-02-17 03:32:23,707 INFO [org.keycloak.services] (main) KC-SERVICES0009: Added user 'admin' to realm 'master'
2022-02-17 03:32:23,938 INFO [io.quarkus] (main) Keycloak 17.0.0 on JVM (powered by Quarkus 2.7.0.Final) started in 31.647s. Listening on: https://0.0.0.0:8443
2022-02-17 03:32:23,938 INFO [io.quarkus] (main) Profile prod activated.
2022-02-17 03:32:23,938 INFO [io.quarkus] (main) Installed features: [agroal, cdi, hibernate-orm, infinispan-client, 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]
How to Reproduce?
No response
Anything else?
env:
KEYCLOAK_ADMIN: "admin"
KEYCLOAK_ADMIN_PASSWORD: "xxx"
KC_DB_URL: "jdbc:mariadb://xxx:3306/keycloak"
KC_DB_USERNAME: "keycloak"
KC_DB_PASSWORD: "xxx"
KC_DB: "mariadb"
KC_HOSTNAME: "xxx"
KC_HTTPS_CERTIFICATE_FILE: "/etc/x509/https/tls.crt"
KC_HTTPS_CERTIFICATE_KEY_FILE: "/etc/x509/https/tls.key"
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Keycloak 17.0.0 results in "page not found" for admin url
On using the URL http://localhost:8080/auth/admin I get a “page not found” message. ... Keycloak 17 docker admin console 404 not found.
Read more >java - Keycloak returns "404 - Not Found" page - Stack Overflow
I had set a "Frontend URL" ( Keycloak Admin Console > Realm Settings > General Frontend Url ) for the realm that looked...
Read more >Keycloak Not Working; 404 · Issue #8 · nunux-keeper ... - GitHub
Been trying to get this docker app working. Instructions are easy to follow but http://localhost/keycloak does not load, it just shows a 404...
Read more >jboss/keycloak - Docker Image - Docker Hub
By default there is no admin user created so you won't be able to login to the admin console. To create an admin...
Read more >Keycloak 18.0.0 released
The new Admin Console is now graduated to preview, with the plan for it to ... #10951 Getting 404 not found when using...
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
turn out I fix this problem, by adding
KC_HTTP_RELATIVE_PATH: "/auth"
but I have to say, really really really painful to change the distribution, u guys change too much stuff
@manbobo2002 are you using fresh keycloak 17 or upgrade from keycloak previous version? because i have the same issue when using fresh keycloak 17 development profile, i encountered error 404 keycloak.js not found, while my keycloak is behind nginx reverse proxy as well. my workaround to access my admin console is by disabling ke KC_PROXY and KC_HOSTNAME variable and rollout my keycloak deployment.
Im using keycloak 17 in kubernetes. these are the variables that I configured :
JAVA_OPTS: “-Djava.security.egd=file:/dev/./urandom -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/home -XX:+UseContainerSupport -XX:MaxRAMPercentage=75.0” KC_PROXY: “edge” KEYCLOAK_ADMIN: “admin” KEYCLOAK_ADMIN_PASSWORD: “xxx” KC_DB_URL: “jdbc:mariadb://xxxx:3306/keycloak” KC_DB_USERNAME: “xxx” KC_DB_PASSWORD: “xxx” KC_DB: “mariadb” KC_HTTP_RELATIVE_PATH: “/” KC_HOSTNAME: “xxx.com” KC_HOSTNAME_ADMIN: “admin-xxx.com” KC_HTTP_ENABLED: “true”
any info @pedroigor @DGuhr