But it is really dumm, that, i have to add this code for all 30 users. (for every username)
Is there any better way to automatically redirect this request, like Regular expression?
Thanks. You are right! I just missed the websockets upgrade part!
I can now acess to my content. But It starts to restart my single user server all the time.
And in Logs i found this:
15:22:57.392 [ConfigProxy] debug: Not recording activity for status 304 on /jupyterhub/user/yuqiang
15:22:57.393 [ConfigProxy] debug: Not recording activity for status 304 on /jupyterhub/user/yuqiang
15:22:57.395 [ConfigProxy] debug: Not recording activity for status 304 on /jupyterhub/user/yuqiang
15:22:57.397 [ConfigProxy] debug: Not recording activity for status 304 on /jupyterhub/user/yuqiang
15:22:57.399 [ConfigProxy] debug: Not recording activity for status 304 on /jupyterhub/user/yuqiang
Another Problem:
And strange things happen, if I activate the Jupyter-collaboration extension.
I can normally open a notebook in my home directory (/home/joyvan)
But can not connect to Kernel and open a notebook in a folder (/home/joyvan/[some newfolder]).
The Cause according my guess:
This Problem doesn´t exsit if i only use Jupyterhub internal Proxy (CHP). So I guess the problem is the compatibility of Jupyter-collaboration extension and Apache2?
Logs seem good:
[I 2024-03-26 16:26:47.448 ServerApp] 200 GET /jupyterhub/user/yuqiang/api/contents/Untitled%20Folder?content=1&1711470407345 (yuqiang@172.22.0.4) 4.89ms
[I 2024-03-26 16:26:50.123 ServerApp] 200 GET /jupyterhub/user/yuqiang/api (@172.22.0.5) 0.78ms
[I 2024-03-26 16:26:52.162 YDocExtension] Processed 366 Y patches in one minute
[I 2024-03-26 16:26:52.162 YDocExtension] Connected Y users: 8
[I 2024-03-26 16:26:52.563 ServerApp] 200 GET /jupyterhub/user/yuqiang/api/terminals?1711470412349 (yuqiang@172.22.0.4) 2.14ms
[I 2024-03-26 16:26:52.749 ServerApp] 200 GET /jupyterhub/user/yuqiang/api/me?1711470412533 (yuqiang@172.22.0.4) 1.96ms
[I 2024-03-26 16:26:52.771 ServerApp] 200 GET /jupyterhub/user/yuqiang/api/kernelspecs?1711470412535 (yuqiang@172.22.0.4) 2.58ms
[I 2024-03-26 16:26:55.327 ServerApp] 200 GET /jupyterhub/user/yuqiang/api (@172.22.0.5) 0.78ms
[26/Mar/2024:16:43:14 +0000] “GET /jupyterhub/user/yuqiang/api/kernels?1711471394421 HTTP/1.1” 200 3475 “https:///jupyterhub/user/yuqiang/lab/tree/RTC%3AUntitled%20Folder/Untitled.ipynb” “Mozilla/5.0 (iPhone; CPU iPhone OS 17_2_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.2 Mobile/15E148 Safari/604.1”
I found the problematic Request is sent by Apache Webserver. The Request sent by Apche seems to be blocked. Other Requests, which are sent by tornado, are no problem.
Any suggestions to let tornado send the request instead of Apache?
I’m not entirely sure what’s going on here, but if Apache is responding, this means that some routing rule in Apache is not forwarding the request to JupyterHub. That should all be in the apache config, since it means JupyterHub hasn’t had a chance to doesn’t get involved.
Since it’s a subset of URLs, I wonder if some other config is catching URLs with e.g. session in them.
Another possible option that I’m not sure about is a version mismatch in the jupyter-collaboration javascript and Python versions. Making sure both are up to date and restarting the server might help.
If you request a URL that definitely 404s and will be served by JupyterLab: /jupyterhub/user/yuqiang/api/nosuchthing/should/404
Tornado will serve the following URL /jupyterhub/user/udo.heuser/api/collaboration/session/Assignment
But not /jupyterhub/user/udo.heuser/api/collaboration/session/Assignment%2F…
I got a Apache error with this URL
Where Assignment is a directory in my workspace
So I think the %2F or % is the problem, that makes Apache confused, and Tornado can´t recive the request.