Closed kenkangxgwe closed 2 years ago
@kenkangxgwe, sorry, can you give more information about what you are trying to accomplish, what you have tried, what you are trying now, and what output you have received? I do not fully understand the scenario.
I select 11.3 and run some cmd.
return a timeout.
jupyter 1.0.0
jupyter-client 6.1.7
jupyter-console 6.2.0
jupyter-core 4.6.3
Same question here!
@cc-wr , It's basically about using the Jupyter extension in VS Code to start Wolfram Kernel. Could you verify that it is working on your side? Thanks
As far as I know VSCode currently only supports this functionality (non-python kernels in jupyter notebooks) in the insiders build. The standard version does not yet support it.
I'm getting this same issue using VSCode Insiders 1.55.0 on the experimental (insiders) Jupyter notebook system. I'm trying to run Wolfram Langauage 12.2 on Arch Linux. Same error timed out waiting to get a heartbeat from kernel process
. Log from Jupyter is pasted below
Info 2021-03-12 00:54:13: Execute Cell 0 vscode-notebook-cell:/home/ezra/Documents/MATS_S21/Diffusion/HW6/q3.ipynb#ch0000000 in kernelWithMetadata.ts
Info 2021-03-12 00:54:13: Starting Notebook in kernel.ts id = .wolframlanguage12.2./usr/local/Wolfram/Mathematica/12.2/Executables/WolframKernel..Wolfram Language 12.2
Info 2021-03-12 00:54:13: Cell Index:0, state:2, exec: undefined. User queued cell for execution
Info 2021-03-12 00:54:13: Cell Index:0, state:2, exec: undefined. Update cell state as it was enqueued
Info 2021-03-12 00:54:13: Creating raw notebook for file:///home/ezra/Documents/MATS_S21/Diffusion/HW6/q3.ipynb
Info 2021-03-12 00:54:13: Getting preferred kernel for file:///home/ezra/Documents/MATS_S21/Diffusion/HW6/q3.ipynb
Info 2021-03-12 00:54:13: Computing working directory file:///home/ezra/Documents/MATS_S21/Diffusion/HW6/q3.ipynb
Info 2021-03-12 00:54:13: Connecting to raw session for file:///home/ezra/Documents/MATS_S21/Diffusion/HW6/q3.ipynb with connection {"kind":"startUsingKernelSpec","kernelSpec":{"specFile":"/home/ezra/.local/share/jupyter/kernels/wolframlanguage12.2/kernel.json","name":"wolframlanguage12.2","argv":["/usr/local/Wolfram/Mathematica/12.2/Executables/WolframKernel","-script","/home/ezra/Downloads/WolframLanguageForJupyter/WolframLanguageForJupyter/Resources/KernelForWolframLanguageForJupyter.wl","{connection_file}","ScriptInstall"],"language":"Wolfram Language","path":"/usr/local/Wolfram/Mathematica/12.2/Executables/WolframKernel","display_name":"Wolfram Language 12.2"},"id":".wolframlanguage12.2./usr/local/Wolfram/Mathematica/12.2/Executables/WolframKernel..Wolfram Language 12.2"}
Info 2021-03-12 00:54:13: Starting raw kernel Wolfram Language 12.2
Info 2021-03-12 00:54:13: Kernel launching with ports 9016,9017,9018,9019,9020. Start port is 9000
Info 2021-03-12 00:54:13: Launching Raw Kernel & not daemon Wolfram Language 12.2 # /usr/local/Wolfram/Mathematica/12.2/Executables/WolframKernel
Info 2021-03-12 00:54:13: Cached data exists getEnvironmentVariables, /home/ezra/Documents/MATS_S21/Diffusion/HW6/q3.ipynb
Info 2021-03-12 00:54:13: No custom variables for Kernel as interpreter path is not defined for kernel Wolfram Language 12.2
Info 2021-03-12 00:54:13: Process Execution: > /usr/local/Wolfram/Mathematica/12.2/Executables/WolframKernel -script ~/Downloads/WolframLanguageForJupyter/WolframLanguageForJupyter/Resources/KernelForWolframLanguageForJupyter.wl /tmp/tmp-379358mWA5v71puTOc.json ScriptInstall
> /usr/local/Wolfram/Mathematica/12.2/Executables/WolframKernel -script ~/Downloads/WolframLanguageForJupyter/WolframLanguageForJupyter/Resources/KernelForWolframLanguageForJupyter.wl /tmp/tmp-379358mWA5v71puTOc.json ScriptInstall
Info 2021-03-12 00:54:13: Process Execution: cwd: ~/Documents/MATS_S21/Diffusion/HW6
cwd: ~/Documents/MATS_S21/Diffusion/HW6
Info 2021-03-12 00:54:13: Launching kernel in kernelProcess.ts, Class name = _, completed in 7ms, has a truthy return value, Arg 1: "/home/ezra/Documents/MATS_S21/Diffusion/HW6", Return Value: {"proc":{"_events":{},"_eventsCount":0,"_closesNeeded":3,"_closesGot":0,"connected":false,"signalCode":null,"exitCode":null,"killed":false,"spawnfile":"/usr/local/Wolfram/Mathematica/12.2/Executables/WolframKernel","_handle":{"pid":383306},"spawnargs":["/usr/local/Wolfram/Mathematica/12.2/Executables/WolframKernel","-script","/home/ezra/Downloads/WolframLanguageForJupyter/WolframLanguageForJupyter/Resources/KernelForWolframLanguageForJupyter.wl","/tmp/tmp-379358mWA5v71puTOc.json","ScriptInstall"],"pid":383306,"stdin":{"connecting":false,"_hadError":false,"_parent":null,"_host":null,"_readableState":{"objectMode":false,"highWaterMark":16384,"buffer":{"head":null,"tail":null,"length":0},"length":0,"pipes":null,"pipesCount":0,"flowing":null,"ended":false,"endEmitted":false,"reading":false,"sync":true,"needReadable":false,"emittedReadable":false,"readableListening":false,"resumeScheduled":false,"emitClose":false,"autoDestroy":false,"destroyed":false,"defaultEncoding":"utf8","awaitDrainWriters":null,"multiAwaitDrain":false,"readingMore":false,"decoder":null,"encoding":null},"readable":false,"_events":{},"_eventsCount":1,"_writableState":{"objectMode":false,"highWaterMark":16384,"finalCalled":false,"needDrain":false,"ending":false,"ended":false,"finished":false,"destroyed":false,"decodeStrings":false,"defaultEncoding":"utf8","length":0,"writing":false,"corked":0,"sync":true,"bufferProcessing":false,"writecb":null,"writelen":0,"afterWriteTickInfo":null,"bufferedRequest":null,"lastBufferedRequest":null,"pendingcb":0,"prefinished":false,"errorEmitted":false,"emitClose":false,"autoDestroy":false,"bufferedRequestCount":0,"corkedRequestsFree":{"next":null,"entry":null}},"writable":true,"allowHalfOpen":false,"_sockname":null,"_pendingData":null,"_pendingEncoding":"","server":null,"_server":null},"stdout":{"connecting":false,"_hadError":false,"_parent":null,"_host":null,"_readableState":{"objectMode":false,"highWaterMark":16384,"buffer":{"head":null,"tail":null,"length":0},"length":0,"pipes":null,"pipesCount":0,"flowing":null,"ended":false,"endEmitted":false,"reading":true,"sync":false,"needReadable":true,"emittedReadable":false,"readableListening":false,"resumeScheduled":false,"emitClose":false,"autoDestroy":false,"destroyed":false,"defaultEncoding":"utf8","awaitDrainWriters":null,"multiAwaitDrain":false,"readingMore":false,"decoder":null,"encoding":null},"readable":true,"_events":{},"_eventsCount":2,"_writableState":{"objectMode":false,"highWaterMark":16384,"finalCalled":false,"needDrain":false,"ending":false,"ended":false,"finished":false,"destroyed":false,"decodeStrings":false,"defaultEncoding":"utf8","length":0,"writing":false,"corked":0,"sync":true,"bufferProcessing":false,"writecb":null,"writelen":0,"afterWriteTickInfo":null,"bufferedRequest":null,"lastBufferedRequest":null,"pendingcb":0,"prefinished":false,"errorEmitted":false,"emitClose":false,"autoDestroy":false,"bufferedRequestCount":0,"corkedRequestsFree":{"next":null,"entry":null}},"writable":false,"allowHalfOpen":false,"_sockname":null,"_pendingData":null,"_pendingEncoding":"","server":null,"_server":null},"stderr":{"connecting":false,"_hadError":false,"_parent":null,"_host":null,"_readableState":{"objectMode":false,"highWaterMark":16384,"buffer":{"head":null,"tail":null,"length":0},"length":0,"pipes":null,"pipesCount":0,"flowing":null,"ended":false,"endEmitted":false,"reading":true,"sync":false,"needReadable":true,"emittedReadable":false,"readableListening":false,"resumeScheduled":false,"emitClose":false,"autoDestroy":false,"destroyed":false,"defaultEncoding":"utf8","awaitDrainWriters":null,"multiAwaitDrain":false,"readingMore":false,"decoder":null,"encoding":null},"readable":true,"_events":{},"_eventsCount":2,"_writableState":{"objectMode":false,"highWaterMark":16384,"finalCalled":false,"needDrain":false,"ending":false,"ended":false,"finished":false,"destroyed":false,"decodeStrings":false,"defaultEncoding":"utf8","length":0,"writing":false,"corked":0,"sync":true,"bufferProcessing":false,"writecb":null,"writelen":0,"afterWriteTickInfo":null,"bufferedRequest":null,"lastBufferedRequest":null,"pendingcb":0,"prefinished":false,"errorEmitted":false,"emitClose":false,"autoDestroy":false,"bufferedRequestCount":0,"corkedRequestsFree":{"next":null,"entry":null}},"writable":false,"allowHalfOpen":false,"_sockname":null,"_pendingData":null,"_pendingEncoding":"","server":null,"_server":null},"stdio":[{"connecting":false,"_hadError":false,"_parent":null,"_host":null,"_readableState":{"objectMode":false,"highWaterMark":16384,"buffer":{"head":null,"tail":null,"length":0},"length":0,"pipes":null,"pipesCount":0,"flowing":null,"ended":false,"endEmitted":false,"reading":false,"sync":true,"needReadable":false,"emittedReadable":false,"readableListening":false,"resumeScheduled":false,"emitClose":false,"autoDestroy":false,"destroyed":false,"defaultEncoding":"utf8","awaitDrainWriters":null,"multiAwaitDrain":false,"readingMore":false,"decoder":null,"encoding":null},"readable":false,"_events":{},"_eventsCount":1,"_writableState":{"objectMode":false,"highWaterMark":16384,"finalCalled":false,"needDrain":false,"ending":false,"ended":false,"finished":false,"destroyed":false,"decodeStrings":false,"defaultEncoding":"utf8","length":0,"writing":false,"corked":0,"sync":true,"bufferProcessing":false,"writecb":null,"writelen":0,"afterWriteTickInfo":null,"bufferedRequest":null,"lastBufferedRequest":null,"pendingcb":0,"prefinished":false,"errorEmitted":false,"emitClose":false,"autoDestroy":false,"bufferedRequestCount":0,"corkedRequestsFree":{"next":null,"entry":null}},"writable":true,"allowHalfOpen":false,"_sockname":null,"_pendingData":null,"_pendingEncoding":"","server":null,"_server":null},{"connecting":false,"_hadError":false,"_parent":null,"_host":null,"_readableState":{"objectMode":false,"highWaterMark":16384,"buffer":{"head":null,"tail":null,"length":0},"length":0,"pipes":null,"pipesCount":0,"flowing":null,"ended":false,"endEmitted":false,"reading":true,"sync":false,"needReadable":true,"emittedReadable":false,"readableListening":false,"resumeScheduled":false,"emitClose":false,"autoDestroy":false,"destroyed":false,"defaultEncoding":"utf8","awaitDrainWriters":null,"multiAwaitDrain":false,"readingMore":false,"decoder":null,"encoding":null},"readable":true,"_events":{},"_eventsCount":2,"_writableState":{"objectMode":false,"highWaterMark":16384,"finalCalled":false,"needDrain":false,"ending":false,"ended":false,"finished":false,"destroyed":false,"decodeStrings":false,"defaultEncoding":"utf8","length":0,"writing":false,"corked":0,"sync":true,"bufferProcessing":false,"writecb":null,"writelen":0,"afterWriteTickInfo":null,"bufferedRequest":null,"lastBufferedRequest":null,"pendingcb":0,"prefinished":false,"errorEmitted":false,"emitClose":false,"autoDestroy":false,"bufferedRequestCount":0,"corkedRequestsFree":{"next":null,"entry":null}},"writable":false,"allowHalfOpen":false,"_sockname":null,"_pendingData":null,"_pendingEncoding":"","server":null,"_server":null},{"connecting":false,"_hadError":false,"_parent":null,"_host":null,"_readableState":{"objectMode":false,"highWaterMark":16384,"buffer":{"head":null,"tail":null,"length":0},"length":0,"pipes":null,"pipesCount":0,"flowing":null,"ended":false,"endEmitted":false,"reading":true,"sync":false,"needReadable":true,"emittedReadable":false,"readableListening":false,"resumeScheduled":false,"emitClose":false,"autoDestroy":false,"destroyed":false,"defaultEncoding":"utf8","awaitDrainWriters":null,"multiAwaitDrain":false,"readingMore":false,"decoder":null,"encoding":null},"readable":true,"_events":{},"_eventsCount":2,"_writableState":{"objectMode":false,"highWaterMark":16384,"finalCalled":false,"needDrain":false,"ending":false,"ended":false,"finished":false,"destroyed":false,"decodeStrings":false,"defaultEncoding":"utf8","length":0,"writing":false,"corked":0,"sync":true,"bufferProcessing":false,"writecb":null,"writelen":0,"afterWriteTickInfo":null,"bufferedRequest":null,"lastBufferedRequest":null,"pendingcb":0,"prefinished":false,"errorEmitted":false,"emitClose":false,"autoDestroy":false,"bufferedRequestCount":0,"corkedRequestsFree":{"next":null,"entry":null}},"writable":false,"allowHalfOpen":false,"_sockname":null,"_pendingData":null,"_pendingEncoding":"","server":null,"_server":null}]},"out":{"_isScalar":false}}
Error 2021-03-12 00:55:13: Disposing kernel process due to an error [Error: timeout
at Timeout.<anonymous> (/home/ezra/.vscode-insiders/extensions/ms-toolsai.jupyter-2021.4.641214696/out/client/extension.js:49:630016)
at listOnTimeout (internal/timers.js:549:17)
at processTimers (internal/timers.js:492:7)]
Info 2021-03-12 00:55:13: Dispose Kernel process
Error 2021-03-12 00:55:13: Timed out waiting to get a heartbeat from kernel process.
Error 2021-03-12 00:55:13: Raw session failed to start in given timeout
Info 2021-03-12 00:55:13: Shutdown session -- complete
Error 2021-03-12 00:55:13: failed to create INotebook in kernel, UI Disabled = false [b [Error]:
at new t.WrappedError (/home/ezra/.vscode-insiders/extensions/ms-toolsai.jupyter-2021.4.641214696/out/client/extension.js:16:22008)
at new b (/home/ezra/.vscode-insiders/extensions/ms-toolsai.jupyter-2021.4.641214696/out/client/extension.js:32:534378)
at w.connect (/home/ezra/.vscode-insiders/extensions/ms-toolsai.jupyter-2021.4.641214696/out/client/extension.js:32:536238)
at async b.createNotebookInstance (/home/ezra/.vscode-insiders/extensions/ms-toolsai.jupyter-2021.4.641214696/out/client/extension.js:49:810657)
Error: Timed out waiting to get a heartbeat from kernel process.
jupyter.viewOutput
View Jupyter [log](command:{1}) for further details.
at _.launch (/home/ezra/.vscode-insiders/extensions/ms-toolsai.jupyter-2021.4.641214696/out/client/extension.js:49:624875)] {
category: 'timeout',
originalException: [i [Error]: Timed out waiting to get a heartbeat from kernel process.
jupyter.viewOutput
View Jupyter [log](command:{1}) for further details.
at _.launch (/home/ezra/.vscode-insiders/extensions/ms-toolsai.jupyter-2021.4.641214696/out/client/extension.js:49:624875)] {
category: 'timeout'
}
}
Error 2021-03-12 00:55:13: DataScience Error [i [Error]: Timed out waiting to get a heartbeat from kernel process.
jupyter.viewOutput
View Jupyter [log](command:{1}) for further details.
at _.launch (/home/ezra/.vscode-insiders/extensions/ms-toolsai.jupyter-2021.4.641214696/out/client/extension.js:49:624875)] {
category: 'timeout'
}
Error 2021-03-12 00:55:13: failed to start INotebook in kernel, UI Disabled = false [b [Error]:
at new t.WrappedError (/home/ezra/.vscode-insiders/extensions/ms-toolsai.jupyter-2021.4.641214696/out/client/extension.js:16:22008)
at new b (/home/ezra/.vscode-insiders/extensions/ms-toolsai.jupyter-2021.4.641214696/out/client/extension.js:32:534378)
at w.connect (/home/ezra/.vscode-insiders/extensions/ms-toolsai.jupyter-2021.4.641214696/out/client/extension.js:32:536238)
at async b.createNotebookInstance (/home/ezra/.vscode-insiders/extensions/ms-toolsai.jupyter-2021.4.641214696/out/client/extension.js:49:810657)
Error: Timed out waiting to get a heartbeat from kernel process.
jupyter.viewOutput
View Jupyter [log](command:{1}) for further details.
at _.launch (/home/ezra/.vscode-insiders/extensions/ms-toolsai.jupyter-2021.4.641214696/out/client/extension.js:49:624875)] {
category: 'timeout',
originalException: [i [Error]: Timed out waiting to get a heartbeat from kernel process.
jupyter.viewOutput
View Jupyter [log](command:{1}) for further details.
at _.launch (/home/ezra/.vscode-insiders/extensions/ms-toolsai.jupyter-2021.4.641214696/out/client/extension.js:49:624875)] {
category: 'timeout'
}
}
Error 2021-03-12 00:55:13: Failed to execute cells in CellExecutionQueue [b [Error]:
at new t.WrappedError (/home/ezra/.vscode-insiders/extensions/ms-toolsai.jupyter-2021.4.641214696/out/client/extension.js:16:22008)
at new b (/home/ezra/.vscode-insiders/extensions/ms-toolsai.jupyter-2021.4.641214696/out/client/extension.js:32:534378)
at w.connect (/home/ezra/.vscode-insiders/extensions/ms-toolsai.jupyter-2021.4.641214696/out/client/extension.js:32:536238)
at async b.createNotebookInstance (/home/ezra/.vscode-insiders/extensions/ms-toolsai.jupyter-2021.4.641214696/out/client/extension.js:49:810657)
Error: Timed out waiting to get a heartbeat from kernel process.
jupyter.viewOutput
View Jupyter [log](command:{1}) for further details.
at _.launch (/home/ezra/.vscode-insiders/extensions/ms-toolsai.jupyter-2021.4.641214696/out/client/extension.js:49:624875)] {
category: 'timeout',
originalException: [i [Error]: Timed out waiting to get a heartbeat from kernel process.
jupyter.viewOutput
View Jupyter [log](command:{1}) for further details.
at _.launch (/home/ezra/.vscode-insiders/extensions/ms-toolsai.jupyter-2021.4.641214696/out/client/extension.js:49:624875)] {
category: 'timeout'
}
}
Info 2021-03-12 00:55:13: Cancel pending cells
Info 2021-03-12 00:55:13: Cell Index:0, state:1, exec: undefined. Execution cancelled
Info 2021-03-12 00:55:13: Cell Index:0, state:1, exec: undefined. Completed due to cancellation
Info 2021-03-12 00:55:13: Cell Index:0, state:1, exec: undefined. Update cell statue as idle and message as empty
Info 2021-03-12 00:55:13: KernelProcess error: terminate called after throwing an instance of 'zmq::error_t'
what(): Interrupted system call
Warn 2021-03-12 00:55:13: StdErr from Kernel Process terminate called after throwing an instance of 'zmq::error_t'
what(): Interrupted system call
Info 2021-03-12 00:55:13: Cell Index:0, state:2, exec: undefined. Cell cancelled & resolving
Info 2021-03-12 00:55:13: Cell Index:0, state:2, exec: undefined. Execution disposed
Info 2021-03-12 00:55:15: KernelProcess Exit Exit - undefined terminate called after throwing an instance of 'zmq::error_t'
what(): Interrupted system call
Is there any solution now? I can't even find this kernel in vscode Jupyter.
But I can use this kernel in jupyter notebook (or lab).
For future readers who are interested in using Wolfram Notebook in VSCode, please take a look at https://github.com/njpipeorgan/wolfram-language-notebook.
I couldn't start the Wolfram Engine / MMA kernel in VSCode but I successfully started it and evaluated code pieces in a browser.
The output from vscode:
Not sure if it is a vscode problem or not? Post it here first. Thanks