Losing jupyter notebook ssh connection kills kernel

徘徊边缘 提交于 2020-05-10 04:32:06

问题


I have an Ipython Jupyter kernel running on in an AWS VPN that I tunnel to a port my laptop where I connect to with a browser. I am finding that the kernel dies whenever I lose the tunnel and I have to run my notebook from the beginning.

What is the likely cause of this and how can I prevent it?

It is only the notebook kernels that die, the notebook server stays up.


回答1:


I admit that this seems odd. I wonder if there is something in the notebook that is killing the kernel. This can happen. You may have already done this, but try a really simple notebook, like a=10, drop the connection, and then see if you can print(a) after you recoennect.

However, the way to avoid the problem altogether is to use screen or tmux to create persistent sshs session. That is what many people who work on remote servers do.




回答2:


Maybe resulting from your proxy?I have been troubled for one afternoon for that,because I use nginx proxy_pass fo my jupyter to proxy to that port. But it always didn't connect, i look through the docs of jupyter notebook and found that Jupter Proxy Issue
And i change to use nginx rewrite rather than proxy, it works. So in my case, it can be caused by proxy.



来源:https://stackoverflow.com/questions/35932019/losing-jupyter-notebook-ssh-connection-kills-kernel

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!