From cc211d22e58178576b4b90978c96c11a385b3c84 Mon Sep 17 00:00:00 2001 From: Guido Grazioli Date: Tue, 14 Dec 2021 13:37:19 +0100 Subject: [PATCH] Workaround 'Protocol family unavailable on a Java+Docker+WildFly' See: https://access.redhat.com/solutions/2801771 --- roles/keycloak/templates/keycloak-service.sh.j2 | 1 + 1 file changed, 1 insertion(+) diff --git a/roles/keycloak/templates/keycloak-service.sh.j2 b/roles/keycloak/templates/keycloak-service.sh.j2 index 6e9a4e2..66fece0 100755 --- a/roles/keycloak/templates/keycloak-service.sh.j2 +++ b/roles/keycloak/templates/keycloak-service.sh.j2 @@ -81,6 +81,7 @@ startKeycloak() { -Djboss.https.port=${KEYCLOAK_HTTPS_PORT} \ -Djboss.management.http.port=${KEYCLOAK_MANAGEMENT_HTTP_PORT} \ -Djboss.management.https.port=${KEYCLOAK_MANAGEMENT_HTTPS_PORT} \ + {% if ansible_facts.virtualization_type == 'docker' %}-Djava.net.preferIPv4Stack=true \{% endif %} -Djboss.node.name={{ inventory_hostname }} 2>&1 >> "${KEYCLOAK_LOGFILE}" & echo "${!}" > "${KEYCLOAK_PIDFILE}" fi