jupyter / jupyter/notebook

Jupyter notebook server does not quit

Open
#5,328 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Jupyter Notebook
Stars
13.3k
Forks
5.8k
Avg merge
6d 11h
Merged PRs (30d)
7

Description

When trying to quit the notebook by pressing on the button on frontend, server does not shutdown entirely. `jupyter notebook list` does not list any running server, `jupyter notebook stop` says that "There are no running servers", but when I check processes, the notebook process is still running. This does not occur always, but it happens in 1/5.

Notebook is running on ubuntu 18.04 in docker container(yes we do run it with --init flag).

Version:
```
jupyter core : 4.6.3
jupyter-notebook : 6.0.3
qtconsole : 4.7.2
ipython : 7.13.0
ipykernel : 5.2.0
jupyter client : 6.1.2
jupyter lab : not installed
nbconvert : 5.6.1
ipywidgets : 7.5.1
nbformat : 5.0.5
traitlets : 4.3.3
```

Notebook logs on quit:
```
[I 12:48:17.214 NotebookApp] Saving file at /Untitled.ipynb
[I 12:50:35.069 NotebookApp] Shutting down on /api/shutdown request.
[I 12:50:35.070 NotebookApp] Shutting down 1 kernel
{'content': {'restart': False},
'header': {'date': datetime.datetime(2020, 4, 3, 12, 50, 35, 70961, tzinfo=datetime.timezone.utc),
'msg_id': 'd1176e16-0524f2cd7579c1eb03d8001e_0',
'msg_type': 'shutdown_request',
'session': 'd1176e16-0524f2cd7579c1eb03d8001e',
'username': 'username',
'version': '5.3'},
'metadata': {},
'msg_id': 'd1176e16-0524f2cd7579c1eb03d8001e_0',
'msg_type': 'shutdown_request',
'parent_header': {}}
[b'',
b'95c556e63d83cd58709854ab75010a1ab67c0c2fd3465b3e145e1da121bb8f5f',
b'{"msg_id":"d1176e16-0524f2cd7579c1eb03d8001e_0","msg_type":"shutdown_request'
b'","username":"username","session":"d1176e16-0524f2cd7579c1eb03d8001e","date"'
b':"2020-04-03T12:50:35.070961Z","version":"5.3"}',
b'{}',
b'{}',
b'{"restart":false}']
[]
[I 12:50:35.372 NotebookApp] Kernel shutdown: 5c1bea7b-cfb6-4c63-8df6-9bdf76380fb2
```

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the intermittent shutdown failure in the reported Ubuntu 18.04 Docker environment, using the frontend quit button and checking the remaining notebook process. Use the provided shutdown logs and command results to trace the server shutdown path; done means the server process exits reliably after quitting and the running-server commands remain consistent.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, jupyter-notebook, ubuntu
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.