Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keycloak fails on Apple M1 silicon, requires update to v 17.x #122

Closed
david-fisher opened this issue Jun 28, 2022 · 2 comments · Fixed by #123
Closed

Keycloak fails on Apple M1 silicon, requires update to v 17.x #122

david-fisher opened this issue Jun 28, 2022 · 2 comments · Fixed by #123

Comments

@david-fisher
Copy link

Kata 000 step:

docker exec solr1 solr zk cp /security.json zk:security.json -z zoo1:2181

Keycloak doesn't load the configuration from zookeeper, due to a missing udp service:

solr1 | 2022-06-24 17:15:29.285 ERROR (zkCallback-12-thread-2) [ ] o.a.s.c.c.ZkStateReader Error running collections node listener => org.apache.solr.common.SolrException: Well-known config could not be read from url http://keycloak:9080/auth/realms/chorus/.well-known/openid-configuration
...
keycloak | ("subsystem" => "jgroups"),
keycloak | ("channel" => "ee")
keycloak | ]) - failure description: {"WFLYCTL0080: Failed services" => {"org
.wildfly.clustering.jgroups.channel.ee" => "java.lang.IllegalStateException: jav
a.net.SocketException: Protocol not available
keycloak | Caused by: java.lang.IllegalStateException: java.net.SocketExc
eption: Protocol not available
keycloak | Caused by: java.net.SocketException: Protocol not available"}}
keycloak | ESC[0mESC[0m01:08:24,414 INFO [org.jboss.as.server] (ServerServic
e Thread Pool -- 45) WFLYSRV0010: Deployed "keycloak-server.war" (runtime-name :
"keycloak-server.war")

Updating docker-compose.yml to use version 17.0.1-legacy (wildfly support variant, see ):
diff --git a/docker-compose.yml b/docker-compose.yml
index fd7a096..40c3144 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -239,7 +239,7 @@ services:
- prometheus

keycloak:

  • image: quay.io/keycloak/keycloak:16.1.0
  • image: quay.io/keycloak/keycloak:17.0.1-legacy
    container_name: keycloak
    hostname: keycloak
    command: ["-b", "0.0.0.0", "-Dkeycloak.migration.action=import", "-Dkeycloak.migration.provider=dir", "-Dkeycloak.migration.dir=/opt/jboss/keycloak/realm-config", "-Dkeycloak.migration.strategy=OVERWRITE_EXISTING", "-Djboss.socket.binding.port-offset=1000", "-Dkeycloak.profile.feature.upload_scripts=enabled"]

resolves the issue.

Image update referenced in keycloak/keycloak#8846 (comment) and the surrounding thread.

As the error came from wildfly, I used the wildfly version, but I do not know if that is necessary.

Relates to #91, #93, #110

@epugh
Copy link
Collaborator

epugh commented Jun 28, 2022

Great find.... Do you want to submit a PR? Longer term, we need to move to the latest version of Keycloak which removes the underlying wildfly dependency, and apparently starts up MUCH faster....

@david-fisher
Copy link
Author

I don't have write perms to this repo, so I could not do a branch and PR. It's one line, should be easy to do, just remove the -legacy from the change I noted.

@epugh epugh linked a pull request Jul 1, 2022 that will close this issue
@epugh epugh closed this as completed in #123 Aug 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants