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

running jupyter notebook Error: Kernel died #28

Closed
fzhang988 opened this issue Oct 12, 2020 · 2 comments
Closed

running jupyter notebook Error: Kernel died #28

fzhang988 opened this issue Oct 12, 2020 · 2 comments

Comments

@fzhang988
Copy link

[E 22:46:08.468 remote_ikernel] Kernel died.
[I 22:46:08.853 NotebookApp] KernelRestarter: restarting kernel (1/5), keep random ports
WARNING:root:kernel 59e2d9fd-b056-45da-95cf-05e6543e657b restarted
[E 22:46:08.854 NotebookApp] KernelRestarter: restart callback <bound method ZMQChannelsHandler.on_kernel_restarted of ZMQChannelsHandler(59e2d9fd-b056-45da-95cf-05e6543e657b)> failed
Traceback (most recent call last):
File "/home/zhang/miniconda3/lib/python3.8/site-packages/jupyter_client/restarter.py", line 86, in _fire_callbacks
callback()
File "/home/zhang/miniconda3/lib/python3.8/site-packages/notebook/services/kernels/handlers.py", line 476, in on_kernel_restarted
self._send_status_message('restarting')
File "/home/zhang/miniconda3/lib/python3.8/site-packages/notebook/services/kernels/handlers.py", line 472, in _send_status_message
self.write_message(json.dumps(msg, default=date_default))
File "/home/zhang/miniconda3/lib/python3.8/site-packages/tornado/websocket.py", line 339, in write_message
raise WebSocketClosedError()
tornado.websocket.WebSocketClosedError
[I 22:46:08.976 remote_ikernel] Remote kernel version: 0.4.6.
[I 22:46:08.976 remote_ikernel] File location: /home/zhang/miniconda3/envs/scenic_protocol/lib/python3.6/site-packages/remote_ikernel/kernel.py.
[I 22:46:08.977 remote_ikernel] Launching kernel over SSH.
[I 22:46:08.977 remote_ikernel] Login command: 'ssh -o StrictHostKeyChecking=no hostname2'.
[I 22:46:08.996 remote_ikernel] Established connection; starting kernel.
[I 22:46:08.996 remote_ikernel] Remote working directory /home/zhang//Desktop/pySCENIC/notebooks.
[I 22:46:09.147 remote_ikernel] Running kernel command: 'source /home/zhang/miniconda3/etc/profile.d/conda.sh && conda activate scenic_protocol && /home/zhang/miniconda3/envs/scenic_protocol/bin/ipython3 kernel -f ./rik_kernel-59e2d9fd-b056-45da-95cf-05e6543e657b.json'.
[I 22:46:09.476 remote_ikernel] Setting up tunnels on ports: 60137, 48085, 52635, 41725, 47981.
[E 22:46:12.254 remote_ikernel] Kernel died.
[I 22:46:12.639 NotebookApp] KernelRestarter: restarting kernel (1/5), keep random ports
[I 22:46:12.760 remote_ikernel] Remote kernel version: 0.4.6.
[I 22:46:12.760 remote_ikernel] File location: /home/zhang/miniconda3/envs/scenic_protocol/lib/python3.6/site-packages/remote_ikernel/kernel.py.
[I 22:46:12.760 remote_ikernel] Launching kernel over SSH.
[I 22:46:12.760 remote_ikernel] Login command: 'ssh -o StrictHostKeyChecking=no hostname'.
[I 22:46:12.777 remote_ikernel] Established connection; starting kernel.
[I 22:46:12.777 remote_ikernel] Remote working directory ~/.
[I 22:46:12.928 remote_ikernel] Running kernel command: 'source /home/zhang/miniconda3/etc/profile.d/conda.sh && conda activate scenic_protocol && /home/zhang/miniconda3/envs/scenic_protocol/bin/ipython3 kernel -f ./rik_kernel-77cfb9ea-6645-42ed-a876-48a465519bf4.json'.
[I 22:46:13.259 remote_ikernel] Setting up tunnels on ports: 45899, 39335, 40115, 59567, 34567.
[E 22:46:14.482 remote_ikernel] Kernel died.

Why Kernel always died? Thanks,
Fan

@cflerin
Copy link
Contributor

cflerin commented Oct 14, 2020

Hi @fzhang988 ,

It looks like you're trying to connect to a remote machine with pySCENIC installed in a conda environment. Your kernel command looks ok, but have you tried running it "manually"? From a terminal, ssh into your remote machine, and run your command (up to the ipython part):

source /home/zhang/miniconda3/etc/profile.d/conda.sh && conda activate scenic_protocol && /home/zhang/miniconda3/envs/scenic_protocol/bin/ipython3

If that gives you an error, it should help you track down what's going on.

@cflerin
Copy link
Contributor

cflerin commented Apr 27, 2021

See #21 for some additional information on setting up remote and local kernels with singularity images.

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