MAYANK THAKUR
MAYANK THAKUR

Reputation: 913

Getting error, while installing Keycloack in Docker container (OS- Mac M1)

I am facing issue, by installing Keycloack in Docker container om my M1 Mac

I use this code for installing the Keycloack

docker run -e KEYCLOAK_USER=admin -e KEYCLOAK_PASSWORD=admin -p 8080:8080 jboss/keycloak

I paste this called this code in my terminal. After pasting this code, I get these issues or errors.

08:32:06,727 ERROR [org.jboss.modcluster] (ServerService Thread Pool -- 58) MODCLUSTER000034: Failed to start advertise listener: java.net.SocketException: Protocol not available (Error setting socket option)

    08:32:12,771 ERROR [org.jgroups.protocols.UDP] (ServerService Thread Pool -- 58) failed setting interface to /172.17.0.2: java.net.SocketException: Protocol not available (Error setting socket option)

08:32:12,775 ERROR [org.jgroups.protocols.UDP] (ServerService Thread Pool -- 58) failed setting interface to /172.17.0.2: java.net.SocketException: Protocol not available (Error setting socket option)

08:32:12,780 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 58) MSC000001: Failed to start service org.wildfly.clustering.jgroups.channel.ee: org.jboss.msc.service.StartException in service org.wildfly.clustering.jgroups.channel.ee: java.lang.IllegalStateException: java.net.SocketException: Protocol not available

    08:32:13,179 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([

    ("subsystem" => "jgroups"),

    ("channel" => "ee")

]) - failure description: {"WFLYCTL0080: Failed services" => {"org.wildfly.clustering.jgroups.channel.ee" => "java.lang.IllegalStateException: java.net.SocketException: Protocol not available

    Caused by: java.lang.IllegalStateException: java.net.SocketException: Protocol not available

    Caused by: java.net.SocketException: Protocol not available"}}

08:32:13,225 INFO  [org.jboss.as.server] (ServerService Thread Pool -- 46) WFLYSRV0010: Deployed "keycloak-server.war" (runtime-name : "keycloak-server.war")

08:32:13,233 INFO  [org.jboss.as.controller] (Controller Boot Thread) WFLYCTL0183: Service status report

WFLYCTL0186:   Services which failed to start:      service org.wildfly.clustering.jgroups.channel.ee: java.lang.IllegalStateException: java.net.SocketException: Protocol not available

WFLYCTL0448: 42 additional services are down due to their dependencies being missing or failed

08:32:13,491 INFO  [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0212: Resuming server

08:32:13,506 ERROR [org.jboss.as] (Controller Boot Thread) WFLYSRV0026: Keycloak 15.0.2 (WildFly Core 15.0.1.Final) started (with errors) in 24942ms - Started 497 of 930 services (48 services failed or missing dependencies, 683 services are lazy, passive or on-demand)

08:32:13,514 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0060: Http management interface listening on http://127.0.0.1:9990/management

08:32:13,514 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0051: Admin console listening on http://127.0.0.1:9990

Upvotes: 10

Views: 6653

Answers (1)

Kelvin Santiago
Kelvin Santiago

Reputation: 305

Steps:

Clone Keycloak containers repository:

git clone [email protected]:keycloak/keycloak-containers.git

Open server directory (cd keycloak-containers/server) Checkout at desired version, eg. git checkout 13.0.1 Build docker

image docker build -t jboss/keycloak:13.0.1 .

Run Keycloak

docker run --rm -p 8080:8080 -e KEYCLOAK_USER=admin -e KEYCLOAK_PASSWORD=admin jboss/keycloak:13.0.1

You can also use this script:

#/bin/zsh

VERSION=14.0.0 # set version here

cd /tmp
git clone [email protected]:keycloak/keycloak-containers.git
cd keycloak-containers/server
git checkout $VERSION
docker build -t "jboss/keycloak:${VERSION}" .
docker build -t "quay.io/keycloak/keycloak:${VERSION}" .

Check the solution on this reported link: Github issue

Upvotes: 13

Related Questions