Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Internal Server Error #61

Open
dm-msk opened this issue Sep 19, 2023 · 6 comments · May be fixed by #62
Open

Internal Server Error #61

dm-msk opened this issue Sep 19, 2023 · 6 comments · May be fixed by #62

Comments

@dm-msk
Copy link

dm-msk commented Sep 19, 2023

Hello. I installed ovirt-engine with keyclock N and then I turned it on without errors and got an error on ovirt-engine login button
engine-setup --otopi-environment="OVESETUP_CONFIG/keycloakEnable=bool:True"

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at root@localhost to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.

@dupondje
Copy link
Member

dupondje commented May 6, 2024

Had the same issue, so debugged this further.
The issue is here:

When you run:
engine-setup --otopi-environment="OVESETUP_CONFIG/keycloakEnable=bool:True"
The admin password is not set, and the setup will be incomplete, as _setup_ovirt part will never run.

A proper fix would be to ask for the current admin password in the setup flow.
A quick workaround is running setup with following args:
engine-setup --otopi-environment="OVESETUP_CONFIG/keycloakEnable=bool:True OVESETUP_CONFIG/adminPassword=str:xxxxx"

@rogovst
Copy link

rogovst commented May 17, 2024

Hi there. I've faced this bug too.
Tried to run
engine-setup --otopi-environment="OVESETUP_CONFIG/keycloakEnable=bool:True OVESETUP_CONFIG/adminPassword=str:xxxxx" . But it didn't help.
Still get the same internal server error:

[Fri May 17 03:50:57.326835 2024] [auth_openidc:error] [pid 26099:tid 140300802582272] [client 10.22.120.142:39920] oidc_util_json_string_print: oidc_util_check_json_error: response contained an "error" entry with value: ""Realm does not exist"", referer: https://manager.internal/ovirt-engine/
[Fri May 17 03:50:57.327038 2024] [auth_openidc:error] [pid 26099:tid 140300802582272] [client 10.22.120.142:39920] oidc_metadata_provider_retrieve: JSON parsing of retrieved Discovery document failed, referer: https://manager.internal/ovirt-engine/
[Fri May 17 03:50:57.327056 2024] [auth_openidc:error] [pid 26099:tid 140300802582272] [client 10.22.120.142:39920] oidc_provider_static_config: could not retrieve metadata from url: https://manager.internal/ovirt-engine-auth/realms/ovirt-internal/.well-known/openid-configuration, referer: https://manager.internal/ovirt-engine/

Is there any workaroud to fix this?

@dupondje
Copy link
Member

Yes rerunning it won't fix it. You need a clean state without keycloak and then enable it with the command above.

@rogovst
Copy link

rogovst commented May 17, 2024

Yes rerunning it won't fix it. You need a clean state without keycloak and then enable it with the command above.

What options do I have? Redeploy? What about restoring a database backup?

@dupondje
Copy link
Member

Think there are multiple options.
It's normally just the realm that is missing. So:

  • create it manually
  • find out in the code what it runs to create it and execute that script/helper
  • remove keycloak and try again
  • restore and try again
  • ...

Plenty of things to try :)

@rogovst
Copy link

rogovst commented May 17, 2024

I'm ok with creating the realm manually.
Could you please give me some details or links to the documentation how to do it?
Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants