[Bug?] Starting remote kernel gives error once, after shutting down remote kernel

25 views
Skip to first unread message

‍유재성[ 학부졸업 / 전기전자공학부 ]

unread,
Mar 19, 2021, 8:30:44 AM3/19/21
to Project Jupyter
Hello, everyone :)
I want to ask a question regarding remote kernel.

I'm using "Atom" editor and "Hydrogen" extension package.
In case you don't know, "Hydrogen" is a package that connects to ipython kernels and lets the user run code line-by-line or in blocks right inside the Atom text editor.

One of the features there has "connect to remote kernel", which allows Hydrogen to select a remote kernel, not a local one, and run code there.
So this feature comes in handy when you want to run and experiment code right in the server, not experimenting locally and then uploading the code to the server.

When you try connect to remote server through Atom & Hydrogen,
Hydrogen first shows you the list of remote kernels that you've specified.
After you select one, it gives you the option to create a kernel, or connect to an existing one.
After your kernel runs, you can click the kernel button on the bottom, to disconnect, rename kernel, and shut down kernel.

In my server, I've set "--JupyterWebsocketPersonality.list_kernels=True" and "KernelGatewayApp.auth_token=<my_token>".
And from my atom editor, I can create a remote kernel, disconnect, connect to existing kernel, rename it, and finally shut it down.

The problem comes here.
After I shut the kernel down, when I try to connect to my remote server, it fails.
If I try again, then it works like it used to.

So I'm wondering if there's some bug in remote_kernelgateway, maybe around keeping list of kernels.
This is the error message from the server when I try to connect after shutting down a remote ipykernel.
캡처.PNG

Does anyone know why this happens?
Thanks in advance!
JaeSung

Kevin Bates

unread,
Mar 19, 2021, 9:02:23 PM3/19/21
to Project Jupyter
Hi JaeSung,

This appears to be something that should probably get looked at in the Jupyter Kernel Gateway repo. It looks like it could be a race condition between listing running kernels and a kernel's deletion, such that the list processing encounters a missing key associated with the deleted kernel.  This issue is likely benign, but we'll take a closer look here: https://github.com/jupyter/kernel_gateway

Thanks,
Kevin.
Reply all
Reply to author
Forward
0 new messages