Openshift Cluster Import User

Hello guys,

So I want to Import a collection of user from a json file (approx. 1000), and I don’t really know the format of the requested json file, so I wanted to export first, and then copy the existing format of exported file into to-be-imported file.

To export users I tried to follow this link , but I don’t where I should enter this commands to. I am running my server on Openshift. I have a single POD running the server. When I enter the terminal of that POD via manage.openshift I do not see any standalone.sh files or etc. Can you help me on that?


If i can bulk insert users via Admin Dashboard, I could use that too, but I guess I need the proper format of the json file. If you could send me a sample I would very appreciate it.

OK. I finally got the correct path for the command to work. Files were at opt/jboss/keycloak/. But when I run the command it gives me this errors

09:36:06,652 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([

    ("core-service" => "management"),

    ("management-interface" => "http-interface")

]) - failure description: {"WFLYCTL0080: Failed services" => {"org.wildfly.management.http.extensible" => "java.net.BindException: Address already in use /[127.0.0.1:9990](http://127.0.0.1:9990/)"}}

09:36:06,772 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([

    ("subsystem" => "undertow"),

    ("server" => "default-server"),

    ("http-listener" => "default")

]) - failure description: {"WFLYCTL0080: Failed services" => {"org.wildfly.undertow.listener.default" => "Address already in use /[127.0.0.1:8080](http://127.0.0.1:8080/)"}}

09:36:06,776 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([

    ("subsystem" => "undertow"),

    ("server" => "default-server"),

    ("https-listener" => "https")

]) - failure description: {"WFLYCTL0080: Failed services" => {"org.wildfly.undertow.listener.https" => "Address already in use /[127.0.0.1:8443](http://127.0.0.1:8443/)"}}

09:36:06,776 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([

    ("subsystem" => "ejb3"),

    ("service" => "remote")

]) - failure description: {

    "WFLYCTL0412: Required services that are not installed:" => ["jboss.remoting.remotingConnectorInfoService.http-remoting-connector"],

    "WFLYCTL0180: Services with missing/unavailable dependencies" => ["org.wildfly.clustering.cache.registry-entry.ejb.client-mappings is missing [jboss.remoting.remotingConnectorInfoService.http-remoting-connector]"]

}

09:36:06,778 ERROR [org.jboss.as.controller] (Controller Boot Thread) WFLYCTL0459: Triggering roll back due to missing management services.

09:36:06,778 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([

    ("core-service" => "management"),

    ("management-interface" => "http-interface")

]) - failure description: {"WFLYCTL0080: Failed services" => {"org.wildfly.management.http.extensible" => "java.net.BindException: Address already in use /[127.0.0.1:9990](http://127.0.0.1:9990/)"}}

So I guess it is because Keycloak is running and there are conflicts, so the commands don’t work. How can I stop Keycloak and execute this command? I tried to shutdown using Jbl client, but the container stops and restarts itself so this doesn’t work. Any advices?

Hi… I think so you have to add users using embed sever mode. Try the below command to connect with embed mode and reload the server.
./jboss-cli.sh
[disconnected /] embed-server --server-config=standalone.xml
If your configuration file is standalone.xml or you can give different file.