can't reconnect to remote jupyter server without UI reload
See original GitHub issueApplies To
- Notebooks (.ipynb files)
- Interactive Window and/or Cell Scripts (.py files with #%% markers)
What happened?
- Start up a jupyter server with some fixed token or password URL, e.g. run
jupyter notebook --no-browser --NotebookApp.token='12345'
- Configure a workspace to connect to that remote server (e.g.
http://localhost:8888/?token=12345
) and open or create some notebook files. - Close the workspace.
- Cause something to happen such that the remote server is not accessible (e.g. kill it, or disconnect from the network if the server is truly on a remote machine).
- Reopen the workspace. (Or just force a UI reload to simulate the close/reopen.)
- Note that none of the “run” buttons are available in the notebook UI because (obviously) the jupyter server is not available.
- Restart the jupyter server, as one would do in such a case.
- “Run” buttons remain greyed-out in the notebook UI.
- Try to force a reconnect to the now-running server by bringing up the “pick how to connect to jupyter” palette and either selecting the current URL from the “recents” list, or selecting “existing” and re-entering the current URL.
- Nothing happens! (I assume vscode doesn’t do anything because it assumes selecting a server URL that it is “already” connected to should be a no-op, without noting that there is actually no active connection.) Expected outcome: this would cause vscode to try to reconnect to the now-restored jupyter server.
- The only way to reconnect to the jupyter server is to reload the UI or close and reopen the workspace.
VS Code Version
Version: 1.61.2 (Universal) Commit: 6cba118ac49a1b88332f312a8f67186f7f3c1643 Date: 2021-10-19T15:49:28.381Z (2 wks ago) Electron: 13.5.1 Chrome: 91.0.4472.164 Node.js: 14.16.0 V8: 9.1.269.39-electron.0 OS: Darwin x64 20.6.0
Jupyter Extension Version
v2021.9.1101343141
Coding Language and Runtime Version
Python, though I don’t imagine it matters?
Running Jupyter locally or remotely?
Remote
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Connection Failed to remote jupyter notebook - Stack Overflow
So solution is simply choosing a different port number, e.g. 8890 or else except 8888 in your case. Didn't work for me.
Read more >Config file and command line options - The Jupyter Notebook
Reload the webapp when changes are made to any Python src files. NotebookApp.base_project_urlUnicode. Default: '/'. DEPRECATED use base_url. NotebookApp.
Read more >Run Jupyter notebooks in your workspace - Azure
Learn how run a Jupyter notebook without leaving your workspace in Azure Machine Learning studio.
Read more >IPython Console — Spyder 5 documentation
To connect to a kernel on a remote machine,. Launch a Spyder kernel on the remote host if one is not already running,...
Read more >Connecting to a Remote Jupyter Notebook Server Running on ...
Navigating the VS Code UI is probably the hardest part of connecting it to a Jupyter kernel, remote or local, so let's see...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yeah, it’s much better-behaved now! Very helpful errors and everything.
@zpincus Please could you test the latest version of the Jupyter extension and let us know if this works as expected.