Open MaltePetersen opened 4 years ago
You need to compile the jms-event-forwarder & user-storage-provider-demo extensions. In a terminal:
After compile 2 prevoius artifacts in extensions folder, How can I deploy all pieces?, when I run docker compose the keycloak container never starts or is up only for a momment.
idm-system_elasticsearch_1 /docker-entrypoint.sh elas ... Up 127.0.0.1:9200->9200/tcp, 9300/tcp
idm-system_grafana_1 /run.sh Up 0.0.0.0:3000->3000/tcp
idm-system_graylog_1 /docker-entrypoint.sh graylog Up 127.0.0.1:12123->12123/udp, 127.0.0.1:12124->12124/tcp, 127.0.0.1:9000->9000/tcp
idm-system_idm-amq_1 /bin/sh -c bin/activemq co ... Up 1883/tcp, 5672/tcp, 61613/tcp, 61614/tcp, 61616/tcp, 127.0.0.1:8161->8161/tcp
idm-system_idm-db_1 docker-entrypoint.sh postgres Up 127.0.0.1:55432->5432/tcp
idm-system_idm-keycloak_1 /opt/jboss/tools/docker-en ... Exit 1
idm-system_mailserver_1 MailHog Up 127.0.0.1:1025->1025/tcp, 127.0.0.1:8025->8025/tcp
idm-system_mongo_1 docker-entrypoint.sh mongod Up 27017/tcp
Container logs error
22:06:30,679 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([("subsystem" => "microprofile-metrics-smallrye")]): java.lang.NullPointerException
at org.wildfly.extension.microprofile.metrics-smallrye@19.1.0.Final//org.wildfly.extension.microprofile.metrics.MicroProfileMetricsSubsystemAdd$2.execute(MicroProfileMetricsSubsystemAdd.java:86)
at org.jboss.as.controller@11.1.1.Final//org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:999)
at org.jboss.as.controller@11.1.1.Final//org.jboss.as.controller.AbstractOperationContext.processStages(AbstractOperationContext.java:743)
at org.jboss.as.controller@11.1.1.Final//org.jboss.as.controller.AbstractOperationContext.executeOperation(AbstractOperationContext.java:467)
at org.jboss.as.controller@11.1.1.Final//org.jboss.as.controller.OperationContextImpl.executeOperation(OperationContextImpl.java:1413)
at org.jboss.as.controller@11.1.1.Final//org.jboss.as.controller.ModelControllerImpl.boot(ModelControllerImpl.java:527)
at org.jboss.as.controller@11.1.1.Final//org.jboss.as.controller.AbstractControllerService.boot(AbstractControllerService.java:515)
at org.jboss.as.controller@11.1.1.Final//org.jboss.as.controller.AbstractControllerService.boot(AbstractControllerService.java:477)
at org.jboss.as.server@11.1.1.Final//org.jboss.as.server.ServerService.boot(ServerService.java:448)
at org.jboss.as.server@11.1.1.Final//org.jboss.as.server.ServerService.boot(ServerService.java:401)
at org.jboss.as.controller@11.1.1.Final//org.jboss.as.controller.AbstractControllerService$1.run(AbstractControllerService.java:416)
at java.base/java.lang.Thread.run(Thread.java:834)
Docker Version: 18.09.5 docker-compose version 1.24.0, build 0aa59064
@thomasdarimont @jannie-louwrens I am facing the same issue which @titobundy posted. I think this is because h2 database is being used instead of postgreSQL
| 15:58:53,398 INFO [org.hibernate.dialect.Dialect] (ServerService Thread Pool -- 67) HHH000400: Using dialect: org.hibernate.dialect.H2Dialect
idm-keycloak_1 | 15:58:53,404 WARN [org.hibernate.dialect.H2Dialect] (ServerService Thread Pool -- 67) HHH000431: Unable to determine H2 database version, certain features may not work
idm-keycloak_1 | 15:58:53,450 INFO [org.hibernate.envers.boot.internal.EnversServiceImpl] (ServerService Thread Pool -- 67) Envers integration enabled? : true
idm-keycloak_1 | 15:58:54,184 INFO [org.hibernate.orm.beans] (ServerService Thread Pool -- 67) HHH10005002: No explicit CDI BeanManager reference was passed to Hibernate, but CDI is available on the Hibernate ClassLoader.
idm-keycloak_1 | 15:58:54,341 INFO [org.hibernate.validator.internal.util.Version] (ServerService Thread Pool -- 67) HV000001: Hibernate Validator 6.0.20.Final
idm-keycloak_1 | 15:58:56,304 INFO [org.hibernate.hql.internal.QueryTranslatorFactoryInitiator] (ServerService Thread Pool -- 67) HHH000397: Using ASTQueryTranslatorFactory
idm-keycloak_1 | 15:58:57,001 INFO [org.keycloak.services] (ServerService Thread Pool -- 67) KC-SERVICES0050: Initializing master realm
idm-keycloak_1 | 15:58:58,311 INFO [org.keycloak.services] (ServerService Thread Pool -- 67) KC-SERVICES0006: Importing users from '/opt/jboss/keycloak/standalone/configuration/keycloak-add-user.json'
idm-keycloak_1 | 15:58:59,141 INFO [org.keycloak.services] (ServerService Thread Pool -- 67) KC-SERVICES0009: Added user 'admin' to realm 'master'
idm-keycloak_1 | 15:58:59,148 INFO [org.keycloak.services] (ServerService Thread Pool -- 67) KC-SERVICES0034: Export of realm 'acme' requested.
idm-keycloak_1 | 15:58:59,148 INFO [org.keycloak.exportimport.singlefile.SingleFileExportProvider] (ServerService Thread Pool -- 67) Exporting realm 'acme' into file /opt/jboss/keycloak/impexp/acme-realm.json
idm-keycloak_1 | 15:58:59,161 FATAL [org.keycloak.services] (ServerService Thread Pool -- 67) Error during startup: java.lang.NullPointerException
idm-keycloak_1 | at org.keycloak.keycloak-server-spi-private@11.0.3//org.keycloak.models.utils.ModelToRepresentation.toRepresentation(ModelToRepresentation.java:325)
idm-keycloak_1 | at org.keycloak.keycloak-services@11.0.3//org.keycloak.exportimport.util.ExportUtils.exportRealm(ExportUtils.java:93)
idm-keycloak_1 | at org.keycloak.keycloak-services@11.0.3//org.keycloak.exportimport.util.ExportUtils.exportRealm(ExportUtils.java:89)
idm-keycloak_1 | at org.keycloak.keycloak-services@11.0.3//org.keycloak.exportimport.singlefile.SingleFileExportProvider$2.runExportImportTask(SingleFileExportProvider.java:83)
idm-keycloak_1 | at org.keycloak.keycloak-services@11.0.3//org.keycloak.exportimport.util.ExportImportSessionTask.run(ExportImportSessionTask.java:35)
idm-keycloak_1 | at org.keycloak.keycloak-server-spi-private@11.0.3//org.keycloak.models.utils.KeycloakModelUtils.runJobInTransaction(KeycloakModelUtils.java:227)
idm-keycloak_1 | at org.keycloak.keycloak-services@11.0.3//org.keycloak.exportimport.singlefile.SingleFileExportProvider.exportRealm(SingleFileExportProvider.java:78)
idm-keycloak_1 | at org.keycloak.keycloak-services@11.0.3//org.keycloak.exportimport.ExportImportManager.runExport(ExportImportManager.java:105)
idm-keycloak_1 | at org.keycloak.keycloak-services@11.0.3//org.keycloak.services.resources.KeycloakApplication.startup(KeycloakApplication.java:147)
idm-keycloak_1 | at org.keycloak.keycloak-wildfly-extensions@11.0.3//org.keycloak.provider.wildfly.WildflyPlatform.onStartup(WildflyPlatform.java:29)
idm-keycloak_1 | at org.keycloak.keycloak-services@11.0.3//org.keycloak.services.resources.KeycloakApplication.
Hi there,
this example is outdated and no longer maintained. Take a look at https://github.com/thomasdarimont/keycloak-project-example for a more recent example.
I get the following error if I try to run the docker compose image: ERROR: Service 'idm-keycloak' failed to build: COPY failed: no source files were specified What can I do to resolve this?
PS C:\Users\peter\Desktop\keycloak-docker-demo-master\idm-system> docker-compose up Building idm-keycloak Step 1/32 : FROM jboss/keycloak:7.0.0 ---> 0e016c61a36f Step 2/32 : ENV KEYCLOAK_ADMIN_USER admin ---> Using cache ---> 0a6b3ad8a5e9 Step 3/32 : ENV KEYCLOAK_ADMIN_PASSWORD admin ---> Using cache ---> acf093e284c3 Step 4/32 : ENV LOG_SERVER_URL udp:graylog ---> Using cache ---> 25c6cda920fc Step 5/32 : ENV LOG_SERVER_PORT 12123 ---> Using cache ---> 49383f8e1f80 Step 6/32 : ENV JDBC_URL JDBC_URL=jdbc:postgresql://sso-db/idm_keycloak_demo ---> Using cache ---> 43a5a240f5b3 Step 7/32 : ENV JDBC_USER keycloak ---> Using cache ---> 604847fd7876 Step 8/32 : ENV JDBC_PASSWORD keycloak ---> Using cache ---> 780cd7081d8e Step 9/32 : ENV JDBC_DRIVERNAME postgres ---> Using cache ---> 0d847dbb744a Step 10/32 : ENV ACTIVE_MQ_USER idm ---> Using cache ---> 72f0892460ec Step 11/32 : ENV ACTIVE_MQ_PASSWORD idm ---> Using cache ---> d97bd5481b50 Step 12/32 : ENV ACTIVE_MQ_URL tcp://sso-amq:61616 ---> Using cache ---> 208d389b3b75 Step 13/32 : ENV KEYCLOAK_EVENT_QUEUE idm.queue.keycloak.rawevents ---> Using cache ---> 53f9231c7db3 Step 14/32 : ENV KEYCLOAK_CONTEXT_PATH u/auth ---> Using cache ---> 1b7ae64a8710 Step 15/32 : ENV JAVA_OPTS -Xms128M -Xmx2G -XX:MetaspaceSize=128M -XX:MaxMetaspaceSize=256m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true -Djava.net.preferIPv4Stack=true ---> Using cache ---> 5eecb222bf73 Step 16/32 : USER root ---> Using cache ---> 4d8667c17709 Step 17/32 : RUN ln -f -s /usr/share/zoneinfo/Europe/Berlin /etc/localtime ---> Using cache ---> 0303c95ee0f3 Step 18/32 : USER jboss ---> Using cache ---> 316bba4bd426 Step 19/32 : ADD /modules /opt/jboss/keycloak/modules ---> Using cache ---> f0476f762e14 Step 20/32 : ADD /themes/springio18 /opt/jboss/keycloak/themes/springio18 ---> Using cache ---> c5eeee11c927 Step 21/32 : ADD /themes/springio19 /opt/jboss/keycloak/themes/springio19 ---> Using cache ---> b18822a74466 Step 22/32 : ADD /themes/wjax18 /opt/jboss/keycloak/themes/wjax18 ---> Using cache ---> 9421df5fa1cd Step 23/32 : COPY keycloak.jks /opt/jboss/keycloak/standalone/configuration ---> Using cache ---> 52d093b8e36b Step 24/32 : COPY activemq-rar.rar /opt/jboss/keycloak ---> Using cache ---> b646f30a9c75 Step 25/32 : COPY extensions/jms-event-forwarder/target/jms-event-forwarder*.jar /opt/jboss/keycloak/modules/de/tdlabs/keycloak/ext/jms-event-forwarder/main/jms-event-forwarder.jar ERROR: Service 'idm-keycloak' failed to build: COPY failed: no source files were specified