4

When I am starting my Wildfly server I am getting this error which ultimately shuts my server from running. What am I missing while installing the server ?

Haseb Ansari
  • 587
  • 1
  • 7
  • 23
  • Looks like your configuration refers to a subsystem "keycloack-server-subsystem" provided by a module which you haven't installed on this platform. You'll need a jar from keycloack, which you'll be able to install with the CLI command `module add` – Aaron Feb 01 '17 at 13:28
  • @Aaron : can u give or have any example do this ? – Haseb Ansari Feb 01 '17 at 14:02
  • 1
    Actually you should probably be following keycloak's installation manual. In [this page](http://blog.keycloak.org/2015/10/getting-started-with-keycloak.html), scroll down to "Install into existing WildFly" – Aaron Feb 01 '17 at 14:14
  • For someone not familiar with JBoss/WildFly, the docs isn't so clear: "Unzip this file into the root directory of your Wildfly distribution." To be explicit is should be something like "Unzip the contents and *merge* them into the Wildfly root directory" because of existing `bin` and `modules` folders – Jonathan Lin Sep 03 '17 at 17:14

4 Answers4

6

Adding little more information to what Haseb Ansari has provided already. Basically, here are the steps that needs to be performed to get keycloak setup in wildfly.

Assumption: Wildfly is extracted to ${user.home}/apps/wildfly, lets call it ${jboss.home} here.

Following are the steps that needs to be done.

1. Download OpenID connect adapter from keycloak

2. Extract keycloak-wildfly-adapter-dist-3.3.0.CR2.zip

$> cd ~/Downloads

$>unzip ./keycloak-wildfly-adapter-dist-3.3.0.CR2.zip -d keycloak-wildfly-adapter

3. copy files to ${jboss.home}

cd keycloak-wildfly-adapter/bin

cp ./adapter-* ${jboss.home}

cp -rf ./modules ${jboss.home}

4. Execute jboss cli

cd ${jboss.home}

$>./bin/jboss-cli.sh --file=adapter-elytron-install-offline.cli

You get a message as below [copied from terminal]

$> wildfly]$./bin/jboss-cli.sh --file=adapter-elytron-install-offline.cli
{
    "outcome" => "success",
    "result" => [("keycloak" => "1.1.0")]
}
{"outcome" => "success"}
{"outcome" => "success"}
{"outcome" => "success"}
{"outcome" => "success"}
{"outcome" => "success"}
{"outcome" => "success"}
{"outcome" => "success"}
{"outcome" => "success"}

You may use ../bin/jboss-cli.sh --file=adapter-install-offline.cli if your wildfly version is 10.

5. Run jboss

./bin/standalone.sh

Bugs Buggy
  • 1,514
  • 19
  • 39
Arun Chandrasekaran
  • 2,370
  • 2
  • 23
  • 33
3

The same error occurred with me.

The solution was copying the keycloak module to the folder below:

{your_jboss_folder}/modules/system/add-ons/keycloak/

I had it running on another server, so it was simply copy and paste. If you don't have it, try searching these modules on keycloak website.

Hope it helps.

Pedro Alvares
  • 479
  • 5
  • 9
  • 1
    This worked for me. Only required the appropriate `module.xml` file at: `{your_jboss_folder}\modules\system\add-ons\keycloak\org\keycloak\keycloak-saml-adapter-subsystem\main\module.xml` – Addison Mar 28 '19 at 02:11
1

I solved this issue by copying the Keycloak adapter content to ${WILDFLY_HOME} and the executing this command from command line

./jboss-cli.sh --file=adapter-install-offline.cli

And then I start the server and everything works fine

Haseb Ansari
  • 587
  • 1
  • 7
  • 23
0

Assumptions:

Keycloak adapter directory: ${keycloak}

WildFly directory : ${wildfly}

Copy all the contents from ${keycloak}/modules/system/ to ${wildfly}/modules/system/

Then navigate to ${wildfly}/bin and copy the contents of the folder ${keycloak}/bin

Now run the command : ./jboss-cli.sh --file=adapter-elytron-install-offline.cli

It should work.

The main thing here is to copy from modules directory of keycloak adapter to wildfly's modules directory.

Shreyash
  • 367
  • 1
  • 3
  • 11