question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

keycloak not starting

See original GitHub issue

Describe the bug

Configuring Keycloak by modifying realm and user templates...
Creating Admin user...
Added 'admin' to '/opt/jboss/keycloak/standalone/configuration/keycloak-add-user.json', restart server to load user
Starting Keycloak server...
User with username 'admin' already added to '/opt/jboss/keycloak/standalone/configuration/keycloak-add-user.json'
-Dkeycloak.migration.action=import -Dkeycloak.migration.provider=dir -Dkeycloak.migration.strategy=IGNORE_EXISTING -Dkeycloak.migration.dir=/scripts/ -Djboss.bind.address=0.0.0.0
=========================================================================
  Using PostgreSQL database
=========================================================================
14:43:39,506 INFO  [org.jboss.modules] (CLI command executor) JBoss Modules version 1.9.0.Final
Cannot start embedded server: WFLYEMB0022: Cannot invoke 'start' on embedded process: WFLYSRV0126: Could not create server content directory: /opt/jboss/keycloak/standalone/data/content
14:43:41,137 INFO  [org.jboss.modules] (CLI command executor) JBoss Modules version 1.9.0.Final
Cannot start embedded server: WFLYEMB0022: Cannot invoke 'start' on embedded process: WFLYSRV0126: Could not create server content directory: /opt/jboss/keycloak/standalone/data/content
=========================================================================
  JBoss Bootstrap Environment
  JBOSS_HOME: /opt/jboss/keycloak
  JAVA: /usr/lib/jvm/java/bin/java
  JAVA_OPTS:  -server -Xms64m -Xmx512m -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true 
=========================================================================
14:43:41,987 INFO  [org.jboss.modules] (main) JBoss Modules version 1.9.0.Final
java.lang.IllegalStateException: WFLYSRV0126: Could not create server content directory: /opt/jboss/keycloak/standalone/data/content
	at org.jboss.as.server.ServerEnvironment.<init>(ServerEnvironment.java:491)
	at org.jboss.as.server.Main.determineEnvironment(Main.java:388)
	at org.jboss.as.server.Main.main(Main.java:96)
	at org.jboss.modules.Module.run(Module.java:352)
	at org.jboss.modules.Module.run(Module.java:320)
	at org.jboss.modules.Main.main(Main.java:593)

Che version

che-server:7.4.0 chectl/7.4.0 linux-x64 node-v10.17.0

  • nightly

Runtime

  • kubernetes (include output of kubectl version) kubernate version: v1.15.2

Installation method

  • chectl <!–chectl server:start --platform k8s --multiuser --domain=192.168.xxx.xxx --installer=helm -->

Environment

  • my computer
    • Linux

Additional context

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
leolopez89commented, Mar 26, 2021

Same bug, I solved the problem with:

chmod 777 ./keycloak/db/ -R
1reaction
rodolfoapcommented, Dec 3, 2020

Found same bug when starting container. My docker-compose.yaml contains:

        volumes:
            - ./keycloak/db/:/opt/jboss/keycloak/standalone/data/

So, I had to mkdir -p ./keycloak/db/content which would create /opt/jboss/keycloak/standalone/data/ before running the container, and that worked. I just can notice this occurs since I’ve added x509 certificates to Keycloak to run it over https.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Not able to start KeyCloak - Configuring the server
I just downloaded KeyCloak, went to getting started and started server using sh ./standalone.sh. I am on Ubuntu 18 with OpenJDK 11.0.10.
Read more >
Keycloak server in docker fails to start in standalone mode?
Below are the working commands to start a Keycloak server in docker properly with PostgreSQL as the database.
Read more >
Running Keycloak in a container
Starting the optimized Keycloak docker image​​ Keycloak starts in production mode, using only secured HTTPS communication, and is available on https://localhost: ...
Read more >
Camunda 8 Self Managed docker compose keycloak not start
I had the same problem for keycloak. The root cause of the issue is due to the network you are using.I found this...
Read more >
Installing and running Keycloak - Packt Subscription
Once you have installed Keycloak and created the initial admin account, it's easy to start Keycloak. ... You can verify that Keycloak is...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found