Reputation: 568
I recently updated jupter_over_ws to version 0.0.7 and now Google Colab refuses to connect my local runtime.
I have tried multiple iterations of launching the localhost in chrome, running with --no-browser etc and keep receiving a 'Forbidden' 403.
The last iteration I got to in an attempt to connect to the notebook was:
jupyter notebook --NotebookApp.allow_origin='https://colab.research.google.com' --NotebookApp.port_retries=0 --notebook-dir="" --no-browser --allow-root --NotebookApp.token='' --NotebookApp.disable_check_xsrf=True --port=8888
Any help much appreciated
Upvotes: 4
Views: 8795
Reputation: 351
If you use Anaconda, you can follow the instructions:
pip install --upgrade jupyter_http_over_ws>=0.0.7 && jupyter serverextension enable --py jupyter_http_over_ws
jupyter notebook --NotebookApp.allow_origin='https://colab.research.google.com' --port=8892 --NotebookApp.port_retries=0
http://localhost:8892/?token=fecaca2501d00f89971ab8fb4a5add3ff682ade7e63f7265
Upvotes: 1
Reputation: 568
I solved this by removing the password from the jupyter .config file, then copy and pasting the token url as you have outlined in the answers above, and as outlined in the official colab documentation:
https://research.google.com/colaboratory/local-runtimes.html
Upvotes: 1
Reputation: 81
After update, you need first upgrade jupyter_http_over_ws:
pip install --upgrade jupyter_http_over_ws
And second, everytime you start the server with this code:
jupyter notebook --NotebookApp.allow_origin='https://colab.research.google.com' --port=8888 --NotebookApp.port_retries=0
It will show a new token in Anaconda's prompt, you need to copy.
When you click in Connect to local runtime
in Colab, a box will ask for the token, then paste there.
Upvotes: 2
Reputation: 38579
Colab recently updated it's local runtime connection instructions.
In particular, you'll need to provide the URL printed in the console when starting the local runtime.
Clicking the "More Details" button in the local connection dialog will provide additional instructions.
Upvotes: 2