pedrobrost / keycloak-docker

Keycloak docker-compose examples
0 stars 1 forks source link

server not accessible but It is running on port 8080 #1

Open flik opened 4 years ago

flik commented 4 years ago

Everything looks good but when I try to access in the browser url localhost:8080 it is not showing anything.

here is docker ps: CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES a8a323301258 mysql_keycloak "/docker-entrypoint-…" 9 hours ago Up 9 seconds 0.0.0.0:8080->8080/tcp keycloak 4c085875c8ce mysql:5.7.22 "docker-entrypoint.s…" 9 hours ago Up 9 hours 3306/tcp mysql-keycloak

pedrobrost commented 4 years ago

I tried again and it worked for me. Show me the logs and I will try to help you.

$ docker-compose logs -f

flik commented 4 years ago

Here is few errors in logs:

keycloak    | 22:45:59,975 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([("deployment" => "keycloak-server.war")]) - failure description: {"WFLYCTL0080: Failed services" => {"jboss.undertow.deployment.default-server.default-host./auth" => "java.lang.RuntimeException: RESTEASY003325: Failed to construct public org.keycloak.services.resources.KeycloakApplication(javax.servlet.ServletContext,org.jboss.resteasy.core.Dispatcher)
keycloak    |     Caused by: java.lang.RuntimeException: RESTEASY003325: Failed to construct public org.keycloak.services.resources.KeycloakApplication(javax.servlet.ServletContext,org.jboss.resteasy.core.Dispatcher)
keycloak    |     Caused by: java.lang.RuntimeException: Failed to connect to database
keycloak    |     Caused by: javax.naming.NameNotFoundException: datasources/KeycloakDS -- service jboss.naming.context.java.jboss.datasources.KeycloakDS"}}
keycloak    | 22:46:00,037 INFO  [org.jboss.as.server] (ServerService Thread Pool -- 45) WFLYSRV0010: Deployed "keycloak-server.war" (runtime-name : "keycloak-server.war")
keycloak    | 22:46:00,056 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-2) WFLYUT0008: Undertow HTTPS listener https suspending
keycloak    | 22:46:00,052 INFO  [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-3) WFLYJCA0019: Stopped Driver service with driver-name = mysql
keycloak    | 22:46:00,077 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-3) WFLYUT0019: Host default-host stopping
keycloak    | 22:46:00,077 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-4) WFLYJCA0010: Unbound data source [java:jboss/datasources/ExampleDS]
keycloak    | 22:46:00,087 INFO  [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-3) WFLYJCA0019: Stopped Driver service with driver-name = h2
keycloak    | 22:46:00,090 INFO  [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 31) WFLYCLINF0003: Stopped users cache from keycloak container
keycloak    | 22:46:00,091 INFO  [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 31) WFLYCLINF0003: Stopped offlineSessions cache from keycloak container
keycloak    | 22:46:00,093 INFO  [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 43) WFLYCLINF0003: Stopped authenticationSessions cache from keycloak container
keycloak    | 22:46:00,092 INFO  [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 44) WFLYCLINF0003: Stopped realms cache from keycloak container
keycloak    | 22:46:00,093 INFO  [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 29) WFLYCLINF0003: Stopped keys cache from keycloak container
keycloak    | 22:46:00,094 INFO  [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 29) WFLYCLINF0003: Stopped sessions cache from keycloak container
keycloak    | 22:46:00,095 INFO  [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 29) WFLYCLINF0003: Stopped loginFailures cache from keycloak container
keycloak    | 22:46:00,094 INFO  [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 44) WFLYCLINF0003: Stopped work cache from keycloak container
keycloak    | 22:46:00,099 INFO  [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 43) WFLYCLINF0003: Stopped authorization cache from keycloak container
keycloak    | 22:46:00,105 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-4) WFLYUT0008: Undertow HTTP listener default suspending
keycloak    | 22:46:00,114 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-4) WFLYUT0007: Undertow HTTP listener default stopped, was bound to 0.0.0.0:8080
keycloak    | 22:46:00,097 INFO  [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 29) WFLYCLINF0003: Stopped actionTokens cache from keycloak container
keycloak    | 22:46:00,082 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-2) WFLYUT0007: Undertow HTTPS listener https stopped, was bound to 0.0.0.0:8443
keycloak    | 22:46:00,117 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-2) WFLYUT0004: Undertow 1.4.18.Final stopping
keycloak    | 22:46:00,107 INFO  [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 54) WFLYCLINF0003: Stopped client-mappings cache from ejb container
keycloak    | 22:46:00,112 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-1) WFLYSRV0028: Stopped deployment keycloak-server.war (runtime-name: keycloak-server.war) in 114ms
keycloak    | 22:46:00,137 INFO  [org.jboss.as.clustering.infinispan] (MSC service thread 1-3) WFLYCLINF0003: Stopped authorizationRevisions cache from keycloak container
keycloak    | 22:46:00,141 INFO  [org.jboss.as.clustering.infinispan] (MSC service thread 1-3) WFLYCLINF0003: Stopped realmRevisions cache from keycloak container
keycloak    | 22:46:00,143 INFO  [org.jboss.as.clustering.infinispan] (MSC service thread 1-3) WFLYCLINF0003: Stopped userRevisions cache from keycloak container
keycloak    | 22:46:00,175 INFO  [org.jboss.as] (MSC service thread 1-4) WFLYSRV0050: Keycloak 3.4.0.Final (WildFly Core 3.0.1.Final) stopped in 164ms
keycloak    | keycloak exited with code 1
pedrobrost commented 4 years ago

Did you try removing the database and creating a new one? I mean deleteding the volume and starting all from 0. (I don't even know if your db is a new one or if you want to keep data)

flik commented 4 years ago

DB is new one. I can do from 0. Let me check...

flik commented 4 years ago

same issue