Could you send me the JSON with your rep? I will try in my environment. Btv. which keycloak version are you using?

Thanks,
Marek

On 01/09/15 09:37, Nangunoori, Srinivas wrote:

There are no errors in server logs,

 

07:32:58,073 INFO  [org.keycloak.exportimport.singlefile.SingleFileImportProvider] (ServerService Thread Pool -- 62) Full importing from file /opt/jboss/keycloak/paas.json

07:33:01,517 INFO  [org.keycloak.exportimport.util.ImportUtils] (ServerService Thread Pool -- 62) Realm 'Test2' imported

07:33:01,531 INFO  [org.keycloak.exportimport.ExportImportManager] (ServerService Thread Pool -- 62) Import finished successfully

 

Test2 is last realm entry in my paas.json file. Here Test1 was not imported.

 

JSON has following entries.,

[ {

  "realm" : "Test1",

   -----

}, {

  "realm" : "Test2",

   -----

}]

 

-Srini

 

From: Marek Posolda [mailto:mposolda@redhat.com]
Sent: Monday, August 31, 2015 8:30 PM
To: Nangunoori, Srinivas; keycloak-user@lists.jboss.org
Subject: Re: [keycloak-user] Query regarding import multiple realms through single json file

 

Is there something in server log when you start the server? Especially look at logged lines from "ExportImportManager" and "ImportUtils" categories.

Could you also try to use absolute path for the file (just for sure?). You used "paas.json", but later you mentioned "pass.json", but I believe this is just typo in email rather than bad file path?

Marek

On 31/08/15 15:16, Nangunoori, Srinivas wrote:

Hi Experts,

 

I am trying to import multiple relams info through single json file using following command, here pass.json has multiple realm info. But, only last realm is getting imported in keycloak

 

bin/standalone.sh -c standalone-ha.xml -b=<server name> -bmanagement=<server name> -Djboss.node.name=<server name> -Dkeycloak.migration.action=import -Dkeycloak.migration.provider=singleFile -Dkeycloak.migration.file=paas.json

 

Here pass.json has multiple realm info. But, only last realm is getting imported in keycloak.

 

JSON has info.,

[

{

  "realm" : "Test1",

   -----

},

 

{

  "realm" : "Test2",

   -----

}

]

 

In this case, always “Test2” is getting imported not the “Test1”.

 

Regards,

Srini

 

 

 




_______________________________________________
keycloak-user mailing list
keycloak-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/keycloak-user