-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Jupyter notebook run in chrome gets stuck on server restart #3764
Comments
I have this a lot, restarting the notebook with tabs open and restarting the notebook servers makes it difficult for the notebooks to get a kernel again. I think this also happened to @SylvainCorlay at SciPy 2018. |
I think I'm hitting a similar issue: when running a notebook, at one point (when producing matplotlib graphs) the server says "Starting buffer for..." and then the connection drops. The server still thinks it's fine, but in Chrome I get "ERR_CONNECTION_REFUSED." At this point I'm unable to connect to localhost for anything, including a restarted Jupyter server and a basic HTML server as suggested in #1832 (comment). The only remedy I've found is to reboot my device, but it continues to happen at the same stage of the notebook consistently. I'll try closing other tabs. I'm running ChromeOS's native Linux environment, Jupyter 1.0.0 on Python 3.7 via conda. |
The issue is still there. Any chance someone could look at it? Last time it was discussed here and was closed unresolved. #1415 Some people had an issue with ublock, but this is not the case - it's the same problem w/ or w/o ublock. |
|
Thank you for this update, @Amini-ML With this change it seems to work most of the time if after restarting the jupyter server, the URL of the notebook is reloaded in the browser. There were a few instances where it was still stuck. I will test more with real notebooks. If however I don't reload the URL in the browser, and restart the jupyter server, followed by kernel restart, it says the kernel has been restarted, but the notebook won't run, all cells are (*) busy. Probably it shouldn't say the kernel has been restarted if in fact it's not functional. For other linux/chrome users who may read this, the config file is |
I start with a working jupyter setup, and everything works just fine. I can interrupt or restart the kernel from the notebook without any problems.
If, however, I change some jupyter configuration, or install some modules, and restart jupyter server - I have to wait for about 5 minutes for the open notebooks to recover access to the python kernel.
To reproduce the problem:
Start jupyter (local shell)
jupyter notebook
In chrome create a new notebook (python 3), which will result in a url like:
http://localhost:8888/notebooks/Untitled1.ipynb?kernel_name=python3
Create and run a single cell in that new notebook:
print(1)
Restart jupyter (Ctrl-C followed by [yes] to the prompt to exit), followed by:
jupyter notebook
Go to the same chrome tab with the same single cell notebook and click OK for the pop-up
"Connection failed"
Observe the notebook showing:
[Connecting to Kernel]
without success.Try to Restart the kernel via the menu, usually it gets stuck in
[Kernel Starting...]
, and after several manually forced kernel restarts it supposedly succeeds[Kernel Created]
, but it's a false success, as trying to run the cells gives a[*]
busy sign and nothing happens.After some 5 min of waiting it recovers by itself.
Workarounds:
Software:
Same setup works fine in firefox on the same machine.
There are several tickets on github about the same from 2015 (e.g. #1415, but somehow they blame it on chrome and clearly the issue is still there 3 years later).
Any idea how to solve this?
Thank you.
And here is the log during the open notebook reconnect/restart process:
edit: updated my setup specs to the current ones.
The text was updated successfully, but these errors were encountered: