sirix icon indicating copy to clipboard operation
sirix copied to clipboard

sirix-keycloak-1 | User with username 'admin' already added to '/opt/jboss/keycloak/standalone/configuration/keycloak-add-user.json'

Open AlvinKuruvilla opened this issue 2 years ago • 7 comments

Describe the bug When running sirix with docker compose up or docker compose up keycloak it initially adds an admin user to the JSON. However, if afterwards you stop the container and rerun it, keycloak will continuously try to add the admin user again and keep failing, giving output like this: image

To Reproduce

  1. Run docker compose up or docker compose up keycloak
  2. After everything is setup stop the container and rerun the command again

Expected behavior I would suspect that it should not fail if the admin user already exists

Additional context I know in the error it gives a path to /opt where a JSON file is; I tried looking for it there but all I could find was an empty sirix-data folder This issue also makes it impossible to visit the keycloak web UI

AlvinKuruvilla avatar Feb 21 '23 14:02 AlvinKuruvilla

Can you check what’s wrong in the proposed fix in https://github.com/sirixdb/sirix/issues/541 and the PR?

JohannesLichtenberger avatar Feb 21 '23 14:02 JohannesLichtenberger

I'll take a look thanks

AlvinKuruvilla avatar Feb 22 '23 05:02 AlvinKuruvilla

Thanks for the suggestion @JohannesLichtenberger the PR fixed the issue I was having, I think we should consider merging that in.

AlvinKuruvilla avatar Feb 22 '23 14:02 AlvinKuruvilla

The sirix-rest-api tests failed, as I think the user will not be created anymore, IIRC. Can you confirm that or make a new PR and we can have a look?

JohannesLichtenberger avatar Feb 22 '23 23:02 JohannesLichtenberger

I went into bundles/sirix-rest-api and then ran gradle build -x test like the README suggests and I get the following error: image

AlvinKuruvilla avatar Feb 23 '23 00:02 AlvinKuruvilla

For future references, I also followed same issue while working on the project on Windows using Docker. According to this answer on stackoverflow, it happens if keycloak was interrupted during boot. But for my case my keycloak wasn't interrupted still I got the same error.

The fix mentioned in the answer worked for me.

I also noticed that this didn't happen when I switched to a Linux machine. (Though it happen only once, then I stopped the container and restarted it and it was fixed)

redwanulsourav avatar Mar 14 '23 23:03 redwanulsourav

Strange, though the tests failed with the PR, sadly

JohannesLichtenberger avatar Mar 15 '23 07:03 JohannesLichtenberger