Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kernel restart not working on server #530

Open
LarryLegend33 opened this issue Apr 5, 2024 · 3 comments
Open

Kernel restart not working on server #530

LarryLegend33 opened this issue Apr 5, 2024 · 3 comments

Comments

@LarryLegend33
Copy link

I'm running jupyter notebooks on a server using emacs-jupyter, connecting to remote kernels using connection files. When I use C-c C-r to restart the kernel, the kernel does not restart and I get this error message. I haven't seen this come up anywhere else.

jupyter-command: Content written to stderr stream
env: ‘jupyter’: No such file or directory
jupyter-runtime-directory: Can’t obtain runtime directory from jupyter shell command

This is the only error I'm getting -- interrupt works, and the code in the notebook runs to completion. Thanks!

@LarryLegend33
Copy link
Author

@nnicandro just coming back here after a month to see if there's been any action on this issue; I'm still very eager to use your very cool package on Gcloud, as its working amazingly well on my home computer. if the issue of kernel restart could be addressed, i'm sure my entire group would be interested in using your system as we are all using jax on GCloud. Thanks!

@nnicandro
Copy link
Collaborator

With remote kernels using a connection file the restart method is just a shutdown followed by a launch of a new kernel process. In the launch it tries to write a new connection file to the jupyter-runtime-directory so that the launched kernel can read from that file during its initialization. The runtime directory is obtained by calling out to the shell command jupyter --runtime-dir and it seems that the remote system does not have the jupyter command available. That seems to be what is the cause of the error. There is still an issue on my end of things though. The connection file that will be written on the launch wont have the same ports as the original kernel so the newly launched kernel will have different ports than the original and the connection will most likely not work due to some port tunneling that is done when first connecting to the original kernel. This will also have to be solved, but is trivial since the original connection info can be kept around so that it can be used during the launch.

@nnicandro
Copy link
Collaborator

I'm not familiar with GCloud, but you will need to have Jupyter installed on the system for the restart to work correctly with the current implementation. Are you running the kernel inside a container without any supporting software installed in it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants