Skip to content
This repository has been archived by the owner on Jan 16, 2018. It is now read-only.

Kernel keeps restarting #6

Closed
MAliNaqvi opened this issue Mar 20, 2017 · 4 comments · Fixed by #8
Closed

Kernel keeps restarting #6

MAliNaqvi opened this issue Mar 20, 2017 · 4 comments · Fixed by #8

Comments

@MAliNaqvi
Copy link

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.

@barrachri
Copy link

barrachri commented Mar 21, 2017

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....

@minrk
Copy link
Contributor

minrk commented Mar 24, 2017

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.

@barrachri
Copy link

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.

@minrk
Copy link
Contributor

minrk commented Mar 27, 2017

#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.

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

Successfully merging a pull request may close this issue.

3 participants