cannot quit jupyter notebook server running
So I found a solution.
Since jupyter notebook list
tells you which ports the notebook servers are running on I looked for the PIDs using netstat -tulpn
I got the information from http://www.cyberciti.biz/faq/what-process-has-open-linux-port/
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
PID/Program name
tcp 0 0 0.0.0.0:8649 0.0.0.0:* LISTEN
-
tcp 0 0 0.0.0.0:139 0.0.0.0:* LISTEN
-
tcp 0 0 0.0.0.0:33483 0.0.0.0:* LISTEN
-
tcp 0 0 0.0.0.0:5901 0.0.0.0:* LISTEN
39125/Xvnc
Without looking too hard I was able to find the ports I knew to look for from jupyter notebook list
and the processes running them (you could use grep
if it were too hard to find them). Then I killed them with
kill 8337
(or whatever number was associated).
Windows Systems commands on Command Prompt
Be careful to save all the changes made in your notebooks prior to kill the jupyter notebook server process.
i) find the port number used by jupyter notebook server
jupyter notebook list
ex.)
jupyter notebook list
Currently running servers:
http://127.0.0.1:8888/ :: D:\kimkk\Documents\JupyterNotebook
ii) find process ids that use the found port number of jupyter notebook
netstat -ano | find "found portnumber"
ex.)
netstat -ano | find "8888"
TCP 127.0.0.1:8888 0.0.0.0:0 LISTENING 24140
TCP 127.0.0.1:8888 127.0.0.1:55588 ESTABLISHED 24140
TCP 127.0.0.1:8888 127.0.0.1:55612 ESTABLISHED 24140
TCP 127.0.0.1:55588 127.0.0.1:8888 ESTABLISHED 6492
TCP 127.0.0.1:55612 127.0.0.1:8888 ESTABLISHED 6492
- find rows with second column value equals to "8888". In above example first, second, and third rows are target rows. In those rows, you can find PID in the last column (ex. 24140).
iii) kill jupyter notebook process with found PID
taskkill /PID found_PID /F
ex.)
taskkill /PID 24140 /F
- /F means forcely kill the process.
FYI, Jupyter notebook from version 5.1 supports stop command as follows:
jupyter notebook stop 8888
refer to https://github.com/jupyter/notebook/issues/1950