question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to start kernel - Waiting for Jupiter Session to be Idle (Kernel fails to start as completions request crahes without sending a response back)

See original GitHub issue

Applies To

  • Notebooks (.ipynb files)
  • Interactive Window and/or Cell Scripts (.py files with #%% markers)

What happened?

First of all - thank you so much for making this extension!

Expected: I run docker container tensorflow/tensorflow:2.6.0-gpu-jupyter on my server that has a GPU, since I am connecting from a M1 Mac. I have used this for weeks without issue. I would connect to the server with IP + token and the system would just work.

Actually:

  • I restarted my docker container yesterday on the server and opened VSCode. I think the plug-in as able to connect to my server, but when I try to run any cells, it just says Connecting to kernel: Python 3: Waiting for Jupiter Session to be idle. This message stays up for hours even.
  • In the top right, where I would select the kernel also, I always thought it would say (Remote) next to the kernel name, so I’m not sure if now my system and the server’s kernels are getting confused?
  • I logged into the jupyter URL via browser and was able to see Notebook running so it’s like commands are being sent but not received. I wonder if the ZeroMQ error is related as mentioned at the top of the Jupyter Logs output.

Anyways, I pasted the Jupyter extension logs below. To help explain the logs better and put a few character returns in for easier reading.

  • Everything up to and including 09:50:32: This is me just starting up VSCode
  • 09:51:08 - This is me connecting to the server by specifying the URI + token
  • 09:51:52 - This is mean trying to execute a cell.

VS Code Version

Version: 1.64.2 (Universal) Commit: f80445acd5a3dadef24aa209168452a3d97cc326 Date: 2022-02-09T22:00:58.347Z Electron: 13.5.2 Chromium: 91.0.4472.164 Node.js: 14.16.0 V8: 9.1.269.39-electron.0 OS: Darwin arm64 20.6.0

Jupyter Extension Version

v2022.1.1201831736

Jupyter logs

Visual Studio Code (1.64.2, undefined, desktop)
Jupyter Extension Version: 2022.1.1201831736.
Python Extension Version: 2022.0.1814523869.
User belongs to experiment group 'jupyterTest'
User belongs to experiment group 'jupyterEnhancedDataViewer'
Error 09:50:32: Exception while attempting zmq : [Error: No native build was found for platform=darwin arch=arm64 runtime=electron abi=89 uv=1 armv=8 libc=glibc node=14.16.0 electron=13.5.2
    loaded from: /Users/topcat/.vscode/extensions/ms-toolsai.jupyter-2022.1.1201831736/out/client/node_modules/zeromq

    at Function.load.path (/Users/topcat/.vscode/extensions/ms-toolsai.jupyter-2022.1.1201831736/out/client/node_modules/node-gyp-build/index.js:59:9)
    at load (/Users/topcat/.vscode/extensions/ms-toolsai.jupyter-2022.1.1201831736/out/client/node_modules/node-gyp-build/index.js:21:30)
    at Object.<anonymous> (/Users/topcat/.vscode/extensions/ms-toolsai.jupyter-2022.1.1201831736/out/client/node_modules/zeromq/lib/native.js:6:43)
    at Module.u._compile (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/loader.js:4:1313)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1155:10)
    at Module.load (internal/modules/cjs/loader.js:982:32)
    at Module._load (internal/modules/cjs/loader.js:823:14)
    at Function.f._load (electron/js2c/asar_bundle.js:5:12913)
    at Function.i._load (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:112:32271)
    at Function.p._load (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:112:28855)
    at Function.v._load (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:107:60382)
    at Module.require (internal/modules/cjs/loader.js:1006:19)
    at h (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/loader.js:4:699)
    at Object.<anonymous> (/Users/topcat/.vscode/extensions/ms-toolsai.jupyter-2022.1.1201831736/out/client/node_modules/zeromq/lib/index.js:3:16)
    at Module.u._compile (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/loader.js:4:1313)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1155:10)
    at Module.load (internal/modules/cjs/loader.js:982:32)
    at Module._load (internal/modules/cjs/loader.js:823:14)
    at Function.f._load (electron/js2c/asar_bundle.js:5:12913)
    at Function.i._load (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:112:32271)
    at Function.p._load (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:112:28855)
    at Function.v._load (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:107:60382)
    at Module.require (internal/modules/cjs/loader.js:1006:19)
    at h (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/loader.js:4:699)
    at Object.<anonymous> (/Users/topcat/.vscode/extensions/ms-toolsai.jupyter-2022.1.1201831736/out/client/extension.js:51:195125)
    at n (/Users/topcat/.vscode/extensions/ms-toolsai.jupyter-2022.1.1201831736/out/client/extension.js:1:186)
    at d.zmqSupported (/Users/topcat/.vscode/extensions/ms-toolsai.jupyter-2022.1.1201831736/out/client/extension.js:113:223967)
    at d.isSupportedForLocalLaunch (/Users/topcat/.vscode/extensions/ms-toolsai.jupyter-2022.1.1201831736/out/client/extension.js:113:223758)
    at d.get isSupported [as isSupported] (/Users/topcat/.vscode/extensions/ms-toolsai.jupyter-2022.1.1201831736/out/client/extension.js:113:223668)
    at t.registerTypes (/Users/topcat/.vscode/extensions/ms-toolsai.jupyter-2022.1.1201831736/out/client/extension.js:66:1057793)
    at /Users/topcat/.vscode/extensions/ms-toolsai.jupyter-2022.1.1201831736/out/client/extension.js:66:275217
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at async /Users/topcat/.vscode/extensions/ms-toolsai.jupyter-2022.1.1201831736/out/client/extension.js:51:785307
    at async t.activate (/Users/topcat/.vscode/extensions/ms-toolsai.jupyter-2022.1.1201831736/out/client/extension.js:51:784986)
    at async Promise.all (index 0)]
Info 09:50:32: Checking for server existence.
Info 09:50:32: Checking for server usability.
Info 09:50:32: Starting notebook server.
Info 09:50:32: Connecting to server
Info 09:50:32: Connecting to process server
Info 09:50:32: Connecting server kernel http://192.168.1.180:8888/
Connecting to Jupyter server at http://192.168.1.180:8888/
Info 09:50:32: Creating server with settings : {"baseUrl":"http://192.168.1.180:8888/","appUrl":"","wsUrl":"ws://192.168.1.180:8888/","token":"finenow","appendToken":true,"init":{"cache":"no-store","credentials":"same-origin"}}
Info 09:50:32: Connection complete server
Info 09:50:32: Server started.
Info 09:50:32: Creating server with settings : {"baseUrl":"http://192.168.1.180:8888/","appUrl":"","wsUrl":"ws://192.168.1.180:8888/","token":"finenow","appendToken":true,"init":{"cache":"no-store","credentials":"same-origin"}}
Info 09:50:32: Experiment status for python is {"enabled":true,"optInto":[],"optOutFrom":[]}
Info 09:50:33: Disposing session manager
Info 09:50:33: SessionManager - dispose contents manager
Info 09:50:33: ShutdownSessionAndConnection - dispose session manager
Info 09:50:33: Finished disposing jupyter session manager
Info 09:50:33: Creating server with settings : {"baseUrl":"http://192.168.1.180:8888/","appUrl":"","wsUrl":"ws://192.168.1.180:8888/","token":"finenow","appendToken":true,"init":{"cache":"no-store","credentials":"same-origin"}}
Info 09:50:33: Creating server with settings : {"baseUrl":"http://192.168.1.180:8888/","appUrl":"","wsUrl":"ws://192.168.1.180:8888/","token":"finenow","appendToken":true,"init":{"cache":"no-store","credentials":"same-origin"}}
Info 09:50:33: Disposing session manager
Info 09:50:33: SessionManager - dispose contents manager
Info 09:50:33: ShutdownSessionAndConnection - dispose session manager
Info 09:50:33: Finished disposing jupyter session manager
Info 09:50:33: Creating server with settings : {"baseUrl":"http://192.168.1.180:8888/","appUrl":"","wsUrl":"ws://192.168.1.180:8888/","token":"finenow","appendToken":true,"init":{"cache":"no-store","credentials":"same-origin"}}
Info 09:50:33: Disposing session manager
Info 09:50:33: SessionManager - dispose contents manager
Info 09:50:33: ShutdownSessionAndConnection - dispose session manager
Info 09:50:33: Finished disposing jupyter session manager
Info 09:50:33: Creating server with settings : {"baseUrl":"http://192.168.1.180:8888/","appUrl":"","wsUrl":"ws://192.168.1.180:8888/","token":"finenow","appendToken":true,"init":{"cache":"no-store","credentials":"same-origin"}}
Info 09:50:33: Disposing session manager
Info 09:50:33: SessionManager - dispose contents manager
Info 09:50:33: ShutdownSessionAndConnection - dispose session manager
Info 09:50:33: Finished disposing jupyter session manager
Info 09:50:33: Find preferred kernel for ~/Documents/Code/processor/Classification copy.ipynb with metadata {"kernelspec":{"display_name":"Python 3","language":"python","name":"python3"}} & preferred interpreter 
Info 09:50:33: Preferred Remote kernel for ~/Documents/Code/processor/Classification copy.ipynb is 29edf0b4-7eb9-4b0f-bb4b-9154a6a8cda0
Info 09:50:33: PreferredConnection: 29edf0b4-7eb9-4b0f-bb4b-9154a6a8cda0 found for NotebookDocument: ~/Documents/Code/processor/Classification copy.ipynb
Info 09:50:33: TargetController found ID: 29edf0b4-7eb9-4b0f-bb4b-9154a6a8cda0 for document ~/Documents/Code/processor/Classification copy.ipynb
Info 09:50:33: Setting controller affinity for ~/Documents/Code/processor/Classification copy.ipynb 29edf0b4-7eb9-4b0f-bb4b-9154a6a8cda0
Info 09:50:33: Disposing session manager
Info 09:50:33: SessionManager - dispose contents manager
Info 09:50:33: ShutdownSessionAndConnection - dispose session manager
Info 09:50:33: Finished disposing jupyter session manager
Info 09:50:33: Find preferred kernel for ~/Documents/Code/processor/Classification.ipynb with metadata {"kernelspec":{"display_name":"Python 3","language":"python","name":"python3"}} & preferred interpreter 
Info 09:50:33: Preferred Remote kernel for ~/Documents/Code/processor/Classification.ipynb is 46b01be8-6f93-4cca-a637-5454eab31f94
Info 09:50:33: PreferredConnection: http://192.168.1.180:8888/..python3./usr/bin/python3..-m#ipykernel_launcher found for NotebookDocument: ~/Documents/Code/processor/Classification.ipynb
Info 09:50:33: TargetController found ID: http://192.168.1.180:8888/..python3./usr/bin/python3..-m#ipykernel_launcher for document ~/Documents/Code/processor/Classification.ipynb
Info 09:50:33: Setting controller affinity for ~/Documents/Code/processor/Classification.ipynb http://192.168.1.180:8888/..python3./usr/bin/python3..-m#ipykernel_launcher
Info 09:50:33: Interrupt requested & no kernel.
Info 09:50:33: Setting setActiveController for ~/Documents/Code/processor/Classification copy.ipynb
Info 09:50:33: Setting setActiveController for ~/Documents/Code/processor/Classification.ipynb
Info 09:50:33: KernelProvider switched kernel to id = http://192.168.1.180:8888/..python3./usr/bin/python3..-m#ipykernel_launcher
Info 09:50:33: KernelProvider switched kernel to id = http://192.168.1.180:8888/..python3./usr/bin/python3..-m#ipykernel_launcher
Info 09:50:33: Creating controller for jupyter-notebook with interpreter /opt/homebrew/bin/python3
Info 09:50:33: Getting activation commands for /opt/homebrew/bin/python3 are not cached. May take a while.
Info 09:50:33: Creating controller for jupyter-notebook with interpreter /opt/homebrew/bin/python3
Info 09:50:33: Process Execution: > /opt/homebrew/bin/python3 -c "import jupyter"
> /opt/homebrew/bin/python3 -c "import jupyter"
Info 09:50:33: Process Execution: > /opt/homebrew/bin/python3 -c "import notebook"
> /opt/homebrew/bin/python3 -c "import notebook"
Info 09:50:33: Process Execution: > /opt/homebrew/bin/python3 -m pip list
> /opt/homebrew/bin/python3 -m pip list
Info 09:50:33: Registering dummy command feature



Info 09:51:08: Checking for server existence.
Info 09:51:08: Checking for server usability.
Info 09:51:08: Starting notebook server.
Info 09:51:08: Server started.
Info 09:51:08: Creating server with settings : {"baseUrl":"http://192.168.1.180:8888/","appUrl":"","wsUrl":"ws://192.168.1.180:8888/","token":"finenow","appendToken":true,"init":{"cache":"no-store","credentials":"same-origin"}}
Info 09:51:08: Disposing session manager
Info 09:51:08: SessionManager - dispose contents manager
Info 09:51:08: ShutdownSessionAndConnection - dispose session manager
Info 09:51:08: Finished disposing jupyter session manager



Info 09:51:52: Execute Cells request 1
Info 09:51:52: Execute Cell 1 ~/Documents/Code/processor/Classification copy.ipynb
Info 09:51:52: Starting Notebook in kernel.ts id = http://192.168.1.180:8888/..python3./usr/bin/python3..-m#ipykernel_launcher
Info 09:51:52: Starting a new session for kernel id = http://192.168.1.180:8888/..python3./usr/bin/python3..-m#ipykernel_launcher, name = python3
http://192.168.1.180:8888/: Kernel started: f21a39fc-3615-4760-b661-1237b0a842d1
Info 09:51:52: Waiting for idle on (kernel): f21a39fc-3615-4760-b661-1237b0a842d1 -> unknown
Info 09:51:53: Finished waiting for idle on (kernel): f21a39fc-3615-4760-b661-1237b0a842d1 -> idle
Info 09:51:53: Started session for kernel http://192.168.1.180:8888/..python3./usr/bin/python3..-m#ipykernel_launcher
Info 09:51:53: Waiting for idle (session) kernel http://192.168.1.180:8888/..python3./usr/bin/python3..-m#ipykernel_launcher
Info 09:51:53: Waiting for idle on (kernel): f21a39fc-3615-4760-b661-1237b0a842d1 -> idle
Info 09:51:53: Finished waiting for idle on (kernel): f21a39fc-3615-4760-b661-1237b0a842d1 -> idle
Info 09:51:53: Finished connecting kernel http://192.168.1.180:8888/..python3./usr/bin/python3..-m#ipykernel_launcher
http://192.168.1.180:8888/: Creating new notebook 
Info 09:51:53: Updating preferred kernel for remote notebook f21a39fc-3615-4760-b661-1237b0a842d1
Info 09:51:53: Storing Preferred remote kernel for ~/Documents/Code/processor/Classification copy.ipynb is f21a39fc-3615-4760-b661-1237b0a842d1

Coding Language and Runtime Version

No response

Language Extension Version (if applicable)

No response

Anaconda Version (if applicable)

No response

Running Jupyter locally or remotely?

Remote

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:18 (7 by maintainers)

github_iconTop GitHub Comments

7reactions
DonJayamannecommented, Feb 16, 2022

@JorisDeRidder please install the latest pre-release version of the jupyter extension and it should work. when you go into the extension panel ensure you install pre-release version.

1reaction
JorisDeRiddercommented, Feb 16, 2022

Problem solved! Wonderful, many thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

VS Code using Jupyter: Connecting to kernel: Python 3.6.9
I was using Jupyter-like code cells " #%% " (see docs) to run jupyter notebook in VSCode. And I ran into the same...
Read more >
How to Fix Kernel Error in Jupyter Notebook
The Jupyter Notebook most of us work with runs on Anaconda. So to get to the back-end, open the Anaconda command prompt.
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 >
Bug listing with status UNCONFIRMED as at 2022/12/24 17 ...
Bug:128538 - "sys-apps/coreutils: /bin/hostname should be installed from coreutils not sys-apps/net-tools" status:UNCONFIRMED resolution: severity:enhancement ...
Read more >
the kernel crashed while executing code in the the current cell ...
I was able to import the library but Python would crash as soon as I run this ... failed without request, for cell...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found