Hi,
Thanks for your response.
I have minikube running on a local workstation and using the helm chart to deploy JHub on it. The config I am using is as follows:
imagePullSecret:
create: true
automaticReferenceInjection: true
registry: 'docker.io'
username: **********
password: **************
email: ***********
debug:
enabled: true
proxy:
#enabled: true
secretToken: **********************************
ingress:
enabled: true
hosts:
- jhub.gt
hub:
config:
GenericOAuthenticator:
admin_users:
- ******
client_id: jupyterclient
client_secret: *****************
oauth_callback_url: http://{jupyterhub_ip}/hub/oauth_callback
authorize_url: https://{keycloak_server_ip}/auth/realms/JupyterHub/protocol/openid-connect/auth
token_url: https://{keycloak_server_ip}/auth/realms/JupyterHub/protocol/openid-connect/token
userdata_url: https://{keycloak_server_ip}/auth/realms/JupyterHub/protocol/openid-connect/userinfo
login_service: keycloak
username_key: preferred_username
userdata_params:
state: state
JupyterHub:
authenticator_class: generic-oauth
singleuser:
defaultUrl: "/lab"
memory:
limit: 8G
guarantee: 6G
cpu:
limit: 8
guarantee: 2
# Create the user home directory by adding the pre-populated notebooks
lifecycleHooks:
postStart:
exec:
command:
- "sh"
- "-c"
- >
cp -r /tmp/notebooks/* /home/jovyan
# Using nbgitpuller to synchronize a folder
# https://zero-to-jupyterhub.readthedocs.io/en/latest/jupyterhub/customizing/user-environment.html
# Defines the default image
image:
name: notebook
tag: latest
pullPolicy: Always
# Remember, if minikube (hyper-v) is used for a local cluster, you must mount the windows volume in an appropriate
# directory and use that path as a host path in the persistent volume
storage:
extraVolumes:
- name: jupyterhub-shared
persistentVolumeClaim:
claimName: pvc-tds1
extraVolumeMounts:
- name: jupyterhub-shared
mountPath: /TDS
And the logs from the hub pod:
[E 2021-12-20 09:29:23.983 JupyterHub oauth2:389] Error fetching access token 599 POST https://192.168.2.25/auth/realms/JupyterHub/protocol/openid-connect/token: HTTP 599: SSL certificate problem: self signed certificate
[E 2021-12-20 09:29:23.984 JupyterHub web:1789] Uncaught exception GET /hub/oauth_callback?state=************&session_state=**********&code=********************** (::ffff:172.17.0.1)
HTTPServerRequest(protocol='http', host='192.168.2.32:30389', method='GET', uri='/hub/oauth_callback?state=*********&session_state=********&code=****************', version='HTTP/1.1', remote_ip='::ffff:172.17.0.1')
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/tornado/web.py", line 1704, in _execute
result = await result
File "/usr/local/lib/python3.8/dist-packages/oauthenticator/oauth2.py", line 231, in get
user = await self.login_user()
File "/usr/local/lib/python3.8/dist-packages/jupyterhub/handlers/base.py", line 754, in login_user
authenticated = await self.authenticate(data)
File "/usr/local/lib/python3.8/dist-packages/jupyterhub/auth.py", line 469, in get_authenticated_user
authenticated = await maybe_future(self.authenticate(handler, data))
File "/usr/local/lib/python3.8/dist-packages/oauthenticator/generic.py", line 169, in authenticate
token_resp_json = await self._get_token(headers, params)
File "/usr/local/lib/python3.8/dist-packages/oauthenticator/oauth2.py", line 390, in fetch
raise e
File "/usr/local/lib/python3.8/dist-packages/oauthenticator/oauth2.py", line 369, in fetch
resp = await self.http_client.fetch(req, **kwargs)
tornado.curl_httpclient.CurlError: HTTP 599: SSL certificate problem: self signed certificate
[D 2021-12-20 09:29:23.984 JupyterHub base:1285] No template for 500
[E 2021-12-20 09:29:23.985 JupyterHub log:181] {
"X-Forwarded-Host": "192.168.2.32:30389",
"X-Forwarded-Proto": "http",
"X-Forwarded-Port": "30389",
"X-Forwarded-For": "::ffff:172.17.0.1",
"Cookie": "oauthenticator-state=[secret]",
"Accept-Language": "en-GB,en-US;q=0.9,en;q=0.8",
"Accept-Encoding": "gzip, deflate",
"Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9",
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.110 Safari/537.36",
"Upgrade-Insecure-Requests": "1",
"Cache-Control": "max-age=0",
"Connection": "close",
"Host": "192.168.2.32:30389"
}
[E 2021-12-20 09:29:23.985 JupyterHub log:189] 500 GET /hub/oauth_callback?state=[secret]&session_state=[secret]&code=[secret] (@::ffff:172.17.0.1) 15.00ms
It is clear from the log that a self-signed certificate is the source of the problem.
Thanks for suggesting uploading the log.