Kernel keeps restarting
MAliNaqvi opened this issue · comments
When starting a new notebook we get the following error:
[I 2017-03-20 17:36:26.048 zzz sign:210] Writing notebook-signing key to /home/jovyan/.local/share/jupyter/notebook_secret
[W 2017-03-20 17:36:26.050 zzz manager:449] Notebook Accessing+elasticsearch+via+Python.ipynb is not trusted
[I 2017-03-20 17:36:27.821 zzz kernelmanager:89] Kernel started: 8525545b-0dfa-4735-8993-24bf4ea40337
[I 2017-03-20 17:36:30.822 zzz restarter:103] KernelRestarter: restarting kernel (1/5)
[I 2017-03-20 17:36:33.828 zzz restarter:103] KernelRestarter: restarting kernel (2/5)
[I 2017-03-20 17:36:36.833 zzz restarter:103] KernelRestarter: restarting kernel (3/5)
[W 2017-03-20 17:36:37.983 zzz handlers:232] Timeout waiting for kernel_info reply from 8525545b-0dfa-4735-8993-24bf4ea40337
The issue goes away if we switch back to using docker spawner.
Hi @MAliNaqvi, it's a really strange issue but I resolved it removing command:
c.SwarmSpawner.container_spec = {
# The command to be run inside the service
#'command' : 'start-singleuser.sh', #(string or list)
'Image' : 'jupyter/r-notebook',
'mounts' : mounts
}
and put it inside the image you want to use, like this Dockerfile:
FROM jupyter/scipy-notebook
CMD ["start-singleuser.sh"]
I think is more related to Docker and Jupyter....
Could be related: moby/moby#25644
It makes zero sense that specifying in the Dockerfile and container_spec should do something different, but it could be tty-related.
Hi @minrk, I see you have the same problem with kubespawner.
I am preparing a docker-compose file to test this locally.
As you said it makes no sense but that's how it is :\
Btw it happens only with IPykernel, with R works fine.
#8 should do it. There are bugs in ipykernel when the notebook server is itself the ENTRYPOINT of a container, which it probably shouldn't be. The issue is that command
in the container spec actually sets ENTRYPOINT, it doesn't set CMD. args
sets CMD. So the main issue here is one of documentation: use args
instead of command
if you want to override CMD.