Hi all,
I’m struggling since a couple of days with jupyter-server-proxy setup:
Basically, I use a kubernetes cluster and I deployed z2jh helm chart on this cluster (I didn’t customize anything in the helm chart, except that I enabled “debug” in the values.yaml file)
In the k8s namespace, I can see a pod for the hub, a pod for the proxy, and once I spawned a single-user notebook, I can see an additional pod for user’s jupyter. Fine
The tricky point now
In my single-user’s notebook, from a terminal window, I install (pip install doccano) & start a webserver (doccano webserver --port 7860) that listens on a given port (7860 in my case) on the user’s pod.
I would like to reach out this web server from a browser but couldn’t figure out how to achieve this throught the different involved components (From a kubernetes perspective, I didn’t declare any additional service to point out to this pod/port):
My request basically goes to the proxy-public service that points to the proxy pod, and then cannot figure out what’s going on…
What should be the correct way for my request after reaching the proxy component ? Should it go to the hub or directly to the single user pod ?
After reading many posts & documentation, it is still unclear to me how to use/configure the “jupyter-server-proxy” component when used in combination with jupyterhub in kubernetes:
From what I see, the proxy pod (from z2jh helm chart) runs “configurable-http-proxy”. How it deals with “jupyter-server-proxy” ?
Do I have to install/configure something in the hub or the single-user (that both run in separate pods) ? the singleuser image already includes the jupyter-server-proxy python package from what I understand.
I can reach jupyterhub with this URL : “localhost:80”
I can reach user’s notebook with “localhost/user/MYUSER/lab/”
I failed to reach user’s doccano web server with following URLs:
- localhost/hub/user-redirect/proxy/7860/ => 404
- localhost/user/MYUSER/proxy/7860/ => 404
In the logs of my jupyter-MYUSER pod, I can see:
...
[W 2023-05-05 08:29:49.974 SingleUserLabApp log:186] 404 GET /user/MYUSER/proxy/7860
...
In the logs of the proxy pod, I can see:
...
08:29:49.969 [ConfigProxy] debug: PROXY WEB /user/MYUSER/proxy/7860 to http://<jupyter-MYUSER_IP>:8888
08:29:49.974 [ConfigProxy] debug: Not recording activity for status 404 on /user/MYUSER
...
=> It seems that the proxy redirects to port 8888 of my single user pod, which is the port used by jupyter notebook.
How to make the jupyter notebook redirecting to the 7860 port in the same pod ?
Any insight would be greatly appreciated…
Thanks in advance