Remote kernel connection failure: remote kernel fails to launch in time
See original GitHub issueEnvironment data
- VS Code version: 1.63.2
- Jupyter Extension version (available under the Extensions sidebar): v2021.11.1001550889
- Python Extension version (available under the Extensions sidebar): v2021.12.1559732655
- OS (Windows | Mac | Linux distro) and version: Mac OS 10.14.6
- Python and/or Anaconda version: Python 3.7
- Type of virtual environment used (N/A | venv | virtualenv | conda | …): conda
- Jupyter server running: Remote
Expected behaviour
Connects to remote process server, launches kernel, connects
Actual behaviour
Successfully spawns remote kernel, but never connects (exceeds timeout while waiting for idle, even after bumping this to 90 seconds)
Steps to reproduce:
- Open python file
- Set connection URI to existing remote jupyter server (reload as required if changing URI)
- shift-enter some imports from the script, which invokes the jupyter extension, connects to the remote server, and spawns a kernel
- wait for timeout, observe in logs that kernel was spawned (can confirm this in web interface on remote server), but times out while “waiting for idle”
Extension log dump with minor redactions below. Remote server is AWS hosted jupyterhub on k8s (don’t have exact version details handy). This workflow was working fine until a crash today forced me to reboot my laptop for the first time in a couple weeks, which led to a number of automatic updates installing (unfortunately I don’t have the versions of vscode and the jupyter extension I had this working less than a week ago - I did try installing older versions of vscode and the jupyter extension without success). I can successfully connect using the Hydrogen extension in Atom, so I don’t think it’s a remote or local network issue (can clearly talk to the remote since it’ll list conda envs and launch a remote kernel). Just doesn’t seem like it’s hearing back from the kernel it successfully spawned. Please let me know if there’s other info I can grab that’d be helpful here. Thanks!
Logs
Info 02:50:34: Starting a new session for kernel id = .python3./home/jovyan/my-conda-envs/dask-scratch-env/python..-m#ipykernel_launcher, name = python3
Info 02:50:34: Registering dummy command feature
http://<<redacted>>/user/<<redacted>>/: Kernel started: 7a15aed2-c586-4413-8ffc-6f8fd3d9b085
Info 02:50:35: Waiting for idle on (kernel): 7a15aed2-c586-4413-8ffc-6f8fd3d9b085 -> unknown
Info 02:52:05: Finished waiting for idle on (kernel): 7a15aed2-c586-4413-8ffc-6f8fd3d9b085 -> unknown
Error 02:52:05: Failed to change kernel, re-throwing [s [Error]: The Jupyter notebook server failed to launch in time
at C.waitForIdleOnSession (/<<redacted>>/.vscode/extensions/ms-toolsai.jupyter-2021.11.1001550889/out/client/extension.js:51:181842)
at async C.createNewKernelSession (/<<redacted>>/.vscode/extensions/ms-toolsai.jupyter-2021.11.1001550889/out/client/extension.js:38:58981)
at async C.connect (/<<redacted>>/.vscode/extensions/ms-toolsai.jupyter-2021.11.1001550889/out/client/extension.js:38:57977)
at async m.startNew (/<<redacted>>/.vscode/extensions/ms-toolsai.jupyter-2021.11.1001550889/out/client/extension.js:66:1235261)
at async d (/<<redacted>>/.vscode/extensions/ms-toolsai.jupyter-2021.11.1001550889/out/client/extension.js:104:343660)
at async C.createNotebookInstance (/<<redacted>>/.vscode/extensions/ms-toolsai.jupyter-2021.11.1001550889/out/client/extension.js:104:343806)
at async C.createNotebook (/<<redacted>>/.vscode/extensions/ms-toolsai.jupyter-2021.11.1001550889/out/client/extension.js:104:344917)] {
category: 'timeout'
}
Error 02:52:05: failed to create INotebook in kernel, UI Disabled = false [s [Error]: The Jupyter notebook server failed to launch in time
at C.waitForIdleOnSession (/<<redacted>>/.vscode/extensions/ms-toolsai.jupyter-2021.11.1001550889/out/client/extension.js:51:181842)
at async C.createNewKernelSession (/<<redacted>>/.vscode/extensions/ms-toolsai.jupyter-2021.11.1001550889/out/client/extension.js:38:58981)
at async C.connect (/<<redacted>>/.vscode/extensions/ms-toolsai.jupyter-2021.11.1001550889/out/client/extension.js:38:57977)
at async m.startNew (/<<redacted>>/.vscode/extensions/ms-toolsai.jupyter-2021.11.1001550889/out/client/extension.js:66:1235261)
at async d (/<<redacted>>/.vscode/extensions/ms-toolsai.jupyter-2021.11.1001550889/out/client/extension.js:104:343660)
at async C.createNotebookInstance (/<<redacted>>/.vscode/extensions/ms-toolsai.jupyter-2021.11.1001550889/out/client/extension.js:104:343806)
at async C.createNotebook (/<<redacted>>/.vscode/extensions/ms-toolsai.jupyter-2021.11.1001550889/out/client/extension.js:104:344917)] {
category: 'timeout'
}
Error 02:52:05: DataScience Error [s [Error]: The Jupyter notebook server failed to launch in time
at C.waitForIdleOnSession (/<<redacted>>/.vscode/extensions/ms-toolsai.jupyter-2021.11.1001550889/out/client/extension.js:51:181842)
at async C.createNewKernelSession (/<<redacted>>/.vscode/extensions/ms-toolsai.jupyter-2021.11.1001550889/out/client/extension.js:38:58981)
at async C.connect (/<<redacted>>/.vscode/extensions/ms-toolsai.jupyter-2021.11.1001550889/out/client/extension.js:38:57977)
at async m.startNew (/<<redacted>>/.vscode/extensions/ms-toolsai.jupyter-2021.11.1001550889/out/client/extension.js:66:1235261)
at async d (/<<redacted>>/.vscode/extensions/ms-toolsai.jupyter-2021.11.1001550889/out/client/extension.js:104:343660)
at async C.createNotebookInstance (/<<redacted>>/.vscode/extensions/ms-toolsai.jupyter-2021.11.1001550889/out/client/extension.js:104:343806)
at async C.createNotebook (/<<redacted>>/.vscode/extensions/ms-toolsai.jupyter-2021.11.1001550889/out/client/extension.js:104:344917)] {
category: 'timeout'
}
Error 02:52:05: failed to start INotebook in kernel, UI Disabled = false [s [Error]: The Jupyter notebook server failed to launch in time
at C.waitForIdleOnSession (/<<redacted>>/.vscode/extensions/ms-toolsai.jupyter-2021.11.1001550889/out/client/extension.js:51:181842)
at async C.createNewKernelSession (/<<redacted>>/.vscode/extensions/ms-toolsai.jupyter-2021.11.1001550889/out/client/extension.js:38:58981)
at async C.connect (/<<redacted>>/.vscode/extensions/ms-toolsai.jupyter-2021.11.1001550889/out/client/extension.js:38:57977)
at async m.startNew (/<<redacted>>/.vscode/extensions/ms-toolsai.jupyter-2021.11.1001550889/out/client/extension.js:66:1235261)
at async d (/<<redacted>>/.vscode/extensions/ms-toolsai.jupyter-2021.11.1001550889/out/client/extension.js:104:343660)
at async C.createNotebookInstance (/<<redacted>>/.vscode/extensions/ms-toolsai.jupyter-2021.11.1001550889/out/client/extension.js:104:343806)
at async C.createNotebook (/<<redacted>>/.vscode/extensions/ms-toolsai.jupyter-2021.11.1001550889/out/client/extension.js:104:344917)] {
category: 'timeout'
}
Error 02:52:05: DataScience Error [s [Error]: The Jupyter notebook server failed to launch in time
at C.waitForIdleOnSession (/<<redacted>>/.vscode/extensions/ms-toolsai.jupyter-2021.11.1001550889/out/client/extension.js:51:181842)
at async C.createNewKernelSession (/<<redacted>>/.vscode/extensions/ms-toolsai.jupyter-2021.11.1001550889/out/client/extension.js:38:58981)
at async C.connect (/<<redacted>>/.vscode/extensions/ms-toolsai.jupyter-2021.11.1001550889/out/client/extension.js:38:57977)
at async m.startNew (/<<redacted>>/.vscode/extensions/ms-toolsai.jupyter-2021.11.1001550889/out/client/extension.js:66:1235261)
at async d (/<<redacted>>/.vscode/extensions/ms-toolsai.jupyter-2021.11.1001550889/out/client/extension.js:104:343660)
at async C.createNotebookInstance (/<<redacted>>/.vscode/extensions/ms-toolsai.jupyter-2021.11.1001550889/out/client/extension.js:104:343806)
at async C.createNotebook (/<<redacted>>/.vscode/extensions/ms-toolsai.jupyter-2021.11.1001550889/out/client/extension.js:104:344917)] {
category: 'timeout'
}
Error 02:52:05: DataScience Error [s [Error]: The Jupyter notebook server failed to launch in time
at C.waitForIdleOnSession (/<<redacted>>/.vscode/extensions/ms-toolsai.jupyter-2021.11.1001550889/out/client/extension.js:51:181842)
at async C.createNewKernelSession (/<<redacted>>/.vscode/extensions/ms-toolsai.jupyter-2021.11.1001550889/out/client/extension.js:38:58981)
at async C.connect (/<<redacted>>/.vscode/extensions/ms-toolsai.jupyter-2021.11.1001550889/out/client/extension.js:38:57977)
at async m.startNew (/<<redacted>>/.vscode/extensions/ms-toolsai.jupyter-2021.11.1001550889/out/client/extension.js:66:1235261)
at async d (/<<redacted>>/.vscode/extensions/ms-toolsai.jupyter-2021.11.1001550889/out/client/extension.js:104:343660)
at async C.createNotebookInstance (/<<redacted>>/.vscode/extensions/ms-toolsai.jupyter-2021.11.1001550889/out/client/extension.js:104:343806)
at async C.createNotebook (/<<redacted>>/.vscode/extensions/ms-toolsai.jupyter-2021.11.1001550889/out/client/extension.js:104:344917)] {
category: 'timeout'
}
Info 03:06:24: Disposing kernel .python3./home/jovyan/my-conda-envs/dask-scratch-env/python..-m#ipykernel_launcher for notebook vscode-interactive:Interactive-1.interactive due to selection of another kernel or closing of the notebook
Info 03:06:24: Dispose kernel file:///<<redacted>>
Info 03:06:24: Notebook Closed vscode-interactive:Interactive-1.interactive
Info 03:06:24: Kernel got disposed as a result of closing the notebook vscode-interactive:Interactive-1.interactive
Info 03:06:24: Closing interactive window: vscode-interactive:Interactive-1.interactive
Info 03:06:38: Process Execution: > ~/anaconda3/envs/updated-scratch-environment/bin/python ~/.vscode/extensions/ms-toolsai.jupyter-2021.11.1001550889/pythonFiles/normalizeSelection.py
> ~/anaconda3/envs/updated-scratch-environment/bin/python ~/.vscode/extensions/ms-toolsai.jupyter-2021.11.1001550889/pythonFiles/normalizeSelection.py
Info 03:06:38: Starting interactive window with controller ID ms-toolsai.jupyter/.python3./home/jovyan/my-conda-envs/dask-scratch-env/python..-m#ipykernel_launcher (Interactive)
Info 03:06:38: Setting setActiveController for vscode-interactive:Interactive-1.interactive
Info 03:06:38: Starting Notebook in kernel.ts id = .python3./home/jovyan/my-conda-envs/dask-scratch-env/python..-m#ipykernel_launcher
Info 03:06:38: Registering dummy command feature
Info 03:06:38: Starting a new session for kernel id = .python3./home/jovyan/my-conda-envs/dask-scratch-env/python..-m#ipykernel_launcher, name = python3
http://<<redacted>>/user/<<redacted>>/: Kernel started: e47aa7df-c857-44f1-ab46-9a038410bdb4
Info 03:06:39: Waiting for idle on (kernel): e47aa7df-c857-44f1-ab46-9a038410bdb4 -> unknown
Info 03:08:09: Finished waiting for idle on (kernel): e47aa7df-c857-44f1-ab46-9a038410bdb4 -> unknown
Error 03:08:09: Failed to change kernel, re-throwing [s [Error]: The Jupyter notebook server failed to launch in time
at C.waitForIdleOnSession (/<<redacted>>/.vscode/extensions/ms-toolsai.jupyter-2021.11.1001550889/out/client/extension.js:51:181842)
at async C.createNewKernelSession (/<<redacted>>/.vscode/extensions/ms-toolsai.jupyter-2021.11.1001550889/out/client/extension.js:38:58981)
at async C.connect (/<<redacted>>/.vscode/extensions/ms-toolsai.jupyter-2021.11.1001550889/out/client/extension.js:38:57977)
at async m.startNew (/<<redacted>>/.vscode/extensions/ms-toolsai.jupyter-2021.11.1001550889/out/client/extension.js:66:1235261)
at async d (/<<redacted>>/.vscode/extensions/ms-toolsai.jupyter-2021.11.1001550889/out/client/extension.js:104:343660)
at async C.createNotebookInstance (/<<redacted>>/.vscode/extensions/ms-toolsai.jupyter-2021.11.1001550889/out/client/extension.js:104:343806)
at async C.createNotebook (/<<redacted>>/.vscode/extensions/ms-toolsai.jupyter-2021.11.1001550889/out/client/extension.js:104:344917)] {
category: 'timeout'
}
Error 03:08:09: failed to create INotebook in kernel, UI Disabled = false [s [Error]: The Jupyter notebook server failed to launch in time
at C.waitForIdleOnSession (/<<redacted>>/.vscode/extensions/ms-toolsai.jupyter-2021.11.1001550889/out/client/extension.js:51:181842)
at async C.createNewKernelSession (/<<redacted>>/.vscode/extensions/ms-toolsai.jupyter-2021.11.1001550889/out/client/extension.js:38:58981)
at async C.connect (/<<redacted>>/.vscode/extensions/ms-toolsai.jupyter-2021.11.1001550889/out/client/extension.js:38:57977)
at async m.startNew (/<<redacted>>/.vscode/extensions/ms-toolsai.jupyter-2021.11.1001550889/out/client/extension.js:66:1235261)
at async d (/<<redacted>>/.vscode/extensions/ms-toolsai.jupyter-2021.11.1001550889/out/client/extension.js:104:343660)
at async C.createNotebookInstance (/<<redacted>>/.vscode/extensions/ms-toolsai.jupyter-2021.11.1001550889/out/client/extension.js:104:343806)
at async C.createNotebook (/<<redacted>>/.vscode/extensions/ms-toolsai.jupyter-2021.11.1001550889/out/client/extension.js:104:344917)] {
category: 'timeout'
}
Error 03:08:09: DataScience Error [s [Error]: The Jupyter notebook server failed to launch in time
at C.waitForIdleOnSession (/<<redacted>>/.vscode/extensions/ms-toolsai.jupyter-2021.11.1001550889/out/client/extension.js:51:181842)
at async C.createNewKernelSession (/<<redacted>>/.vscode/extensions/ms-toolsai.jupyter-2021.11.1001550889/out/client/extension.js:38:58981)
at async C.connect (/<<redacted>>/.vscode/extensions/ms-toolsai.jupyter-2021.11.1001550889/out/client/extension.js:38:57977)
at async m.startNew (/<<redacted>>/.vscode/extensions/ms-toolsai.jupyter-2021.11.1001550889/out/client/extension.js:66:1235261)
at async d (/<<redacted>>/.vscode/extensions/ms-toolsai.jupyter-2021.11.1001550889/out/client/extension.js:104:343660)
at async C.createNotebookInstance (/<<redacted>>/.vscode/extensions/ms-toolsai.jupyter-2021.11.1001550889/out/client/extension.js:104:343806)
at async C.createNotebook (/<<redacted>>/.vscode/extensions/ms-toolsai.jupyter-2021.11.1001550889/out/client/extension.js:104:344917)] {
category: 'timeout'
}
Error 03:08:09: failed to start INotebook in kernel, UI Disabled = false [s [Error]: The Jupyter notebook server failed to launch in time
at C.waitForIdleOnSession (/<<redacted>>/.vscode/extensions/ms-toolsai.jupyter-2021.11.1001550889/out/client/extension.js:51:181842)
at async C.createNewKernelSession (/<<redacted>>/.vscode/extensions/ms-toolsai.jupyter-2021.11.1001550889/out/client/extension.js:38:58981)
at async C.connect (/<<redacted>>/.vscode/extensions/ms-toolsai.jupyter-2021.11.1001550889/out/client/extension.js:38:57977)
at async m.startNew (/<<redacted>>/.vscode/extensions/ms-toolsai.jupyter-2021.11.1001550889/out/client/extension.js:66:1235261)
at async d (/<<redacted>>/.vscode/extensions/ms-toolsai.jupyter-2021.11.1001550889/out/client/extension.js:104:343660)
at async C.createNotebookInstance (/<<redacted>>/.vscode/extensions/ms-toolsai.jupyter-2021.11.1001550889/out/client/extension.js:104:343806)
at async C.createNotebook (/<<redacted>>/.vscode/extensions/ms-toolsai.jupyter-2021.11.1001550889/out/client/extension.js:104:344917)] {
category: 'timeout'
}
Error 03:08:09: DataScience Error [s [Error]: The Jupyter notebook server failed to launch in time
at C.waitForIdleOnSession (/<<redacted>>/.vscode/extensions/ms-toolsai.jupyter-2021.11.1001550889/out/client/extension.js:51:181842)
at async C.createNewKernelSession (/<<redacted>>/.vscode/extensions/ms-toolsai.jupyter-2021.11.1001550889/out/client/extension.js:38:58981)
at async C.connect (/<<redacted>>/.vscode/extensions/ms-toolsai.jupyter-2021.11.1001550889/out/client/extension.js:38:57977)
at async m.startNew (/<<redacted>>/.vscode/extensions/ms-toolsai.jupyter-2021.11.1001550889/out/client/extension.js:66:1235261)
at async d (/<<redacted>>/.vscode/extensions/ms-toolsai.jupyter-2021.11.1001550889/out/client/extension.js:104:343660)
at async C.createNotebookInstance (/<<redacted>>/.vscode/extensions/ms-toolsai.jupyter-2021.11.1001550889/out/client/extension.js:104:343806)
at async C.createNotebook (/<<redacted>>/.vscode/extensions/ms-toolsai.jupyter-2021.11.1001550889/out/client/extension.js:104:344917)] {
category: 'timeout'
}
Error 03:08:09: DataScience Error [s [Error]: The Jupyter notebook server failed to launch in time
at C.waitForIdleOnSession (/<<redacted>>/.vscode/extensions/ms-toolsai.jupyter-2021.11.1001550889/out/client/extension.js:51:181842)
at async C.createNewKernelSession (/<<redacted>>/.vscode/extensions/ms-toolsai.jupyter-2021.11.1001550889/out/client/extension.js:38:58981)
at async C.connect (/<<redacted>>/.vscode/extensions/ms-toolsai.jupyter-2021.11.1001550889/out/client/extension.js:38:57977)
at async m.startNew (/<<redacted>>/.vscode/extensions/ms-toolsai.jupyter-2021.11.1001550889/out/client/extension.js:66:1235261)
at async d (/<<redacted>>/.vscode/extensions/ms-toolsai.jupyter-2021.11.1001550889/out/client/extension.js:104:343660)
at async C.createNotebookInstance (/<<redacted>>/.vscode/extensions/ms-toolsai.jupyter-2021.11.1001550889/out/client/extension.js:104:343806)
at async C.createNotebook (/<<redacted>>/.vscode/extensions/ms-toolsai.jupyter-2021.11.1001550889/out/client/extension.js:104:344917)] {
category: 'timeout'
}
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (3 by maintainers)
Top GitHub Comments
Hi @rchiodo,
That’s the one. Alright, as far as I’m concerned, no new issues, all resolved in pre-release extension and vs code insiders. Thanks for your help!
It should be this setting here that controls how shift+enter works:
If that is checked, shift+enter should send code to the interactive window. It determines if
jupyter.ownsSelection
is true or not.The default for that setting is false. If you’re on 1.64 (insiders), it has a different set of settings.