# Internal Server Error

**URL:** <https://renku.discourse.group/t/internal-server-error/264>\
**Category:** Renku Admin\
**Created:** [25 February 2021 08:56 UTC](https://renku.discourse.group/t/internal-server-error/264 "2021-02-25T08:56:46Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![abella91](https://avatars.discourse-cdn.com/v4/letter/a/e47774/32.png) [@abella91](https://renku.discourse.group/u/abella91)\
**Post date:** [25 February 2021 08:56 UTC](https://renku.discourse.group/t/internal-server-error/264/1 "2021-02-25T08:56:46Z")

</div>

Hello  
I deployed renku helm chart and all components are up and running. I logged into keycloak and i setup federation using LDAP. now i’m able to connect to gitlab but not to runku(renku-ui)  
in renku-ui, when i click in login button, i get this error:

# Internal Server Error

The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.

when i check in the keycloak, in renku realm there are only two clients related to renku (gitlab and renku) in documentation i see that 4 clients must be created .

is my issue related to this keycloak config ?  
Thanks

---

<div class="post-metadata">

**Author:** ![pameladelgado](https://yyz2.discourse-cdn.com/free1/user_avatar/renku.discourse.group/pameladelgado/32/28_2.png) [@pameladelgado](https://renku.discourse.group/u/pameladelgado)\
**Post date:** [25 February 2021 09:14 UTC](https://renku.discourse.group/t/internal-server-error/264/2 "2021-02-25T09:14:43Z")

</div>

Hello @abella91

would you mind moving this post to the [Admin category](https://renku.discourse.group/c/renku-admin/12)?

Regarding the Internal Server error, do you see any errors in the logs of gateway and/or keycloak pods?

To take the LDAP configuration factor out: are you able to register a test user (without LDAP) and login with it?

The clients in the Renku realm should look something like this:

```auto
account /auth/realms/Renku/account 
admin-cli Not defined 
broker Not defined 
gitlab https://renku.mydomain.com/gitlab 
realm-management Not defined
renku https://renku.mydomain.com 
security-admin-console /auth/admin/Renku/console/index.html

```

---

<div class="post-metadata">

**Author:** ![abella91](https://avatars.discourse-cdn.com/v4/letter/a/e47774/32.png) [@abella91](https://renku.discourse.group/u/abella91)\
**Post date:** [25 February 2021 15:14 UTC](https://renku.discourse.group/t/internal-server-error/264/3 "2021-02-25T15:14:00Z")

</div>

> [@pameladelgado](#):
>
> gateway

I get this error in renku-gateway-auth logs:  
ERROR in app: Exception on /api/auth/gitlab/token [GET] …  
oauthlib.oauth2.rfc6749.errors.InvalidClientError: (invalid\_client) Client authentication failed due to unknown client, no client authentication included, or unsupported authentication method.

I created a user in Keycloak, disabled the LDAP and as usual I’m able to connect to gitlab but not to renku I still having the same issue

# Internal Server Error

The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.

Thanks

---

<div class="post-metadata">

**Author:** ![pameladelgado](https://yyz2.discourse-cdn.com/free1/user_avatar/renku.discourse.group/pameladelgado/32/28_2.png) [@pameladelgado](https://renku.discourse.group/u/pameladelgado)\
**Post date:** [9 March 2021 14:42 UTC](https://renku.discourse.group/t/internal-server-error/264/4 "2021-03-09T14:42:44Z")

</div>

@abella91 can you try restarting the renku-gateway-auth? (scale down the deployment to 0 and then back to 1 or simply deleting the pod).  
It happens that when you make changes to identity providers or user federations, the authentication component in Renku (gateway) needs to update the key it uses to interact with keycloak.

---

<div class="post-metadata">

**Author:** ![abella91](https://avatars.discourse-cdn.com/v4/letter/a/e47774/32.png) [@abella91](https://renku.discourse.group/u/abella91)\
**Post date:** [10 March 2021 08:45 UTC](https://renku.discourse.group/t/internal-server-error/264/5 "2021-03-10T08:45:12Z")

</div>

Hello,  
I scaled down then up but i still having this error in the logs of the pod enku-gateway-auth-xyzxyz  
ERROR in app: Exception on /api/auth/gitlab/token [GET] …  
oauthlib.oauth2.rfc6749.errors.InvalidClientError: (invalid\_client) Client authentication failed due to unknown client, no client authentication included, or unsupported authentication method.

After executing of the helm chart, how many clients should be created in the keycloak renku realm?

---

<div class="post-metadata">

**Author:** ![andreas](https://yyz2.discourse-cdn.com/free1/user_avatar/renku.discourse.group/andreas/32/8_2.png) [@andreas](https://renku.discourse.group/u/andreas)\
**Post date:** [16 March 2021 07:12 UTC](https://renku.discourse.group/t/internal-server-error/264/6 "2021-03-16T07:12:34Z")

</div>

Hi @abella91 and sorry for the late response. The answer to your question ist one or two, depending on wether you use a pre-existing GitLab or if you deploy one with RenkuLab. The clients that should be created in the Renku realm during the helm install are defined here: [renku/\_keycloak-clients-users.tpl at master · SwissDataScienceCenter/renku · GitHub](https://github.com/SwissDataScienceCenter/renku/blob/master/helm-chart/renku/templates/_keycloak-clients-users.tpl)  
It might be easiest to help you if you could post your values file here (after obfuscating the secrets of course).

---

<div class="post-metadata">

**Author:** ![abella91](https://avatars.discourse-cdn.com/v4/letter/a/e47774/32.png) [@abella91](https://renku.discourse.group/u/abella91)\
**Post date:** [16 March 2021 09:38 UTC](https://renku.discourse.group/t/internal-server-error/264/7 "2021-03-16T09:38:59Z")

</div>

Hello @andreas and thank you for your response.  
I used the script [renku/make-values.sh at master · SwissDataScienceCenter/renku · GitHub](https://github.com/SwissDataScienceCenter/renku/blob/master/helm-chart/example-configurations/make-values.sh) (make-values.sh -domain [mydomain.com](http://mydomain.com) --output-file renku-values.yaml)to generate my config values  
All components (renku, gitlab and keycloak) are created during the chart installation and  
after installation, i got 2 clients (gitlab and renku) for the renku releam in keycloak

Do you need all the config values(file renku-values.yaml) or just few of them

---

<div class="post-metadata">

**Author:** ![andreas](https://yyz2.discourse-cdn.com/free1/user_avatar/renku.discourse.group/andreas/32/8_2.png) [@andreas](https://renku.discourse.group/u/andreas)\
**Post date:** [16 March 2021 19:43 UTC](https://renku.discourse.group/t/internal-server-error/264/8 "2021-03-16T19:43:04Z")

</div>

Ah, it’s good to know that you used that script. I’ll run it myself to see if there’s some problem with the resulting values file and get back to you. Just one more question: which version of the Renku chart did you deploy?

---

<div class="post-metadata">

**Author:** ![abella91](https://avatars.discourse-cdn.com/v4/letter/a/e47774/32.png) [@abella91](https://renku.discourse.group/u/abella91)\
**Post date:** [17 March 2021 08:21 UTC](https://renku.discourse.group/t/internal-server-error/264/9 "2021-03-17T08:21:19Z")

</div>

Hello, I installed the chart via this command: helm upgrade --install renku renku/renku --namespace renku -f renku-values.yaml and the installed version of the chart is renku-0.7.6

---

<div class="post-metadata">

**Author:** ![pameladelgado](https://yyz2.discourse-cdn.com/free1/user_avatar/renku.discourse.group/pameladelgado/32/28_2.png) [@pameladelgado](https://renku.discourse.group/u/pameladelgado)\
**Post date:** [17 March 2021 09:31 UTC](https://renku.discourse.group/t/internal-server-error/264/10 "2021-03-17T09:31:53Z")

</div>

@abella91 just checking: are you using the latest make-values.sh script or the one that came with tag `0.7.6`? we had fixed a bug/typo in the script you might want to take a look [fix: move to helm-chart and fix anchor in tmpl · SwissDataScienceCenter/renku@fd96216 · GitHub](https://github.com/SwissDataScienceCenter/renku/commit/fd96216e1ef2145b86118c87f7a2eda4668b2e33#diff-05491e127ccba2e8d537170eb66272b3370e9e10a6d599b290c1452f8ee9bc41)  
If this is the case, you basically need to change value of `notebooks.jupyterhub.hub.services.gateway.apiToken` to `&gwJHclientSecret` instead of `&gwJHclientId` (line 212).

---

<div class="post-metadata">

**Author:** ![abella91](https://avatars.discourse-cdn.com/v4/letter/a/e47774/32.png) [@abella91](https://renku.discourse.group/u/abella91)\
**Post date:** [17 March 2021 13:14 UTC](https://renku.discourse.group/t/internal-server-error/264/11 "2021-03-17T13:14:14Z")

</div>

Hello, thank you. when i used the script i got this bug/typo and I corrected it in my local cloned renku repository and renku-values.yaml was generated

---

<div class="post-metadata">

**Author:** ![pameladelgado](https://yyz2.discourse-cdn.com/free1/user_avatar/renku.discourse.group/pameladelgado/32/28_2.png) [@pameladelgado](https://renku.discourse.group/u/pameladelgado)\
**Post date:** [18 March 2021 08:14 UTC](https://renku.discourse.group/t/internal-server-error/264/12 "2021-03-18T08:14:45Z")

</div>

Great, does this mean that you were able to successfully deploy Renku now?

---

<div class="post-metadata">

**Author:** ![abella91](https://avatars.discourse-cdn.com/v4/letter/a/e47774/32.png) [@abella91](https://renku.discourse.group/u/abella91)\
**Post date:** [18 March 2021 09:52 UTC](https://renku.discourse.group/t/internal-server-error/264/13 "2021-03-18T09:52:32Z")

</div>

Hello @pameladelgado, This fixe allowed me just to generate config values but the error I’m facing is after deploying the renku stack and it persists ☹

---

<div class="post-metadata">

**Author:** ![andreas](https://yyz2.discourse-cdn.com/free1/user_avatar/renku.discourse.group/andreas/32/8_2.png) [@andreas](https://renku.discourse.group/u/andreas)\
**Post date:** [18 March 2021 22:30 UTC](https://renku.discourse.group/t/internal-server-error/264/14 "2021-03-18T22:30:49Z")

</div>

I managed to reproduce your problem @abella91. The fix is a one-liner (as so often). See [this PR](https://github.com/SwissDataScienceCenter/renku/pull/2033/files) for the necessary change. There’s no need to regenerate your values file. Replacing the random string with the same YAML alias in your rendered values file and re-deploying should be enough. Please let me know if this fixes your problem.

---

<div class="post-metadata">

**Author:** ![abella91](https://avatars.discourse-cdn.com/v4/letter/a/e47774/32.png) [@abella91](https://renku.discourse.group/u/abella91)\
**Post date:** [19 March 2021 14:17 UTC](https://renku.discourse.group/t/internal-server-error/264/15 "2021-03-19T14:17:35Z")

</div>

Thank you very much for your help. My issue is resolved thanks to your fix @andreas
