How to keep remote notebook server alive when the client machine disconnects?
- Dominant language
- Jupyter Notebook
- Stars
- 13.3k
- Forks
- 5.8k
- Avg merge
- 6d 11h
- Merged PRs (30d)
- 7
Description
I have a home server, which I use to run Jupyter.
I open a terminal window on my macbook and login into the server using `ssh username@home-server`. I then start jupyter using `jupyter notebook --no-browser.` I then open another terminal window on my macbook and set up Jupyter server port forwarding `ssh -L 8000:localhost:8888 username@home-server`. Then I can open a browser on my mac, navigate to localhost:8000 with the right token, and everything works.
But!
Periodically, the Jupyter server disconnects and the terminal window I used to set up port forwarding starts printing "Connection refused" messages. When I re-open the terminals and re-ssh-login into the home-server, it shows no Jupyter notebooks running. This is puzzling, as I would expect Jupyter to keep running on the remote server, even if I lose the internet connection to it.
Similarly, if I close my macbook and it goes to sleep, the Jupyter notebook also somehow dies on the remote server.
Any thoughts on what I am doing wrong? The server is running OpenSUSE Leap.
Thanks!
Contributor guide
Research direction
No repository file or test is identified. Start by reproducing the described `jupyter notebook --no-browser` session and the SSH port-forwarding command, then determine what happens when the client disconnects or sleeps; done means documenting the cause and a reliable way to keep the remote notebook available.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- jupyter-notebook, linux
- Domain
- devops, networking
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100