Replies: 9 comments 15 replies
-
|
/cc @geoand (devservices), @pedroigor (keycloak), @sberyozkin (keycloak) |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
|
I experienced the same problem. I tried all what has been mentioned above without success. For the record, I write down here how I managed to get back to normal. First let me give you a little bit of context : I'm on Mac. Docker Desktop installed for years. Updated regularly to the latest version. Kubernetes and Supabase deployed on Docker Desktop for quite some time. I was developing a Quarkus microservice requiring a Keycloak. Everything was working just fine : no problem with Keycloak devservices populated by my own Realm description file. Then the nightmare : Suddenly, test started failing with 401 - Unauthorized. I did not upgrade my docker desktop, I did not change whatsoever in my code. It started failing just like that. I tried some cleanup on my code side and docker side. Kill and purge everything. It kept on failing ! Finally the light at the end...The solution was to uninstall Docker Desktop "totally". A simple uninstall followed by a new installation starting up from the previous data files was not enough. You have to clean up Docker's directories. A couple of blog entries explain the directories you have to delete in addition to the uninstall process. And then, after a docker desktop re-installation from scratch, everything was back on tracks ! I did not have to change my code. There is no worse waste of time than searching for a bug that doesn't exist... |
Beta Was this translation helpful? Give feedback.
-
|
I solved this issue by changing the follow in my docker compose file: TO |
Beta Was this translation helpful? Give feedback.
-
|
I was having this issue too. My docker compose file uses localstack, and follows the recommendations here for networking: https://blog.localstack.cloud/2024-03-04-making-connecting-to-localstack-easier/ The compose file looked something like this: services:
db:
image: postgres:15
volumes:
- postgresql_data:/var/lib/postgresql/data
- ./config/db/init.sql:/docker-entrypoint-initdb.d/init.sql
environment:
POSTGRES_HOST_AUTH_METHOD: trust
networks:
aws-local:
dns:
- 10.255.0.253
localstack:
image: localstack/localstack:3
ports:
- "4566:4566" # LocalStack Gateway
- "4510-4559:4510-4559" # external services port range
environment:
# etc.
keycloak:
build:
context: ../my-keycloak-repo
command:
- kc.sh
- start-dev
- --verbose
- --spi-email-template-provider=freemarker-plus-mustache
- --spi-email-template-freemarker-plus-mustache-enabled=true
- --spi-theme-cache-themes=false
environment:
KC_DB: postgres
KC_DB_URL_HOST: db
KC_DB_PASSWORD: keycloak
KC_DB_USERNAME: keycloak
KC_DB_SCHEMA: public
KC_LOG_LEVEL: INFO
KEYCLOAK_ADMIN: admin
KEYCLOAK_ADMIN_PASSWORD: password
ports:
- 8081:8080
depends_on:
- db
networks:
aws-local:
dns:
- 10.255.0.253
networks:
aws-local:
ipam:
config:
- subnet: 10.255.0.0/24Here's what my docker desktop config looked like (latest version for macOS silicon at time of writing `v.48.0`)
I noticed the following in the keycloak docs:
When I changed the IP subnet in my |
Beta Was this translation helpful? Give feedback.
-
|
Thanks, I'll need to go through the list of various successful attempts to resolve it and have some summary in the docs |
Beta Was this translation helpful? Give feedback.
-
|
I don't think it matters what has actually changed; restarting it makes it work again. I experience the problem almost every time after running |
Beta Was this translation helpful? Give feedback.
-
|
I can confirm this issue persists. |
Beta Was this translation helpful? Give feedback.


Uh oh!
There was an error while loading. Please reload this page.
-
I was working with keycloak devservices for quite a while, providing my own realm. Now all of a sudden, I only see
But this is the main login - which always worked?!
My custom realm is not even initialized at all saying
Realm myrealm can not be created 401 - Unauthorized(somewhere hidden I see that it is also referrring to HTTPS required)Container quay.io/keycloak/keycloak:26.2.4 started in PT9.86908S
Quarkus is 3.23.4
I found this old issue #27818 but no conclusion. I tried to find the initial realm or the source of the https setting - which as said seems suddenlty to have come up?!
Beta Was this translation helpful? Give feedback.
All reactions