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.

Stuck on "starting kernel" when launching ansible-kernel

See original GitHub issue

Environment data

  • VS Code version: 1,54,3
  • Jupyter Extension version (available under the Extensions sidebar): v2021.3.684299474
  • Python Extension version (available under the Extensions sidebar): v2021.3.680753044
  • OS (Windows | Mac | Linux distro) and version: DevContainer based on mcr.microsoft.com/vscode/devcontainers/python:0-3
  • Python and/or Anaconda version: 3,8.5
  • Type of virtual environment used (N/A | venv | virtualenv | conda | …): N/A
  • Jupyter server running: Local

Additional Packages:

File: requirements.txt

ansible==2.9.12
hvac>=0.10.5
jmespath>=0.10.0
Jinja2>=2.11.2
netaddr
PyYAML==5.3.1
git+https://github.com/ansible/ansible-jupyter-kernel@master#egg=ansible-jupyter-kernel

File: Dockerfile

COPY requirements.txt /tmp/pip-tmp/
RUN pip3 --disable-pip-version-check --no-cache-dir install -r /tmp/pip-tmp/requirements.txt \
    && rm -rf /tmp/pip-tmp

RUN python3 -m ansible_kernel.install 

Expected behaviour

After selecting the ansible kernel in the notebook, the kernel should start and accept cells

Actual behaviour

After selecting the ansible kernel in the notebook, the message “Switching to ansible kernel” is stuck/doesn’t disappear. Also cells in the notebook are still executed in the python3 kernel.

Steps to reproduce:

[NOTE: Self-contained, minimal reproducing code samples are extremely helpful and will expedite addressing your issue]

  1. Prepare the devcontainer with the above snippets - standard python template.
  2. Start the devcontainer
  3. Open a new notebook
  4. Switch Kernel to “ansible”

Logs

Output for Jupyter in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Jupyter)

Started kernel Ansible
Info 2021-04-05 16:33:53: Starting raw kernel Ansible
Info 2021-04-05 16:33:53: Kernel launching with ports 9020,9021,9022,9023,9024. Start port is 9000
Info 2021-04-05 16:33:53: Launching Raw Kernel & not daemon Ansible # /usr/local/bin/python3
Info 2021-04-05 16:33:53: No custom variables for Kernel as interpreter is not conda, but is Unknown
Info 2021-04-05 16:33:53: Process Execution: > /usr/local/bin/python3 -m ansible_kernel -f /tmp/tmp-28431W69ssw8kf6Fn.json
> /usr/local/bin/python3 -m ansible_kernel -f /tmp/tmp-28431W69ssw8kf6Fn.json
Info 2021-04-05 16:33:53: Process Execution: cwd: /workspaces/optimist
cwd: /workspaces/optimist
Info 2021-04-05 16:33:53: Launching kernel in kernelProcess.ts, Class name = _, completed in 94ms, has a truthy return value, Arg 1: "/workspaces/optimist", Return Value: {"proc":{"_events":{},"_eventsCount":0,"_closesNeeded":3,"_closesGot":0,"connected":false,"signalCode":null,"exitCode":null,"killed":false,"spawnfile":"/usr/local/bin/python3","_handle":{"pid":13742},"spawnargs":["/usr/local/bin/python3","-m","ansible_kernel","-f","/tmp/tmp-28431W69ssw8kf6Fn.json"],"pid":13742,"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}}
Info 2021-04-05 16:33:56: KernelProcess output: NOTE: When using the `ipython kernel` entry point, Ctrl-C will not work.

To exit, you will have to explicitly quit this process, by either sending
"quit" from a client, or using Ctrl-\ in UNIX-like environments.

To read more about this, see https://github.com/ipython/ipython/issues/2049


To connect another client to this kernel, use:
    --existing /tmp/tmp-28431W69ssw8kf6Fn.json

Info 2021-04-05 16:33:56: Kernel Output: NOTE: When using the `ipython kernel` entry point, Ctrl-C will not work.

To exit, you will have to explicitly quit this process, by either sending
"quit" from a client, or using Ctrl-\ in UNIX-like environments.

To read more about this, see https://github.com/ipython/ipython/issues/2049


To connect another client to this kernel, use:
    --existing /tmp/tmp-28431W69ssw8kf6Fn.json

Info 2021-04-05 16:34:07: Waiting for idle on (kernel): f1848c79-5375-4cb4-bd5d-f289dd4c5a5e -> idle
Info 2021-04-05 16:34:07: Finished waiting for idle on (kernel): f1848c79-5375-4cb4-bd5d-f289dd4c5a5e -> idle
Info 2021-04-05 16:34:07: shutdownSession d02188c4-e009-440b-babb-d0cc3b341549, .python385jvsc74a57bd04cd7ab41f5fca4b9b44701077e38c5ffd31fe66a6cab21e0214b68d958d0e462.python./usr/local/bin/python.Python 3.8.5 64-bit - start
Info 2021-04-05 16:34:07: Session can be shutdown .python385jvsc74a57bd04cd7ab41f5fca4b9b44701077e38c5ffd31fe66a6cab21e0214b68d958d0e462.python./usr/local/bin/python.Python 3.8.5 64-bit
Info 2021-04-05 16:34:07: Dispose Kernel process
Info 2021-04-05 16:34:07: kill daemon
Info 2021-04-05 16:34:07: Starting raw kernel Ansible
Info 2021-04-05 16:34:07: shutdownSession 50aed67b-b486-44ff-86fe-44be485df7ed, .python385jvsc74a57bd04cd7ab41f5fca4b9b44701077e38c5ffd31fe66a6cab21e0214b68d958d0e462.python./usr/local/bin/python.Python 3.8.5 64-bit - start
Info 2021-04-05 16:34:07: Session can be shutdown .python385jvsc74a57bd04cd7ab41f5fca4b9b44701077e38c5ffd31fe66a6cab21e0214b68d958d0e462.python./usr/local/bin/python.Python 3.8.5 64-bit
Info 2021-04-05 16:34:07: Dispose Kernel process
Info 2021-04-05 16:34:07: kill daemon
Info 2021-04-05 16:34:07: Initial setup for file:///workspaces/optimist/Untitled-1.ipynb starting ...
Info 2021-04-05 16:34:07: UpdateWorkingDirectoryAndPath
Info 2021-04-05 16:34:07: Kernel launching with ports 9025,9026,9027,9028,9029. Start port is 9000
Info 2021-04-05 16:34:07: KernelProcess output: Content-Length: 132
Content-Type: application/vscode-jsonrpc; charset=utf8

{"jsonrpc": "2.0", "method": "log", "params": {"level": "INFO", "msg": "Execute rpc method kill_kernel in DS Daemon", "pid": 22632}}Content-Length: 146
Content-Type: application/vscode-jsonrpc; charset=utf8

{"jsonrpc": "2.0", "method": "log", "params": {"level": "INFO", "msg": "Execute rpc method kill_kernel from /usr/local/bin/python", "pid": 22632}}Content-Length: 129
Content-Type: application/vscode-jsonrpc; charset=utf8

{"jsonrpc": "2.0", "method": "log", "params": {"level": "INFO", "msg": "Kill kernel in DS Kernel Launcher Daemon", "pid": 22632}}
Info 2021-04-05 16:34:07: Python Daemon (pid: 22632): Execute rpc method kill_kernel in DS Daemon
Info 2021-04-05 16:34:07: KernelProcess output: Content-Length: 140
Content-Type: application/vscode-jsonrpc; charset=utf8

{"jsonrpc": "2.0", "method": "log", "params": {"level": "INFO", "msg": "Kill kernel in DS Kernel Launcher Daemon, pid 22634", "pid": 22632}}Content-Length: 43
Content-Type: application/vscode-jsonrpc; charset=utf8

{"jsonrpc": "2.0", "id": 3, "result": null}
Info 2021-04-05 16:34:07: KernelProcess output: Content-Length: 132
Content-Type: application/vscode-jsonrpc; charset=utf8

{"jsonrpc": "2.0", "method": "log", "params": {"level": "INFO", "msg": "Execute rpc method kill_kernel in DS Daemon", "pid": 23438}}Content-Length: 146
Content-Type: application/vscode-jsonrpc; charset=utf8

{"jsonrpc": "2.0", "method": "log", "params": {"level": "INFO", "msg": "Execute rpc method kill_kernel from /usr/local/bin/python", "pid": 23438}}Content-Length: 129
Content-Type: application/vscode-jsonrpc; charset=utf8

{"jsonrpc": "2.0", "method": "log", "params": {"level": "INFO", "msg": "Kill kernel in DS Kernel Launcher Daemon", "pid": 23438}}Content-Length: 140
Content-Type: application/vscode-jsonrpc; charset=utf8

{"jsonrpc": "2.0", "method": "log", "params": {"level": "INFO", "msg": "Kill kernel in DS Kernel Launcher Daemon, pid 23442", "pid": 23438}}Content-Length: 43
Content-Type: application/vscode-jsonrpc; charset=utf8

{"jsonrpc": "2.0", "id": 3, "result": null}
Info 2021-04-05 16:34:07: Python Daemon (pid: 22632): Execute rpc method kill_kernel from /usr/local/bin/python
Info 2021-04-05 16:34:07: Python Daemon (pid: 23438): Execute rpc method kill_kernel in DS Daemon
Info 2021-04-05 16:34:07: KernelProcess output: Content-Length: 129
Content-Type: application/vscode-jsonrpc; charset=utf8

{"jsonrpc": "2.0", "method": "log", "params": {"level": "WARNING", "msg": "Kernel has exited with exit code -9, ", "pid": 22632}}Content-Length: 86
Content-Type: application/vscode-jsonrpc; charset=utf8

{"jsonrpc": "2.0", "method": "kernel_died", "params": {"exit_code": -9, "reason": ""}}
Info 2021-04-05 16:34:07: KernelProcess output: Content-Length: 129
Content-Type: application/vscode-jsonrpc; charset=utf8

{"jsonrpc": "2.0", "method": "log", "params": {"level": "WARNING", "msg": "Kernel has exited with exit code -9, ", "pid": 23438}}Content-Length: 86
Content-Type: application/vscode-jsonrpc; charset=utf8

{"jsonrpc": "2.0", "method": "kernel_died", "params": {"exit_code": -9, "reason": ""}}
Info 2021-04-05 16:34:07: Python Daemon (pid: 22632): Kill kernel in DS Kernel Launcher Daemon
Info 2021-04-05 16:34:07: Python Daemon (pid: 23438): Execute rpc method kill_kernel from /usr/local/bin/python
Info 2021-04-05 16:34:07: Python Daemon (pid: 22632): Kill kernel in DS Kernel Launcher Daemon, pid 22634
Info 2021-04-05 16:34:07: Python Daemon (pid: 23438): Kill kernel in DS Kernel Launcher Daemon
Info 2021-04-05 16:34:07: Launching Raw Kernel & not daemon Ansible # /usr/local/bin/python3
Info 2021-04-05 16:34:07: Cached data exists getEnvironmentVariables, /workspaces/optimist/Untitled-1.ipynb
Info 2021-04-05 16:34:07: No custom variables for Kernel as interpreter is not conda, but is Unknown
Info 2021-04-05 16:34:07: Process Execution: > /usr/local/bin/python3 -m ansible_kernel -f /tmp/tmp-28431V7vmhu1fRYiR.json
> /usr/local/bin/python3 -m ansible_kernel -f /tmp/tmp-28431V7vmhu1fRYiR.json
Info 2021-04-05 16:34:07: Process Execution: cwd: /workspaces/optimist
cwd: /workspaces/optimist
Info 2021-04-05 16:34:07: Launching kernel in kernelProcess.ts, Class name = _, completed in 18ms, has a truthy return value, Arg 1: "/workspaces/optimist", Return Value: {"proc":{"_events":{},"_eventsCount":0,"_closesNeeded":3,"_closesGot":0,"connected":false,"signalCode":null,"exitCode":null,"killed":false,"spawnfile":"/usr/local/bin/python3","_handle":{"pid":13925},"spawnargs":["/usr/local/bin/python3","-m","ansible_kernel","-f","/tmp/tmp-28431V7vmhu1fRYiR.json"],"pid":13925,"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}}
Info 2021-04-05 16:34:07: Dispose Kernel process
Info 2021-04-05 16:34:07: shutdownSession d02188c4-e009-440b-babb-d0cc3b341549, .python385jvsc74a57bd04cd7ab41f5fca4b9b44701077e38c5ffd31fe66a6cab21e0214b68d958d0e462.python./usr/local/bin/python.Python 3.8.5 64-bit - shutdown complete
Info 2021-04-05 16:34:07: Dispose Kernel process
Info 2021-04-05 16:34:07: Python Daemon (pid: 23438): Kill kernel in DS Kernel Launcher Daemon, pid 23442
Info 2021-04-05 16:34:07: KernelProcess Exit Exit - undefined 
Warn 2021-04-05 16:34:07: Python Daemon (pid: 22632): Kernel has exited with exit code -9, 
Info 2021-04-05 16:34:07: Dispose Kernel process
Info 2021-04-05 16:34:07: shutdownSession 50aed67b-b486-44ff-86fe-44be485df7ed, .python385jvsc74a57bd04cd7ab41f5fca4b9b44701077e38c5ffd31fe66a6cab21e0214b68d958d0e462.python./usr/local/bin/python.Python 3.8.5 64-bit - shutdown complete
Info 2021-04-05 16:34:07: Dispose Kernel process
Info 2021-04-05 16:34:07: KernelProcess Exit Exit - undefined 
Warn 2021-04-05 16:34:07: Python Daemon (pid: 23438): Kernel has exited with exit code -9, 
Info 2021-04-05 16:34:07: Initial setup complete for file:///workspaces/optimist/Untitled-1.ipynb
Info 2021-04-05 16:34:07: Preferred kernel for file:///workspaces/optimist/Untitled-1.ipynb is undefined
Info 2021-04-05 16:34:11: KernelProcess output: NOTE: When using the `ipython kernel` entry point, Ctrl-C will not work.

To exit, you will have to explicitly quit this process, by either sending
"quit" from a client, or using Ctrl-\ in UNIX-like environments.

To read more about this, see https://github.com/ipython/ipython/issues/2049


To connect another client to this kernel, use:
    --existing /tmp/tmp-28431V7vmhu1fRYiR.json

Info 2021-04-05 16:34:11: Kernel Output: NOTE: When using the `ipython kernel` entry point, Ctrl-C will not work.

To exit, you will have to explicitly quit this process, by either sending
"quit" from a client, or using Ctrl-\ in UNIX-like environments.

To read more about this, see https://github.com/ipython/ipython/issues/2049


To connect another client to this kernel, use:
    --existing /tmp/tmp-28431V7vmhu1fRYiR.json


Logfile ansible_kernel.log

[2021-04-02 16:52:16,462] DEBUG [asyncio.__init__:59] Using selector: EpollSelector
[2021-04-02 16:52:16,467] DEBUG [asyncio.__init__:59] Using selector: EpollSelector
[2021-04-02 16:52:16,469] DEBUG [ansible_kernel.kernel.__init__:179] session <class 'jupyter_client.session.Session'> <jupyter_client.session.Session object at 0x7f9df32ddca0>
[2021-04-02 16:52:16,470] DEBUG [ansible_kernel.kernel.__init__:180] iopub_socket <class 'ipykernel.iostream.BackgroundSocket'> <ipykernel.iostream.BackgroundSocket object at 0x7f9df32ddfd0>
[2021-04-02 16:52:16,519] DEBUG [ansible_kernel.kernel.__init__:229] /tmp/ansible_kernel_playbook4wefqyiy
[2021-04-02 16:52:17,962] INFO [ansible_kernel.kernel.do_inventory:569] inventory set to [all]
localhost ansible_connection=local

[2021-04-02 16:52:17,963] INFO [ansible_kernel.kernel.is_ansible_alive:1140] NOT STARTED
[2021-04-02 16:52:17,963] DEBUG [asyncio.__init__:59] Using selector: EpollSelector
[2021-04-02 16:52:17,966] INFO [ansible_kernel.kernel.start:114] thread.start
[2021-04-02 16:52:17,968] DEBUG [ansible_kernel.kernel.process_widgets:731] widget_vars_file /tmp/ansible_kernel_playbook4wefqyiy/project/widget_vars.yml
[2021-04-02 16:52:17,968] INFO [ansible_kernel.kernel.start_helper:258] Started helper
[2021-04-02 16:52:17,969] DEBUG [ansible_kernel.kernel.start_helper:276] vault_password? None
[2021-04-02 16:52:17,969] INFO [ansible_kernel.kernel.start_helper:288] Wrote ansible.cfg
[2021-04-02 16:52:17,971] DEBUG [ansible_kernel.kernel.do_execute_play:635] code_data {'gather_facts': False, 'hosts': 'localhost', 'name': 'default'}
[2021-04-02 16:52:17,971] DEBUG [ansible_kernel.kernel.do_execute_play:636] code_data type: <class 'dict'>
[2021-04-02 16:52:17,975] DEBUG [ansible_kernel.kernel.do_execute_play:662] - gather_facts: false
  hosts: localhost
  name: default
  roles:
  - ansible_kernel_helpers
  tasks:
  - pause_for_kernel:
      host: 127.0.0.1
      port: 45577
      task_num: -1
  - include_vars:
      file: widget_vars.yml
  - include_tasks: next_task0.yml

[2021-04-02 16:52:17,978] DEBUG [ansible_kernel.kernel.send_multipart:86] send_multipart [b'<IDS|MSG>', b'7b3b7d397e1be5832a77a207dd15faacea184e3a2fa310b9556329106f1eb08b', b'{"msg_id":"db08f8d8-741ff02924d56b22fa5d900b_0","msg_type":"stream","username":"username","session":"db08f8d8-741ff02924d56b22fa5d900b","date":"2021-04-02T16:52:17.977813Z","version":"5.3"}', b'{}', b'{}', b'{"name":"stdout","text":"\\n"}'] () {'copy': True}
[2021-04-02 16:52:17,978] DEBUG [ansible_kernel.kernel.send_multipart:89] result None
[2021-04-02 16:52:17,978] DEBUG [ansible_kernel.kernel.send_multipart:1236] send_multipart 6 [b'<IDS|MSG>', b'7b3b7d397e1be5832a77a207dd15faacea184e3a2fa310b9556329106f1eb08b', b'{"msg_id":"db08f8d8-741ff02924d56b22fa5d900b_0","msg_type":"stream","username":"username","session":"db08f8d8-741ff02924d56b22fa5d900b","date":"2021-04-02T16:52:17.977813Z","version":"5.3"}', b'{}', b'{}', b'{"name":"stdout","text":"\\n"}'] () {'copy': True}
[2021-04-02 16:52:17,978] DEBUG [ansible_kernel.kernel.send_multipart:89] result None
[2021-04-02 16:52:17,979] INFO [ansible_kernel.kernel.start_ansible_playbook:684] runner starting
[2021-04-02 16:52:17,981] INFO [ansible_kernel.kernel.start_ansible_playbook:695] runner started
[2021-04-02 16:52:17,981] INFO [ansible_kernel.kernel.start_ansible_playbook:696] Runner status: starting
[2021-04-02 16:52:17,981] INFO [ansible_kernel.kernel.start_ansible_playbook:698] In runner loop
[2021-04-02 16:52:17,981] INFO [ansible_kernel.kernel.start_ansible_playbook:701] getting message 45577
[2021-04-02 16:52:17,983] INFO [ansible_kernel.kernel.runner_process_message:307] runner message:
{'counter': 1,
 'end_line': 1,
 'event': 'verbose',
 'runner_ident': 'c628a8aa-9604-4cac-bab5-ef8aed988503',
 'start_line': 0,
 'stdout': 'The command was not found or was not executable: ansible-playbook',
 'uuid': 'd36598d4-b5ca-4365-83ca-8697ebae455a'}
[2021-04-02 16:52:17,984] DEBUG [ansible_kernel.kernel.send_multipart:86] send_multipart [b'<IDS|MSG>', b'85eb73e55cd9a9ad9d8b37e7d23e19a2a79807cf1812fa6d729d3e047de25fb2', b'{"msg_id":"db08f8d8-741ff02924d56b22fa5d900b_1","msg_type":"stream","username":"username","session":"db08f8d8-741ff02924d56b22fa5d900b","date":"2021-04-02T16:52:17.984211Z","version":"5.3"}', b'{}', b'{}', b'{"name":"stdout","text":"{\'counter\': 1,\\n \'end_line\': 1,\\n \'event\': \'verbose\',\\n \'runner_ident\': \'c628a8aa-9604-4cac-bab5-ef8aed988503\',\\n \'start_line\': 0,\\n \'stdout\': \'The command was not found or was not executable: ansible-playbook\',\\n \'uuid\': \'d36598d4-b5ca-4365-83ca-8697ebae455a\'}\\n"}'] () {'copy': True}
[2021-04-02 16:52:17,985] DEBUG [ansible_kernel.kernel.send_multipart:89] result None
[2021-04-02 16:52:17,985] DEBUG [ansible_kernel.kernel.send_multipart:1236] send_multipart 6 [b'<IDS|MSG>', b'85eb73e55cd9a9ad9d8b37e7d23e19a2a79807cf1812fa6d729d3e047de25fb2', b'{"msg_id":"db08f8d8-741ff02924d56b22fa5d900b_1","msg_type":"stream","username":"username","session":"db08f8d8-741ff02924d56b22fa5d900b","date":"2021-04-02T16:52:17.984211Z","version":"5.3"}', b'{}', b'{}', b'{"name":"stdout","text":"{\'counter\': 1,\\n \'end_line\': 1,\\n \'event\': \'verbose\',\\n \'runner_ident\': \'c628a8aa-9604-4cac-bab5-ef8aed988503\',\\n \'start_line\': 0,\\n \'stdout\': \'The command was not found or was not executable: ansible-playbook\',\\n \'uuid\': \'d36598d4-b5ca-4365-83ca-8697ebae455a\'}\\n"}'] () {'copy': True}
[2021-04-02 16:52:17,986] DEBUG [ansible_kernel.kernel.send_multipart:89] result None
[2021-04-02 16:52:17,986] INFO [ansible_kernel.kernel.finished_callback:1153] called
[2021-04-02 16:52:17,987] INFO [ansible_kernel.kernel.start_ansible_playbook:706] StatusMessage(message=['PlaybookEnded', {}])
[2021-04-02 16:52:17,987] INFO [ansible_kernel.kernel.process_message:401] message ['PlaybookEnded', {}]
[2021-04-02 16:52:17,988] INFO [ansible_kernel.kernel.process_message:408] message_type PlaybookEnded
[2021-04-02 16:52:17,988] INFO [ansible_kernel.kernel.process_message:409] message_data {}
[2021-04-02 16:52:17,988] DEBUG [ansible_kernel.kernel.process_message:443] PlaybookEnded
[2021-04-02 16:52:17,988] INFO [ansible_kernel.kernel.is_ansible_alive:1145] NO
[2021-04-02 16:52:17,988] INFO [ansible_kernel.kernel.stop:119] thread.stop start
[2021-04-02 16:52:17,989] INFO [ansible_kernel.kernel.stop:124] thread.stop end

The last block repeats endlessly.

Steps tried

  • Symlinking the ansible-playbook-executable into /bin helps, so I guess /usr/local/bin is not in PATH. Although it still never finishes and is not usable.
  • Launching the jupyter-notebook manually in a terminal works, I can select the kernel in the webinterface and interact with it. image

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
max06commented, Apr 5, 2021

@claudiaregio There you go: https://github.com/max06/jupyter-kernel-debug As minimal as possible. You need docker and the remote containers extension. Either use “Clone repo into volume” (my preferred option) or clone, open and confirm the prompt. First build will take some minutes, subsequent are fast. Plugins are auto installed. And jupyter is available in the bash-shell (tested).

At least if I didn’t forget about anything 😃

1reaction
max06commented, Apr 5, 2021

Can you reproduce the issue on your side? I could prepare a repo with a minimal devcontainer if that helps.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Linux kernel hangs at "Starting kernel ..." - boot
The cause may be, kernel is booting but it hung before console init. Also put prints in kernel entry point of uboot and...
Read more >
AM335X kernel hangs at "starting kernel..." during booting ...
Part Number: PROCESSOR-SDK-AM335X I met a kernel booting issue during porting SDK06.03 on AM335X platform, the u-boot-2019.01 works fine and ...
Read more >
Kernel Role - GitLab
Linux Kernel Role. This Ansible role install and enable a specific kernel version from OS repositories and to ensure matching kernel headers are...
Read more >
FAIL: TASK [patch-driver-ath : set kernel version to use] (#4) · Issues ...
Hi! I'm trying to run the automatic setup on Ubuntu 16.04, kernel 4.15.0-142-generic, but I'm stuck on "set kernel version to use".
Read more >
Chapter 31. Using Ansible roles to permanently configure ...
Follow these steps to prepare and apply an Ansible playbook to remotely configure kernel parameters with persisting effect on multiple managed operating systems ......
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