0
我有Jupyter筆記本服務器使用以下命令創建一個新的Python 3虛擬環境:爲什麼Jupyter筆記本無法驗證WebSocket連接?
virtualenv env -p python3
. env/bin/activate
pip install jupyter
jupyter notebook
這些都成功運行。但是當我嘗試創建新的筆記本時,出現WebSocket身份驗證錯誤,無法創建筆記本。客戶端說
無法建立與筆記本服務器的連接。筆記本電腦將繼續嘗試重新連接。檢查您的網絡連接或筆記本服務器配置。
下面是從Jupyter筆記本服務器日誌:
[I 22:50:23.085 NotebookApp] The port 8888 is already in use, trying another port.
[I 22:50:23.110 NotebookApp] Serving notebooks from local directory: /tmp
[I 22:50:23.110 NotebookApp] 0 active kernels
[I 22:50:23.110 NotebookApp] The Jupyter Notebook is running at: http://localhost:8889/?token=b4d69926e308334a4ca121d3ceaa0dfa9f1ba93312770f88
[I 22:50:23.110 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[I 22:50:36.778 NotebookApp] Accepting one-time-token-authenticated connection from 127.0.0.1
[I 22:52:01.083 NotebookApp] Creating new notebook in
[W 22:52:06.372 NotebookApp] 404 GET /nbextensions/widgets/notebook/js/extension.js?v=20161215225022 (127.0.0.1) 38.39ms referer=http://localhost:8889/notebooks/Untitled.ipynb?kernel_name=python3
[I 22:52:06.855 NotebookApp] Kernel started: 7b5db30f-e2b2-48dc-9ec8-2aa9bd63b604
[W 22:52:07.130 NotebookApp] Couldn't authenticate WebSocket connection
[W 22:52:07.140 NotebookApp] 403 GET /api/kernels/7b5db30f-e2b2-48dc-9ec8-2aa9bd63b604/channels?session_id=277CA36E71FA431C922EE9F8AEFF6261 (127.0.0.1) 14.42ms referer=None
[W 22:52:08.435 NotebookApp] Couldn't authenticate WebSocket connection
[W 22:52:08.446 NotebookApp] 403 GET /api/kernels/7b5db30f-e2b2-48dc-9ec8-2aa9bd63b604/channels?session_id=277CA36E71FA431C922EE9F8AEFF6261 (127.0.0.1) 16.36ms referer=None
WARNING: Attempting to work in a virtualenv. If you encounter problems, please install IPython inside the virtualenv.
[W 22:52:10.619 NotebookApp] Couldn't authenticate WebSocket connection
[W 22:52:10.622 NotebookApp] 403 GET /api/kernels/7b5db30f-e2b2-48dc-9ec8-2aa9bd63b604/channels?session_id=277CA36E71FA431C922EE9F8AEFF6261 (127.0.0.1) 10.53ms referer=None
[W 22:52:14.657 NotebookApp] Couldn't authenticate WebSocket connection
[W 22:52:14.666 NotebookApp] 403 GET /api/kernels/7b5db30f-e2b2-48dc-9ec8-2aa9bd63b604/channels?session_id=277CA36E71FA431C922EE9F8AEFF6261 (127.0.0.1) 15.54ms referer=None
這個錯誤是什麼意思,我怎樣才能解決呢?
我使用Ubuntu 16.10,Python 3.5.2和Jupyter 4.2.1。
謝謝。我使用的是[勇敢的瀏覽器](https://brave.com/),但現在我已經切換到Firefox並且它可以正常工作。 – argentpepper