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

Websocket connect rejected #409

Open
machero opened this issue May 10, 2024 · 13 comments
Open

Websocket connect rejected #409

machero opened this issue May 10, 2024 · 13 comments
Labels
bug Something isn't working

Comments

@machero
Copy link

machero commented May 10, 2024

Description

Use conda to install the notebook virtual environment and install jupyverse as recommended in the issue. After running jupyverse, websocket refuse appears. What is the reason for this?

Reproduce

# step1  install the package
pip install "jupyterlab>=4.2.0b0"
pip install "jupyverse[jupyterlab, auth]>=0.4.2"

# step2 running the jupyverse
jupyverse --set kernels.require_yjs=true --set jupyterlab.server_side_execution=true

# open chrome
Terminal receive the message of connect rejected(403)

The information is below

(notebook) admindeMacBook-Pro-84:2024Q2 admin$ jupyverse --set kernels.require_yjs=true --set jupyterlab.server_side_execution=true
[2024-05-10 18:41:51,940 INFO] Running in development mode
[2024-05-10 18:41:52,119 INFO] Starting application
[2024-05-10 18:41:55,387 INFO] 
[2024-05-10 18:41:55,387 INFO] To access the server, copy and paste this URL:
[2024-05-10 18:41:55,387 INFO] http://127.0.0.1:8000/?token=e668af907ae04aef919db80eeef7559d
[2024-05-10 18:41:55,387 INFO] 
[2024-05-10 18:41:55,503 INFO] Started server process [17678]
[2024-05-10 18:41:55,504 INFO] Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
[2024-05-10 18:41:55,504 INFO] Application started
[2024-05-10 18:42:01,922 INFO] 127.0.0.1:50763 - "GET /api/contents?content=1&hash=0&1715337721908 HTTP/1.1" 307
[2024-05-10 18:42:01,931 INFO] 127.0.0.1:50763 - "GET /login HTTP/1.1" 200
[2024-05-10 18:42:04,598 INFO] ('127.0.0.1', 50773) - "WebSocket /api/events/subscribe?token=4e2804532de366abc81e32ab0c6bf68a73716fafbdbb2098" 403
[2024-05-10 18:42:04,599 INFO] connection rejected (403 Forbidden)
[2024-05-10 18:42:04,600 INFO] connection closed
[2024-05-10 18:42:06,291 INFO] 127.0.0.1:50763 - "GET /?token=e668af907ae04aef919db80eeef7559d HTTP/1.1" 302
[2024-05-10 18:42:06,314 INFO] 127.0.0.1:50763 - "GET /lab HTTP/1.1" 200
[2024-05-10 18:42:06,350 INFO] 127.0.0.1:50763 - "GET /static/lab/main.70d1cb071695112db302.js?v=70d1cb071695112db302 HTTP/1.1" 200
[2024-05-10 18:42:06,469 INFO] 127.0.0.1:50763 - "GET /static/lab/jlab_core.236b689cccaa159a9a26.js?v=236b689cccaa159a9a26 HTTP/1.1" 200
[2024-05-10 18:42:06,473 INFO] 127.0.0.1:50780 - "GET /static/lab/6477.f202c5269cb3e51968c8.js?v=f202c5269cb3e51968c8 HTTP/1.1" 200
[2024-05-10 18:42:06,477 INFO] 127.0.0.1:50784 - "GET /static/lab/1036.2817f8d57f1f9b518cb0.js?v=2817f8d57f1f9b518cb0 HTTP/1.1" 200
[2024-05-10 18:42:06,478 INFO] 127.0.0.1:50783 - "GET /static/lab/4155.784ca1752696680bf373.js?v=784ca1752696680bf373 HTTP/1.1" 200
[2024-05-10 18:42:06,478 INFO] 127.0.0.1:50782 - "GET /static/lab/6700.c96344a466d1896657bf.js?v=c96344a466d1896657bf HTTP/1.1" 200
[2024-05-10 18:42:06,480 INFO] 127.0.0.1:50781 - "GET /static/lab/4632.111fa2a83c586afb5f8e.js?v=111fa2a83c586afb5f8e HTTP/1.1" 200
[2024-05-10 18:42:06,516 INFO] 127.0.0.1:50783 - "GET /static/lab/4570.a15cb481e78f6ab61761.js?v=a15cb481e78f6ab61761 HTTP/1.1" 200
[2024-05-10 18:42:06,529 INFO] 127.0.0.1:50782 - "GET /static/lab/7294.46e9d2dfa68082780e97.js?v=46e9d2dfa68082780e97 HTTP/1.1" 200
[2024-05-10 18:42:06,530 INFO] 127.0.0.1:50784 - "GET /static/lab/5096.a663bd3b1a3020ddd9fd.js?v=a663bd3b1a3020ddd9fd HTTP/1.1" 200
[2024-05-10 18:42:06,534 INFO] 127.0.0.1:50780 - "GET /static/lab/3935.e00facce2e55a4af6e62.js?v=e00facce2e55a4af6e62 HTTP/1.1" 200
[2024-05-10 18:42:06,548 INFO] 127.0.0.1:50783 - "GET /static/lab/4549.f5d7aa00b6c1a5001637.js?v=f5d7aa00b6c1a5001637 HTTP/1.1" 200
[2024-05-10 18:42:06,553 INFO] 127.0.0.1:50781 - "GET /static/lab/1142.074d125bb59f5a332666.js?v=074d125bb59f5a332666 HTTP/1.1" 200
[2024-05-10 18:42:06,570 INFO] 127.0.0.1:50782 - "GET /static/lab/2786.b5e3e4a138c16b93e2a1.js?v=b5e3e4a138c16b93e2a1 HTTP/1.1" 200
[2024-05-10 18:42:06,577 INFO] 127.0.0.1:50784 - "GET /static/lab/5325.d8b08fb989b258fac0b5.js?v=d8b08fb989b258fac0b5 HTTP/1.1" 200
[2024-05-10 18:42:06,578 INFO] 127.0.0.1:50780 - "GET /static/lab/0.a77c93c9e0219244927d.js?v=a77c93c9e0219244927d HTTP/1.1" 200
[2024-05-10 18:42:06,585 INFO] 127.0.0.1:50783 - "GET /static/lab/2138.e7495e7a15381ab8f2e0.js?v=e7495e7a15381ab8f2e0 HTTP/1.1" 200
[2024-05-10 18:42:06,587 INFO] 127.0.0.1:50781 - "GET /static/lab/4986.c34903370d17455249ab.js?v=c34903370d17455249ab HTTP/1.1" 200
[2024-05-10 18:42:06,608 INFO] 127.0.0.1:50782 - "GET /static/lab/6888.4c2824dacab365947060.js?v=4c2824dacab365947060 HTTP/1.1" 200
[2024-05-10 18:42:06,613 INFO] 127.0.0.1:50780 - "GET /static/lab/5056.89ddf87d9ef4862b2069.js?v=89ddf87d9ef4862b2069 HTTP/1.1" 200
[2024-05-10 18:42:06,618 INFO] 127.0.0.1:50784 - "GET /static/lab/3547.17610774d6ac01e5e421.js?v=17610774d6ac01e5e421 HTTP/1.1" 200
[2024-05-10 18:42:06,620 INFO] 127.0.0.1:50783 - "GET /static/lab/2800.08d8f9005f890e251c97.js?v=08d8f9005f890e251c97 HTTP/1.1" 200
[2024-05-10 18:42:06,643 INFO] 127.0.0.1:50781 - "GET /static/lab/4151.7f477d41e266b3da06b3.js?v=7f477d41e266b3da06b3 HTTP/1.1" 200
[2024-05-10 18:42:06,646 INFO] 127.0.0.1:50782 - "GET /static/lab/6309.d64342615b6230f65488.js?v=d64342615b6230f65488 HTTP/1.1" 200
[2024-05-10 18:42:06,652 INFO] 127.0.0.1:50783 - "GET /static/lab/9897.258287ed98bd78074e40.js?v=258287ed98bd78074e40 HTTP/1.1" 200
[2024-05-10 18:42:06,653 INFO] 127.0.0.1:50784 - "GET /static/lab/8875.8da7cb48fb402ac6f8a5.js?v=8da7cb48fb402ac6f8a5 HTTP/1.1" 200
[2024-05-10 18:42:06,661 INFO] 127.0.0.1:50780 - "GET /static/lab/9473.141d2bc1eaacb6279c40.js?v=141d2bc1eaacb6279c40 HTTP/1.1" 200
[2024-05-10 18:42:06,673 INFO] 127.0.0.1:50781 - "GET /static/lab/3308.f1e75f094a71b22133c2.js?v=f1e75f094a71b22133c2 HTTP/1.1" 200
[2024-05-10 18:42:06,682 INFO] 127.0.0.1:50783 - "GET /static/lab/714.ff3007d0b781b5538482.js?v=ff3007d0b781b5538482 HTTP/1.1" 200
[2024-05-10 18:42:06,684 INFO] 127.0.0.1:50784 - "GET /static/lab/4429.9d0e9af89b4ab5bf2a29.js?v=9d0e9af89b4ab5bf2a29 HTTP/1.1" 200
[2024-05-10 18:42:06,687 INFO] 127.0.0.1:50782 - "GET /static/lab/466.cc21c20f0339952c057e.js?v=cc21c20f0339952c057e HTTP/1.1" 200
[2024-05-10 18:42:06,701 INFO] 127.0.0.1:50780 - "GET /static/lab/5938.f96549498a147468da5a.js?v=f96549498a147468da5a HTTP/1.1" 200
[2024-05-10 18:42:06,704 INFO] 127.0.0.1:50781 - "GET /static/lab/911.450bbe76abd3eb965b80.js?v=450bbe76abd3eb965b80 HTTP/1.1" 200
[2024-05-10 18:42:06,709 INFO] 127.0.0.1:50784 - "GET /static/lab/3123.2bc9f89ffe197f0acb34.js?v=2bc9f89ffe197f0acb34 HTTP/1.1" 200
[2024-05-10 18:42:06,715 INFO] 127.0.0.1:50782 - "GET /static/lab/812.e7dad8d8c155aa31f5f0.js?v=e7dad8d8c155aa31f5f0 HTTP/1.1" 200
[2024-05-10 18:42:07,114 INFO] 127.0.0.1:50782 - "GET /api/kernelspecs?1715337726990 HTTP/1.1" 200
[2024-05-10 18:42:07,186 INFO] 127.0.0.1:50784 - "GET /lab/api/settings?1715337726995 HTTP/1.1" 200
[2024-05-10 18:42:07,190 INFO] 127.0.0.1:50780 - "GET /api/sessions?1715337727000 HTTP/1.1" 200
[2024-05-10 18:42:07,193 INFO] 127.0.0.1:50783 - "GET /api/kernels?1715337726999 HTTP/1.1" 200
[2024-05-10 18:42:07,197 INFO] 127.0.0.1:50763 - "GET /api/terminals?1715337727000 HTTP/1.1" 200
[2024-05-10 18:42:07,206 INFO] 127.0.0.1:50782 - "GET /api/kernelspecs?1715337727116 HTTP/1.1" 200
[2024-05-10 18:42:07,208 INFO] 127.0.0.1:50781 - "GET /lab/workspaces/auto-p?reset HTTP/1.1" 200
[2024-05-10 18:42:07,555 INFO] 127.0.0.1:50763 - "GET /api/kernels?1715337727495 HTTP/1.1" 200
[2024-05-10 18:42:07,557 INFO] 127.0.0.1:50782 - "GET /lab/api/settings?1715337727491 HTTP/1.1" 200
[2024-05-10 18:42:07,557 INFO] 127.0.0.1:50781 - "GET /api/kernelspecs?1715337727489 HTTP/1.1" 200
[2024-05-10 18:42:07,559 INFO] 127.0.0.1:50783 - "GET /api/sessions?1715337727496 HTTP/1.1" 200
[2024-05-10 18:42:07,559 INFO] 127.0.0.1:50780 - "GET /api/terminals?1715337727497 HTTP/1.1" 200
[2024-05-10 18:42:07,624 INFO] 127.0.0.1:50780 - "GET /api/kernelspecs?1715337727612 HTTP/1.1" 200
[2024-05-10 18:42:08,591 INFO] 127.0.0.1:50780 - "GET /lab/api/translations/en?1715337728578 HTTP/1.1" 200
[2024-05-10 18:42:08,626 INFO] 127.0.0.1:50783 - "GET /lsp/status?1715337728620 HTTP/1.1" 404
[2024-05-10 18:42:08,630 INFO] 127.0.0.1:50780 - "GET /lab/api/listings/%40jupyterlab/extensionmanager-extension/listings.json?1715337728615 HTTP/1.1" 200
[2024-05-10 18:42:08,688 INFO] 127.0.0.1:50780 - "GET /lab/api/settings/%40jupyterlab/application-extension%3Atop-bar?1715337728641 HTTP/1.1" 200
[2024-05-10 18:42:08,693 INFO] 127.0.0.1:50784 - "GET /lab/api/settings/%40jupyterlab/htmlviewer-extension%3Aplugin?1715337728644 HTTP/1.1" 200
[2024-05-10 18:42:08,697 INFO] 127.0.0.1:50781 - "GET /lab/api/settings/%40jupyterlab/mainmenu-extension%3Aplugin?1715337728643 HTTP/1.1" 200
[2024-05-10 18:42:08,700 INFO] 127.0.0.1:50783 - "GET /lab/api/settings/%40jupyterlab/cell-toolbar-extension%3Aplugin?1715337728642 HTTP/1.1" 200
[2024-05-10 18:42:08,701 INFO] 127.0.0.1:50782 - "GET /lab/api/settings/%40jupyterlab/shortcuts-extension%3Ashortcuts?1715337728642 HTTP/1.1" 200
[2024-05-10 18:42:08,702 INFO] 127.0.0.1:50763 - "GET /lab/api/settings/%40jupyterlab/docmanager-extension%3Aplugin?1715337728644 HTTP/1.1" 200
[2024-05-10 18:42:08,764 INFO] 127.0.0.1:50780 - "GET /lab/api/settings/%40jupyterlab/notebook-extension%3Apanel?1715337728645 HTTP/1.1" 200
[2024-05-10 18:42:09,336 INFO] 127.0.0.1:50784 - "GET /lab/api/settings/%40jupyterlab/lsp-extension%3Aplugin?1715337728646 HTTP/1.1" 200
[2024-05-10 18:42:09,877 INFO] 127.0.0.1:50781 - "GET /lab/api/settings/%40jupyterlab/filebrowser-extension%3Awidget?1715337728646 HTTP/1.1" 200
[2024-05-10 18:42:09,879 INFO] 127.0.0.1:50780 - "GET /api/nbconvert?1715337728767 HTTP/1.1" 200
[2024-05-10 18:42:09,880 INFO] 127.0.0.1:50782 - "GET /static/lab/2254.96a27a3b8d991b7bc7d0.js?v=96a27a3b8d991b7bc7d0 HTTP/1.1" 200
[2024-05-10 18:42:09,883 INFO] 127.0.0.1:50783 - "GET /api/nbconvert?1715337728770 HTTP/1.1" 200
[2024-05-10 18:42:09,898 INFO] 127.0.0.1:50763 - "GET /lab/api/translations?1715337728729 HTTP/1.1" 200
[2024-05-10 18:42:09,989 INFO] 127.0.0.1:50780 - "GET /lab/api/settings/%40jupyterlab/csvviewer-extension%3Atsv?1715337728915 HTTP/1.1" 200
[2024-05-10 18:42:09,990 INFO] 127.0.0.1:50784 - "GET /lab/api/settings?1715337728892 HTTP/1.1" 200
[2024-05-10 18:42:09,994 INFO] 127.0.0.1:50781 - "GET /lab/api/settings/%40jupyterlab/csvviewer-extension%3Acsv?1715337728914 HTTP/1.1" 200
[2024-05-10 18:42:09,999 INFO] 127.0.0.1:50783 - "GET /lab/api/settings/%40jupyterlab/fileeditor-extension%3Aplugin?1715337728916 HTTP/1.1" 200
[2024-05-10 18:42:10,006 INFO] 127.0.0.1:50763 - "GET /lab/api/settings/%40jupyterlab/completer-extension%3Atracker?1715337728931 HTTP/1.1" 200
[2024-05-10 18:42:10,008 INFO] 127.0.0.1:50782 - "GET /lab/api/settings/%40jupyterlab/application-extension%3Acontext-menu?1715337728917 HTTP/1.1" 200
[2024-05-10 18:42:10,033 INFO] 127.0.0.1:50780 - "GET /lab/api/settings/%40jupyterlab/shortcuts-extension%3Ashortcuts?1715337728949 HTTP/1.1" 200
[2024-05-10 18:42:10,048 INFO] 127.0.0.1:50784 - "PUT /lab/api/workspaces/auto-p?1715337729442 HTTP/1.1" 204
[2024-05-10 18:42:10,207 INFO] 127.0.0.1:50784 - "GET /kernelspecs/python3/logo-64x64.png HTTP/1.1" 200
[2024-05-10 18:42:10,218 INFO] 127.0.0.1:50780 - "GET /api/contents?content=1&1715337730167 HTTP/1.1" 200
[2024-05-10 18:42:10,701 INFO] 127.0.0.1:50780 - "PUT /lab/api/workspaces/auto-p?1715337730678 HTTP/1.1" 204
[2024-05-10 18:42:11,948 INFO] 127.0.0.1:50780 - "GET /api/contents?content=1&hash=0&1715337731935 HTTP/1.1" 200
[2024-05-10 18:42:14,254 INFO] 127.0.0.1:50780 - "GET /api/contents/test.ipynb?type=notebook&content=1&1715337734240 HTTP/1.1" 200
[2024-05-10 18:42:14,315 INFO] 127.0.0.1:50780 - "GET /api/contents?content=1&1715337734273 HTTP/1.1" 200
[2024-05-10 18:42:14,375 INFO] 127.0.0.1:50780 - "GET /api/contents/test.ipynb/checkpoints?1715337734351 HTTP/1.1" 200
[2024-05-10 18:42:14,375 INFO] 127.0.0.1:50784 - "GET /api/contents/test.ipynb/checkpoints?1715337734351 HTTP/1.1" 200
[2024-05-10 18:42:14,385 INFO] 127.0.0.1:50782 - "GET /api/contents/test.ipynb/checkpoints?1715337734361 HTTP/1.1" 200
[2024-05-10 18:42:14,410 INFO] 127.0.0.1:50782 - "GET /api/sessions?1715337734399 HTTP/1.1" 200
[2024-05-10 18:42:14,801 INFO] 127.0.0.1:50784 - "PUT /lab/api/workspaces/auto-p?1715337734779 HTTP/1.1" 204
[2024-05-10 18:42:15,540 INFO] 127.0.0.1:50782 - "POST /api/sessions?1715337734412 HTTP/1.1" 201
[2024-05-10 18:42:15,555 INFO] 127.0.0.1:50782 - "GET /api/sessions?1715337735542 HTTP/1.1" 200
[2024-05-10 18:42:15,572 INFO] ('127.0.0.1', 50836) - "WebSocket /api/kernels/fd0f1438-69d5-47b7-b3f0-58d296d3b57f/channels?session_id=231978e9-ae1b-44dc-92c3-66bd4ec2d689" [accepted]
[2024-05-10 18:42:15,573 INFO] connection open
[2024-05-10 18:42:15,589 INFO] connection closed
[2024-05-10 18:42:15,595 INFO] ('127.0.0.1', 50837) - "WebSocket /api/kernels/fd0f1438-69d5-47b7-b3f0-58d296d3b57f/channels?session_id=7fd48314-25a2-4626-a44f-c17cfd30c957" [accepted]
[2024-05-10 18:42:15,595 INFO] connection open
[2024-05-10 18:42:15,598 INFO] 127.0.0.1:50782 - "PATCH /api/sessions/3bbae945-4fea-4961-b619-7bd80260be50?1715337735559 HTTP/1.1" 200
[2024-05-10 18:42:15,608 INFO] 127.0.0.1:50784 - "GET /api/kernels?1715337735564 HTTP/1.1" 200
[2024-05-10 18:42:15,630 INFO] 127.0.0.1:50782 - "GET /api/sessions?1715337735601 HTTP/1.1" 200
[2024-05-10 18:42:15,631 INFO] 127.0.0.1:50780 - "PATCH /api/sessions/3bbae945-4fea-4961-b619-7bd80260be50?1715337735602 HTTP/1.1" 200
[2024-05-10 18:42:15,660 INFO] 127.0.0.1:50780 - "GET /api/kernelspecs?1715337735632 HTTP/1.1" 200
[2024-05-10 18:42:16,185 INFO] 127.0.0.1:50780 - "PUT /lab/api/workspaces/auto-p?1715337736165 HTTP/1.1" 204
[2024-05-10 18:42:17,633 INFO] 127.0.0.1:50780 - "GET /api/terminals?1715337737615 HTTP/1.1" 200
[2024-05-10 18:42:18,654 INFO] 127.0.0.1:50780 - "GET /lsp/status?1715337738649 HTTP/1.1" 404
[2024-05-10 18:42:19,499 INFO] 127.0.0.1:50780 - "GET /api/kernels?1715337739480 HTTP/1.1" 200
[2024-05-10 18:42:21,967 INFO] 127.0.0.1:50780 - "GET /api/contents?content=1&hash=0&1715337741951 HTTP/1.1" 200
[2024-05-10 18:42:24,399 INFO] 127.0.0.1:50780 - "GET /api/contents?content=1&1715337744381 HTTP/1.1" 200
[2024-05-10 18:42:25,624 INFO] 127.0.0.1:50780 - "GET /api/kernels?1715337745612 HTTP/1.1" 200
[2024-05-10 18:42:25,642 INFO] 127.0.0.1:50780 - "GET /api/sessions?1715337745632 HTTP/1.1" 200
[2024-05-10 18:42:25,942 INFO] 127.0.0.1:50780 - "GET /api/contents/test.ipynb?content=0&1715337745930 HTTP/1.1" 200
[2024-05-10 18:42:25,959 INFO] 127.0.0.1:50780 - "PUT /api/contents/test.ipynb?1715337745943 HTTP/1.1" 200
[2024-05-10 18:42:25,987 INFO] 127.0.0.1:50780 - "GET /api/contents/test.ipynb/checkpoints?1715337745961 HTTP/1.1" 200
[2024-05-10 18:42:25,989 INFO] 127.0.0.1:50848 - "GET /api/contents?content=1&1715337745962 HTTP/1.1" 200
[2024-05-10 18:42:25,990 INFO] 127.0.0.1:50847 - "POST /api/contents/test.ipynb/checkpoints?1715337745961 HTTP/1.1" 201
[2024-05-10 18:42:26,824 INFO] 127.0.0.1:50847 - "GET /api/contents?content=1&1715337746794 HTTP/1.1" 200
[2024-05-10 18:42:27,648 INFO] 127.0.0.1:50847 - "GET /api/terminals?1715337747635 HTTP/1.1" 200
[2024-05-10 18:42:28,661 INFO] 127.0.0.1:50848 - "GET /lsp/status?1715337748655 HTTP/1.1" 404
[2024-05-10 18:42:29,173 INFO] 127.0.0.1:50847 - "POST /api/kernels/fd0f1438-69d5-47b7-b3f0-58d296d3b57f/restart?1715337748225 HTTP/1.1" 200
[2024-05-10 18:42:29,181 INFO] connection closed
[2024-05-10 18:42:29,186 INFO] ('127.0.0.1', 50910) - "WebSocket /api/kernels/fd0f1438-69d5-47b7-b3f0-58d296d3b57f/channels?session_id=7fd48314-25a2-4626-a44f-c17cfd30c957" [accepted]
[2024-05-10 18:42:29,186 INFO] connection open
[2024-05-10 18:42:29,530 INFO] 127.0.0.1:50847 - "GET /api/kernels?1715337749514 HTTP/1.1" 200
[2024-05-10 18:42:30,416 INFO] 127.0.0.1:50847 - "GET /api/contents?content=1&1715337750403 HTTP/1.1" 200
[2024-05-10 18:42:31,524 INFO] 127.0.0.1:50847 - "GET /api/contents/test.ipynb?content=0&1715337751509 HTTP/1.1" 200
[2024-05-10 18:42:31,541 INFO] 127.0.0.1:50847 - "PUT /api/contents/test.ipynb?1715337751525 HTTP/1.1" 200
[2024-05-10 18:42:31,572 INFO] 127.0.0.1:50848 - "POST /api/contents/test.ipynb/checkpoints?1715337751543 HTTP/1.1" 201
[2024-05-10 18:42:31,573 INFO] 127.0.0.1:50847 - "GET /api/contents/test.ipynb/checkpoints?1715337751543 HTTP/1.1" 200
[2024-05-10 18:42:31,575 INFO] 127.0.0.1:50981 - "GET /api/contents?content=1&1715337751546 HTTP/1.1" 200
[2024-05-10 18:42:31,986 INFO] 127.0.0.1:50981 - "GET /api/contents?content=1&hash=0&1715337751970 HTTP/1.1" 200
[2024-05-10 18:42:33,317 INFO] 127.0.0.1:50981 - "GET /api/contents?content=1&1715337753292 HTTP/1.1" 200
[2024-05-10 18:42:34,614 INFO] ('127.0.0.1', 51063) - "WebSocket /api/events/subscribe?token=4e2804532de366abc81e32ab0c6bf68a73716fafbdbb2098" 403
[2024-05-10 18:42:34,614 INFO] connection rejected (403 Forbidden)

Expected behavior

Context

  • Operating System and version:
  • Browser and version:
  • Jupyter Server version:
Troubleshoot Output
Paste the output from running `jupyter troubleshoot` from the command line here.
You may want to sanitize the paths in the output.
Command Line Output
Paste the output from your command line running `jupyter lab` here, use `--debug` if possible.
Browser Output
Paste the output from your browser Javascript console here, if applicable.
@machero machero added the bug Something isn't working label May 10, 2024
Copy link

welcome bot commented May 10, 2024

Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! 🤗

If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively.
welcome
You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! 👋

Welcome to the Jupyter community! 🎉

@machero machero changed the title Websocket connect refuse Websocket connect rejected May 10, 2024
@davidbrochart
Copy link
Collaborator

Did you install jupyter-collaboration?

@ajbouh
Copy link

ajbouh commented May 12, 2024

I have this same problem with jupyter-collaboration installed

@davidbrochart
Copy link
Collaborator

This message:

[2024-05-10 18:42:34,614 INFO] ('127.0.0.1', 51063) - "WebSocket /api/events/subscribe?token=4e2804532de366abc81e32ab0c6bf68a73716fafbdbb2098" 403
[2024-05-10 18:42:34,614 INFO] connection rejected (403 Forbidden)

only means that the handler for the event system has not been implemented in Jupyverse yet, but AFAIK it is not mandatory.
Is it causing any issue?

@ajbouh
Copy link

ajbouh commented May 12, 2024

In my case jupyverse is also unusable. It consumes 100% of CPU and eventually stops loading or saving the .ipynb file. I have lost work this way.

@machero
Copy link
Author

machero commented May 13, 2024

i have installed jupyter-collaboration.
The main problem is that when implementing kernel reconnection, the output is not synchronized. Using the same code , refresh chrome, the log is not output synchronously after the kernel connection.

@kmbae
Copy link

kmbae commented May 13, 2024

I have also encountered the same issue. Any other solution to this problem?

@davidbrochart
Copy link
Collaborator

The main problem is that when implementing kernel reconnection, the output is not synchronized. Using the same code , refresh chrome, the log is not output synchronously after the kernel connection.

Could you share a screencast?

@machero
Copy link
Author

machero commented May 13, 2024

jupyverse.mp4

@machero
Copy link
Author

machero commented May 13, 2024

Jupyter log console still running the task
image

@davidbrochart
Copy link
Collaborator

Thanks, I can reproduce.
It seems to be related to JupyterLab's workspaces. When you open a new window in the same browser, JupyterLab creates a new workspace for it, that's why you see 127.0.0.1:8000/lab/workspaces/auto-b in the URL bar.
Could you check that it works fine if you either open the new window as an incognito window, or with a new browser (say Firefox if the first one was opened with Google Chrome)?

@machero
Copy link
Author

machero commented May 14, 2024

Using the new browser(incognito and no incognito, chrome and firefox) behaves the same as before

@enihcam
Copy link

enihcam commented Sep 26, 2024

any updates?
same issue here. let me know what inputs else do you need.

[2024-09-26 09:44:17,543 INFO] ('x.x.x.x', 62002) - "WebSocket /api/events/subscribe?token=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" 403
[2024-09-26 09:44:17,543 INFO] connection rejected (403 Forbidden)
[2024-09-26 09:44:17,544 INFO] connection closed
[2024-09-26 09:44:17,548 INFO] x.x.x.x:61982 - "GET /api/contents/Untitled.ipynb?content=0&hash=0&1727315057505 HTTP/1.1" 200
[2024-09-26 09:44:17,580 INFO] x.x.x.x:61982 - "PUT /api/collaboration/session/Untitled.ipynb?1727315057548 HTTP/1.1" 500
[2024-09-26 09:44:17,580 ERROR] Exception in ASGI application
  + Exception Group Traceback (most recent call last):
  |   File "/opt/conda/lib/python3.9/site-packages/starlette/_utils.py", line 87, in collapse_excgroups
  |     yield
  |   File "/opt/conda/lib/python3.9/site-packages/starlette/middleware/base.py", line 193, in __call__
  |     response_sent.set()
  |   File "/opt/conda/lib/python3.9/site-packages/anyio/_backends/_asyncio.py", line 680, in __aexit__
  |     raise BaseExceptionGroup(
  | exceptiongroup.ExceptionGroup: unhandled errors in a TaskGroup (1 sub-exception)
  +-+---------------- 1 ----------------
    | Traceback (most recent call last):
    |   File "/opt/conda/lib/python3.9/site-packages/uvicorn/protocols/http/h11_impl.py", line 398, in run_asgi
    |     result = await app(  # type: ignore[func-returns-value]
    |   File "/opt/conda/lib/python3.9/site-packages/uvicorn/middleware/proxy_headers.py", line 70, in __call__
    |     return await self.app(scope, receive, send)
    |   File "/opt/conda/lib/python3.9/site-packages/fastapi/applications.py", line 1054, in __call__
    |     await super().__call__(scope, receive, send)
    |   File "/opt/conda/lib/python3.9/site-packages/starlette/applications.py", line 123, in __call__
    |     await self.middleware_stack(scope, receive, send)
    |   File "/opt/conda/lib/python3.9/site-packages/starlette/middleware/errors.py", line 186, in __call__
    |     raise exc
    |   File "/opt/conda/lib/python3.9/site-packages/starlette/middleware/errors.py", line 164, in __call__
    |     await self.app(scope, receive, _send)
    |   File "/opt/conda/lib/python3.9/site-packages/starlette/middleware/base.py", line 193, in __call__
    |     response_sent.set()
    |   File "/opt/conda/lib/python3.9/contextlib.py", line 137, in __exit__
    |     self.gen.throw(typ, value, traceback)
    |   File "/opt/conda/lib/python3.9/site-packages/starlette/_utils.py", line 93, in collapse_excgroups
    |     raise exc
    |   File "/opt/conda/lib/python3.9/site-packages/starlette/middleware/base.py", line 191, in __call__
    |     response = await self.dispatch_func(request, call_next)
    |   File "/opt/conda/lib/python3.9/site-packages/jupyverse_api/app/__init__.py", line 36, in get_last_activity
    |     return await call_next(request)
    |   File "/opt/conda/lib/python3.9/site-packages/starlette/middleware/base.py", line 165, in call_next
    |     raise app_exc
    |   File "/opt/conda/lib/python3.9/site-packages/starlette/middleware/base.py", line 151, in coro
    |     await self.app(scope, receive_or_disconnect, send_no_error)
    |   File "/opt/conda/lib/python3.9/site-packages/starlette/middleware/cors.py", line 93, in __call__
    |     await self.simple_response(scope, receive, send, request_headers=headers)
    |   File "/opt/conda/lib/python3.9/site-packages/starlette/middleware/cors.py", line 148, in simple_response
    |     await self.app(scope, receive, send)
    |   File "/opt/conda/lib/python3.9/site-packages/asphalt/web/starlette.py", line 25, in __call__
    |     await super().__call__(scope, receive, send)
    |   File "/opt/conda/lib/python3.9/site-packages/starlette/middleware/base.py", line 193, in __call__
    |     response_sent.set()
    |   File "/opt/conda/lib/python3.9/contextlib.py", line 137, in __exit__
    |     self.gen.throw(typ, value, traceback)
    |   File "/opt/conda/lib/python3.9/site-packages/starlette/_utils.py", line 93, in collapse_excgroups
    |     raise exc
    |   File "/opt/conda/lib/python3.9/site-packages/starlette/middleware/base.py", line 191, in __call__
    |     response = await self.dispatch_func(request, call_next)
    |   File "/opt/conda/lib/python3.9/site-packages/asphalt/web/starlette.py", line 29, in dispatch
    |     return await call_next(request)
    |   File "/opt/conda/lib/python3.9/site-packages/starlette/middleware/base.py", line 165, in call_next
    |     raise app_exc
    |   File "/opt/conda/lib/python3.9/site-packages/starlette/middleware/base.py", line 151, in coro
    |     await self.app(scope, receive_or_disconnect, send_no_error)
    |   File "/opt/conda/lib/python3.9/site-packages/starlette/middleware/exceptions.py", line 65, in __call__
    |     await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
    |   File "/opt/conda/lib/python3.9/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
    |     raise exc
    |   File "/opt/conda/lib/python3.9/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    |     await app(scope, receive, sender)
    |   File "/opt/conda/lib/python3.9/site-packages/starlette/routing.py", line 756, in __call__
    |     await self.middleware_stack(scope, receive, send)
    |   File "/opt/conda/lib/python3.9/site-packages/starlette/routing.py", line 776, in app
    |     await route.handle(scope, receive, send)
    |   File "/opt/conda/lib/python3.9/site-packages/starlette/routing.py", line 297, in handle
    |     await self.app(scope, receive, send)
    |   File "/opt/conda/lib/python3.9/site-packages/starlette/routing.py", line 77, in app
    |     await wrap_app_handling_exceptions(app, request)(scope, receive, send)
    |   File "/opt/conda/lib/python3.9/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
    |     raise exc
    |   File "/opt/conda/lib/python3.9/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    |     await app(scope, receive, sender)
    |   File "/opt/conda/lib/python3.9/site-packages/starlette/routing.py", line 72, in app
    |     response = await func(request)
    |   File "/opt/conda/lib/python3.9/site-packages/fastapi/routing.py", line 278, in app
    |     raw_response = await run_endpoint_function(
    |   File "/opt/conda/lib/python3.9/site-packages/fastapi/routing.py", line 191, in run_endpoint_function
    |     return await dependant.call(**values)
    |   File "/opt/conda/lib/python3.9/site-packages/jupyverse_api/yjs/__init__.py", line 36, in create_roomid
    |     return await self.create_roomid(path, request, response, user)
    |   File "/opt/conda/lib/python3.9/site-packages/fps_yjs/routes.py", line 80, in create_roomid
    |     idx = await self.contents.file_id_manager.get_id(path)
    |   File "/opt/conda/lib/python3.9/site-packages/fps_contents/fileid.py", line 54, in get_id
    |     async with db.execute("SELECT id FROM fileids WHERE path = ?", (path,)) as cursor:
    |   File "/opt/conda/lib/python3.9/site-packages/aiosqlite/context.py", line 39, in __aenter__
    |     self._obj = await self._coro
    |   File "/opt/conda/lib/python3.9/site-packages/aiosqlite/core.py", line 193, in execute
    |     cursor = await self._execute(self._conn.execute, sql, parameters)
    |   File "/opt/conda/lib/python3.9/site-packages/aiosqlite/core.py", line 132, in _execute
    |     return await future
    |   File "/opt/conda/lib/python3.9/site-packages/aiosqlite/core.py", line 115, in run
    |     result = function()
    | sqlite3.OperationalError: no such table: fileids
    +------------------------------------

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/conda/lib/python3.9/site-packages/uvicorn/protocols/http/h11_impl.py", line 398, in run_asgi
    result = await app(  # type: ignore[func-returns-value]
  File "/opt/conda/lib/python3.9/site-packages/uvicorn/middleware/proxy_headers.py", line 70, in __call__
    return await self.app(scope, receive, send)
  File "/opt/conda/lib/python3.9/site-packages/fastapi/applications.py", line 1054, in __call__
    await super().__call__(scope, receive, send)
  File "/opt/conda/lib/python3.9/site-packages/starlette/applications.py", line 123, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/opt/conda/lib/python3.9/site-packages/starlette/middleware/errors.py", line 186, in __call__
    raise exc
  File "/opt/conda/lib/python3.9/site-packages/starlette/middleware/errors.py", line 164, in __call__
    await self.app(scope, receive, _send)
  File "/opt/conda/lib/python3.9/site-packages/starlette/middleware/base.py", line 193, in __call__
    response_sent.set()
  File "/opt/conda/lib/python3.9/contextlib.py", line 137, in __exit__
    self.gen.throw(typ, value, traceback)
  File "/opt/conda/lib/python3.9/site-packages/starlette/_utils.py", line 93, in collapse_excgroups
    raise exc
  File "/opt/conda/lib/python3.9/site-packages/starlette/middleware/base.py", line 191, in __call__
    response = await self.dispatch_func(request, call_next)
  File "/opt/conda/lib/python3.9/site-packages/jupyverse_api/app/__init__.py", line 36, in get_last_activity
    return await call_next(request)
  File "/opt/conda/lib/python3.9/site-packages/starlette/middleware/base.py", line 165, in call_next
    raise app_exc
  File "/opt/conda/lib/python3.9/site-packages/starlette/middleware/base.py", line 151, in coro
    await self.app(scope, receive_or_disconnect, send_no_error)
  File "/opt/conda/lib/python3.9/site-packages/starlette/middleware/cors.py", line 93, in __call__
    await self.simple_response(scope, receive, send, request_headers=headers)
  File "/opt/conda/lib/python3.9/site-packages/starlette/middleware/cors.py", line 148, in simple_response
    await self.app(scope, receive, send)
  File "/opt/conda/lib/python3.9/site-packages/asphalt/web/starlette.py", line 25, in __call__
    await super().__call__(scope, receive, send)
  File "/opt/conda/lib/python3.9/site-packages/starlette/middleware/base.py", line 193, in __call__
    response_sent.set()
  File "/opt/conda/lib/python3.9/contextlib.py", line 137, in __exit__
    self.gen.throw(typ, value, traceback)
  File "/opt/conda/lib/python3.9/site-packages/starlette/_utils.py", line 93, in collapse_excgroups
    raise exc
  File "/opt/conda/lib/python3.9/site-packages/starlette/middleware/base.py", line 191, in __call__
    response = await self.dispatch_func(request, call_next)
  File "/opt/conda/lib/python3.9/site-packages/asphalt/web/starlette.py", line 29, in dispatch
    return await call_next(request)
  File "/opt/conda/lib/python3.9/site-packages/starlette/middleware/base.py", line 165, in call_next
    raise app_exc
  File "/opt/conda/lib/python3.9/site-packages/starlette/middleware/base.py", line 151, in coro
    await self.app(scope, receive_or_disconnect, send_no_error)
  File "/opt/conda/lib/python3.9/site-packages/starlette/middleware/exceptions.py", line 65, in __call__
    await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
  File "/opt/conda/lib/python3.9/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
    raise exc
  File "/opt/conda/lib/python3.9/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    await app(scope, receive, sender)
  File "/opt/conda/lib/python3.9/site-packages/starlette/routing.py", line 756, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/opt/conda/lib/python3.9/site-packages/starlette/routing.py", line 776, in app
    await route.handle(scope, receive, send)
  File "/opt/conda/lib/python3.9/site-packages/starlette/routing.py", line 297, in handle
    await self.app(scope, receive, send)
  File "/opt/conda/lib/python3.9/site-packages/starlette/routing.py", line 77, in app
    await wrap_app_handling_exceptions(app, request)(scope, receive, send)
  File "/opt/conda/lib/python3.9/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
    raise exc
  File "/opt/conda/lib/python3.9/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    await app(scope, receive, sender)
  File "/opt/conda/lib/python3.9/site-packages/starlette/routing.py", line 72, in app
    response = await func(request)
  File "/opt/conda/lib/python3.9/site-packages/fastapi/routing.py", line 278, in app
    raw_response = await run_endpoint_function(
  File "/opt/conda/lib/python3.9/site-packages/fastapi/routing.py", line 191, in run_endpoint_function
    return await dependant.call(**values)
  File "/opt/conda/lib/python3.9/site-packages/jupyverse_api/yjs/__init__.py", line 36, in create_roomid
    return await self.create_roomid(path, request, response, user)
  File "/opt/conda/lib/python3.9/site-packages/fps_yjs/routes.py", line 80, in create_roomid
    idx = await self.contents.file_id_manager.get_id(path)
  File "/opt/conda/lib/python3.9/site-packages/fps_contents/fileid.py", line 54, in get_id
    async with db.execute("SELECT id FROM fileids WHERE path = ?", (path,)) as cursor:
  File "/opt/conda/lib/python3.9/site-packages/aiosqlite/context.py", line 39, in __aenter__
    self._obj = await self._coro
  File "/opt/conda/lib/python3.9/site-packages/aiosqlite/core.py", line 193, in execute
    cursor = await self._execute(self._conn.execute, sql, parameters)
  File "/opt/conda/lib/python3.9/site-packages/aiosqlite/core.py", line 132, in _execute
    return await future
  File "/opt/conda/lib/python3.9/site-packages/aiosqlite/core.py", line 115, in run
    result = function()
sqlite3.OperationalError: no such table: fileids
[2024-09-26 09:44:17,999 INFO] x.x.x.x:61981 - "GET /api/nbconvert?1727315057566 HTTP/1.1" 200
[2024-09-26 09:44:18,040 INFO] x.x.x.x:61984 - "GET /lab/api/settings?ids_only=true&1727315057590 HTTP/1.1" 200
[2024-09-26 09:44:18,042 INFO] x.x.x.x:61990 - "GET /api/contents/Untitled.ipynb?type=notebook&content=0&hash=1&1727315057596 HTTP/1.1" 200
[2024-09-26 09:44:18,110 INFO] x.x.x.x:61990 - "GET /lab/api/settings/%40jupyter-lsp/jupyterlab-lsp%3Aplugin?1727315058069 HTTP/1.1" 200
[2024-09-26 09:44:18,111 INFO] x.x.x.x:61984 - "GET /lab/api/settings/%40jupyterlab/lsp-extension%3Aplugin?1727315058069 HTTP/1.1" 200
[2024-09-26 09:44:18,154 INFO] x.x.x.x:61984 - "PUT /lab/api/workspaces/default?1727315058119 HTTP/1.1" 204
[2024-09-26 09:44:18,183 INFO] x.x.x.x:61984 - "GET /api/contents?content=1&hash=0&1727315058151 HTTP/1.1" 200
[2024-09-26 09:44:18,635 INFO] ('x.x.x.x', 62010) - "WebSocket /api/events/subscribe?token=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" 403
[2024-09-26 09:44:18,635 INFO] connection rejected (403 Forbidden)
[2024-09-26 09:44:18,636 INFO] connection closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants