notebook: Stuck at 'Kernel starting, please wait...'

Hi,

I have the issue that my notebooks do not connect to their kernel anymore. I can create new notebooks and open old ones, but the white “Kernel starting, please wait…” box never goes away and cells never execute.

Where should I look to find out, what could be the cause for that?

The setup is:

  • The jupyter notebooks are running on a ubuntu server in the local lan and
  • I try to access them via my work notebook using Chrome 50.0.2661.86 (64-bit) on OSX 10.11.4 (15E65).
  • I access the notebooks using https with a password.
  • My colleagues with similar configurations have no issues.

One note, that (since a long time) I had similar issues in Safari. It would show the orange “Connecting to kernel” box and then the red “Not Connected” one.

jupyter notebook --debug
[D 11:33:28.710 NotebookApp] Config changed:
[D 11:33:28.710 NotebookApp] {'NotebookApp': {'log_level': 10}}
[D 11:33:28.710 NotebookApp] Searching [u'/home/ludwig', '/home/ludwig/.jupyter', '/usr/etc/jupyter', '/usr/local/etc/jupyter', '/etc/jupyter'] for config files
[D 11:33:28.710 NotebookApp] Attempting to load config file jupyter_config.py in path /etc/jupyter
[D 11:33:28.710 NotebookApp] Attempting to load config file jupyter_config.json in path /etc/jupyter
[D 11:33:28.710 NotebookApp] Attempting to load config file jupyter_config.py in path /usr/local/etc/jupyter
[D 11:33:28.711 NotebookApp] Attempting to load config file jupyter_config.json in path /usr/local/etc/jupyter
[D 11:33:28.711 NotebookApp] Attempting to load config file jupyter_config.py in path /usr/etc/jupyter
[D 11:33:28.711 NotebookApp] Attempting to load config file jupyter_config.json in path /usr/etc/jupyter
[D 11:33:28.711 NotebookApp] Attempting to load config file jupyter_config.py in path /home/ludwig/.jupyter
[D 11:33:28.711 NotebookApp] Attempting to load config file jupyter_config.json in path /home/ludwig/.jupyter
[D 11:33:28.711 NotebookApp] Attempting to load config file jupyter_config.py in path /home/ludwig
[D 11:33:28.711 NotebookApp] Attempting to load config file jupyter_config.json in path /home/ludwig
[D 11:33:28.711 NotebookApp] Attempting to load config file jupyter_notebook_config.py in path /etc/jupyter
[D 11:33:28.711 NotebookApp] Attempting to load config file jupyter_notebook_config.json in path /etc/jupyter
[D 11:33:28.711 NotebookApp] Attempting to load config file jupyter_notebook_config.py in path /usr/local/etc/jupyter
[D 11:33:28.711 NotebookApp] Attempting to load config file jupyter_notebook_config.json in path /usr/local/etc/jupyter
[D 11:33:28.712 NotebookApp] Attempting to load config file jupyter_notebook_config.py in path /usr/etc/jupyter
[D 11:33:28.712 NotebookApp] Attempting to load config file jupyter_notebook_config.json in path /usr/etc/jupyter
[D 11:33:28.712 NotebookApp] Attempting to load config file jupyter_notebook_config.py in path /home/ludwig/.jupyter
[D 11:33:28.712 NotebookApp] Attempting to load config file jupyter_notebook_config.json in path /home/ludwig/.jupyter
[D 11:33:28.712 NotebookApp] Loaded config file: /home/ludwig/.jupyter/jupyter_notebook_config.py
[D 11:33:28.713 NotebookApp] Config changed:
[D 11:33:28.713 NotebookApp] {'NotebookApp': {'open_browser': False, 'log_level': 10, 'ip': '*', 'certfile': u'/home/ludwig/.jupyter/mycert.pem', 'password': u'sha1:aa81bad79fba:a6f9f38ef7bf36cd3e25f5b38873196eed623604', 'keyfile': u'/home/ludwig/.jupyter/mycert.key', 'port': 9000}}
[D 11:33:28.713 NotebookApp] Attempting to load config file jupyter_notebook_config.py in path /home/ludwig
[D 11:33:28.713 NotebookApp] Attempting to load config file jupyter_notebook_config.json in path /home/ludwig
[I 11:33:28.718 NotebookApp] Writing notebook server cookie secret to /run/user/1002/jupyter/notebook_cookie_secret
[I 11:33:28.735 NotebookApp] The port 9000 is already in use, trying another random port.
[I 11:33:28.738 NotebookApp] Serving notebooks from local directory: /home/ludwig
[I 11:33:28.738 NotebookApp] 0 active kernels
[I 11:33:28.738 NotebookApp] The IPython Notebook is running at: https://[all ip addresses on your system]:9001/
[I 11:33:28.738 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[I 11:33:38.106 NotebookApp] 302 GET / (10.102.10.118) 0.85ms
[I 11:33:38.113 NotebookApp] 302 GET /tree (10.102.10.118) 1.28ms
[D 11:33:38.119 NotebookApp] Using contents: services/contents
[D 11:33:38.146 NotebookApp] 200 GET /login?next=%2Ftree (10.102.10.118) 28.03ms
[D 11:33:38.207 NotebookApp] 200 GET /static/components/jquery-ui/themes/smoothness/jquery-ui.min.css?v=9b2c8d3489227115310662a343fce11c (10.102.10.118) 2.52ms
[D 11:33:38.225 NotebookApp] 200 GET /static/style/style.min.css?v=726bda814675157da88304dabb766757 (10.102.10.118) 11.98ms
[D 11:33:38.242 NotebookApp] 200 GET /static/components/es6-promise/promise.min.js?v=f004a16cb856e0ff11781d01ec5ca8fe (10.102.10.118) 0.88ms
[D 11:33:38.246 NotebookApp] 200 GET /static/auth/css/override.css?v=795650e17afc9ef2f7cd6b630a0d5f80 (10.102.10.118) 0.80ms
[D 11:33:38.250 NotebookApp] 200 GET /custom/custom.css (10.102.10.118) 0.86ms
[D 11:33:38.253 NotebookApp] 200 GET /static/components/requirejs/require.js?v=2de44fdcc1fe5e939aa4ce80626b241d (10.102.10.118) 1.21ms
[D 11:33:38.262 NotebookApp] 200 GET /static/base/images/logo.png?v=7c4597ba713d804995e8f8dad448a397 (10.102.10.118) 0.85ms
[D 11:33:38.438 NotebookApp] 200 GET /static/auth/js/main.min.js?v=20160502113328 (10.102.10.118) 1.03ms
[I 11:33:42.932 NotebookApp] 302 POST /login?next=%2Ftree (10.102.10.118) 0.77ms
[D 11:33:42.938 NotebookApp] Using contents: services/contents
[D 11:33:42.953 NotebookApp] 200 GET /tree (10.102.10.118) 15.33ms
[D 11:33:42.995 NotebookApp] 304 GET /custom/custom.css (10.102.10.118) 0.79ms
[D 11:33:43.078 NotebookApp] 200 GET /static/tree/js/main.min.js?v=26c0ff61319c86280776dd7e281acc18 (10.102.10.118) 70.85ms
[D 11:33:43.342 NotebookApp] 200 GET /static/services/contents.js?v=20160502113328 (10.102.10.118) 0.75ms
[D 11:33:43.350 NotebookApp] 200 GET /custom/custom.js?v=20160502113328 (10.102.10.118) 0.67ms
[D 11:33:43.367 NotebookApp] 200 GET /api/config/tree?_=1462181632514 (10.102.10.118) 0.86ms
[D 11:33:43.368 NotebookApp] 200 GET /api/config/common?_=1462181632515 (10.102.10.118) 0.58ms
[D 11:33:43.376 NotebookApp] 200 GET /api/terminals?_=1462181632516 (10.102.10.118) 0.67ms
[D 11:33:43.380 NotebookApp] Native kernel (python2) available from /usr/local/lib/python2.7/dist-packages/ipykernel/resources
[D 11:33:43.380 NotebookApp] Native kernel (python2) available from /usr/local/lib/python2.7/dist-packages/ipykernel/resources
[D 11:33:43.381 NotebookApp] 200 GET /api/kernelspecs (10.102.10.118) 2.17ms
[D 11:33:43.383 NotebookApp] 200 GET /api/sessions?_=1462181632517 (10.102.10.118) 1.52ms
[D 11:33:43.385 NotebookApp] 200 GET /api/terminals?_=1462181632518 (10.102.10.118) 1.04ms
[D 11:33:43.387 NotebookApp] 200 GET /static/components/font-awesome/fonts/fontawesome-webfont.woff?v=4.2.0 (10.102.10.118) 0.90ms
[D 11:33:43.488 NotebookApp] 200 GET /api/contents?type=directory&_=1462181632519 (10.102.10.118) 4.50ms
[I 11:33:46.199 NotebookApp] Creating new notebook in
[D 11:33:46.200 NotebookApp] Saving /home/ludwig/Untitled2.ipynb
[D 11:33:46.213 NotebookApp] 201 POST /api/contents (10.102.10.118) 15.15ms
[D 11:33:46.263 NotebookApp] Using contents: services/contents
[D 11:33:46.285 NotebookApp] 200 GET /notebooks/Untitled2.ipynb?kernel_name=python2 (10.102.10.118) 22.54ms
[D 11:33:46.330 NotebookApp] 200 GET /static/components/MathJax/MathJax.js?config=TeX-AMS_HTML-full,Safe&delayStartupUntil=configured (10.102.10.118) 0.88ms
[D 11:33:46.331 NotebookApp] 200 GET /static/components/bootstrap-tour/build/css/bootstrap-tour.min.css?v=d0b3c2fce6056a2ddd5a4513762a94c4 (10.102.10.118) 0.48ms
[D 11:33:46.342 NotebookApp] 304 GET /custom/custom.css (10.102.10.118) 0.43ms
[D 11:33:46.343 NotebookApp] 200 GET /static/components/codemirror/lib/codemirror.css?v=549e7432c1e8e94d1a2e66d7be92a430 (10.102.10.118) 0.47ms
[D 11:33:46.344 NotebookApp] 200 GET /static/notebook/css/override.css?v=e6f18013b8771987812e992b38ec3318 (10.102.10.118) 0.47ms
[D 11:33:46.347 NotebookApp] 200 GET /static/components/text-encoding/lib/encoding.js?v=d5bb0fc9ffeff7d98a69bb83daa51052 (10.102.10.118) 0.69ms
[D 11:33:46.429 NotebookApp] 200 GET /static/components/MathJax/config/TeX-AMS_HTML-full.js?rev=2.5.3 (10.102.10.118) 11.26ms
[D 11:33:46.494 NotebookApp] 200 GET /static/notebook/js/main.min.js?v=40e10638fcf65fc1c057bff31d165e9d (10.102.10.118) 146.85ms
[D 11:33:46.532 NotebookApp] 200 GET /static/components/MathJax/config/Safe.js?rev=2.5.3 (10.102.10.118) 0.67ms
[D 11:33:46.764 NotebookApp] 200 GET /static/services/contents.js?v=20160502113328 (10.102.10.118) 0.66ms
[D 11:33:46.775 NotebookApp] 200 GET /custom/custom.js?v=20160502113328 (10.102.10.118) 0.64ms
[D 11:33:46.785 NotebookApp] 200 GET /api/config/notebook?_=1462181636003 (10.102.10.118) 0.61ms
[D 11:33:46.787 NotebookApp] 200 GET /api/config/common?_=1462181636004 (10.102.10.118) 0.53ms
[D 11:33:46.880 NotebookApp] Native kernel (python2) available from /usr/local/lib/python2.7/dist-packages/ipykernel/resources
[D 11:33:46.880 NotebookApp] Native kernel (python2) available from /usr/local/lib/python2.7/dist-packages/ipykernel/resources
[D 11:33:46.881 NotebookApp] 200 GET /api/kernelspecs (10.102.10.118) 1.59ms
[D 11:33:46.924 NotebookApp] 200 GET /api/contents/Untitled2.ipynb?type=notebook&_=1462181636005 (10.102.10.118) 10.90ms
[D 11:33:46.936 NotebookApp] 200 GET /nbextensions/widgets/notebook/js/extension.js?v=20160502113328 (10.102.10.118) 1.99ms
[D 11:33:46.938 NotebookApp] 200 GET /static/components/MathJax/jax/output/HTML-CSS/fonts/STIX-Web/fontdata.js?rev=2.5.3 (10.102.10.118) 1.32ms
[D 11:33:47.088 NotebookApp] Native kernel (python2) available from /usr/local/lib/python2.7/dist-packages/ipykernel/resources
[D 11:33:47.089 NotebookApp] Starting kernel: ['/usr/bin/python', '-m', 'ipykernel', '-f', u'/run/user/1002/jupyter/kernel-4f91c82c-06be-4f0c-ac94-b2a0cf5269e0.json']
[D 11:33:47.092 NotebookApp] Connecting to: tcp://127.0.0.1:49909
[I 11:33:47.093 NotebookApp] Kernel started: 4f91c82c-06be-4f0c-ac94-b2a0cf5269e0
[D 11:33:47.093 NotebookApp] Kernel args: {'kernel_name': u'python2', 'cwd': u'/home/ludwig'}
[D 11:33:47.094 NotebookApp] 201 POST /api/sessions (10.102.10.118) 17.39ms
[D 11:33:47.095 NotebookApp] Native kernel (python2) available from /usr/local/lib/python2.7/dist-packages/ipykernel/resources
[D 11:33:47.096 NotebookApp] Serving kernel resource from: /usr/local/lib/python2.7/dist-packages/ipykernel/resources
[D 11:33:47.096 NotebookApp] 200 GET /kernelspecs/python2/logo-64x64.png (10.102.10.118) 1.90ms
[D 11:33:47.097 NotebookApp] 200 GET /api/contents/Untitled2.ipynb/checkpoints?_=1462181636006 (10.102.10.118) 0.73ms
[D 11:33:47.098 NotebookApp] 200 GET /static/components/MathJax/extensions/Safe.js?rev=2.5.3 (10.102.10.118) 0.52ms
[D 11:33:47.114 NotebookApp] 200 GET /nbextensions/widgets/widgets/js/init.js?v=20160502113328 (10.102.10.118) 0.84ms
[D 11:33:47.115 NotebookApp] 200 GET /nbextensions/widgets/notebook/js/widgetarea.js?v=20160502113328 (10.102.10.118) 0.62ms
[D 11:33:47.184 NotebookApp] 200 GET /nbextensions/widgets/widgets/js/manager.js?v=20160502113328 (10.102.10.118) 0.94ms
[D 11:33:47.186 NotebookApp] 200 GET /nbextensions/widgets/widgets/js/widget_link.js?v=20160502113328 (10.102.10.118) 0.61ms
[D 11:33:47.187 NotebookApp] 200 GET /nbextensions/widgets/widgets/js/widget.js?v=20160502113328 (10.102.10.118) 0.70ms
[D 11:33:47.188 NotebookApp] 200 GET /nbextensions/widgets/widgets/js/widget_bool.js?v=20160502113328 (10.102.10.118) 0.57ms
[D 11:33:47.194 NotebookApp] 200 GET /nbextensions/widgets/widgets/js/widget_button.js?v=20160502113328 (10.102.10.118) 0.56ms
[D 11:33:47.195 NotebookApp] 200 GET /nbextensions/widgets/widgets/js/widget_box.js?v=20160502113328 (10.102.10.118) 0.52ms
[D 11:33:47.200 NotebookApp] 200 GET /nbextensions/widgets/widgets/js/widget_float.js?v=20160502113328 (10.102.10.118) 0.55ms
[D 11:33:47.201 NotebookApp] 200 GET /nbextensions/widgets/widgets/js/widget_image.js?v=20160502113328 (10.102.10.118) 0.57ms
[D 11:33:47.202 NotebookApp] 200 GET /nbextensions/widgets/widgets/js/widget_int.js?v=20160502113328 (10.102.10.118) 0.65ms
[D 11:33:47.203 NotebookApp] 200 GET /nbextensions/widgets/widgets/js/widget_color.js?v=20160502113328 (10.102.10.118) 0.56ms
[D 11:33:47.210 NotebookApp] 200 GET /nbextensions/widgets/widgets/js/widget_output.js?v=20160502113328 (10.102.10.118) 0.81ms
[D 11:33:47.212 NotebookApp] 200 GET /nbextensions/widgets/widgets/js/widget_selection.js?v=20160502113328 (10.102.10.118) 0.76ms
[D 11:33:47.219 NotebookApp] 200 GET /nbextensions/widgets/widgets/js/widget_selectioncontainer.js?v=20160502113328 (10.102.10.118) 0.55ms
[D 11:33:47.220 NotebookApp] 200 GET /nbextensions/widgets/widgets/js/widget_string.js?v=20160502113328 (10.102.10.118) 0.55ms
[D 11:33:47.259 NotebookApp] Initializing websocket connection /api/kernels/4f91c82c-06be-4f0c-ac94-b2a0cf5269e0/channels
[D 11:33:47.261 NotebookApp] Requesting kernel info from 4f91c82c-06be-4f0c-ac94-b2a0cf5269e0
[D 11:33:47.261 NotebookApp] Connecting to: tcp://127.0.0.1:55535
[D 11:33:47.263 NotebookApp] 200 GET /static/components/backbone/backbone-min.js?v=20160502113328 (10.102.10.118) 0.64ms
[D 11:33:47.419 NotebookApp] Received kernel info: {u'language_info': {u'mimetype': u'text/x-python', u'nbconvert_exporter': u'python', u'name': u'python', u'pygments_lexer': u'ipython2', u'version': u'2.7.6', u'file_extension': u'.py', u'codemirror_mode': {u'version': 2, u'name': u'ipython'}}, u'implementation': u'ipython', u'implementation_version': u'4.0.0', u'protocol_version': u'5.0', u'banner': u'Python 2.7.6 (default, Jun 22 2015, 17:58:13) \nType "copyright", "credits" or "license" for more information.\n\nIPython 4.0.0 -- An enhanced Interactive Python.\n?         -> Introduction and overview of IPython\'s features.\n%quickref -> Quick reference.\nhelp      -> Python\'s own help system.\nobject?   -> Details about \'object\', use \'object??\' for extra details.\n%guiref   -> A brief reference about the graphical user interface.\n', u'help_links': [{u'url': u'http://docs.python.org/2.7', u'text': u'Python'}, {u'url': u'http://ipython.org/documentation.html', u'text': u'IPython'}, {u'url': u'http://docs.scipy.org/doc/numpy/reference/', u'text': u'NumPy'}, {u'url': u'http://docs.scipy.org/doc/scipy/reference/', u'text': u'SciPy'}, {u'url': u'http://matplotlib.org/contents.html', u'text': u'Matplotlib'}, {u'url': u'http://docs.sympy.org/latest/index.html', u'text': u'SymPy'}, {u'url': u'http://pandas.pydata.org/pandas-docs/stable/', u'text': u'pandas'}]}
[D 11:33:47.419 NotebookApp] Opening websocket /api/kernels/4f91c82c-06be-4f0c-ac94-b2a0cf5269e0/channels
[D 11:33:47.420 NotebookApp] Connecting to: tcp://127.0.0.1:55535
[D 11:33:47.420 NotebookApp] Connecting to: tcp://127.0.0.1:37252
[D 11:33:47.420 NotebookApp] Connecting to: tcp://127.0.0.1:48695
[D 11:33:47.504 NotebookApp] 200 GET /nbextensions/widgets/widgets/js/widget_controller.js?v=20160502113328 (10.102.10.118) 1.60ms
[D 11:33:47.514 NotebookApp] 200 GET /nbextensions/widgets/widgets/css/widgets.min.css (10.102.10.118) 0.69ms

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Reactions: 27
  • Comments: 41 (12 by maintainers)

Most upvoted comments

This is probably due to this bug with the uBlock extension blocking WebSockets: https://github.com/gorhill/uBlock/issues/1604

To solve the issue, I just re-started Chrome

Updating Jupyter Notebook, resolved the issue for me. But don’t update it using Anaconda Navigator interface. Do it like this pip install -U jupyter

I disabled the adblock extension in Chrome and that fixed the problem for me

@RobbieClarken: thx, deactivating uBlock (1.7.0) resolved it for me

Tried restarting Docker container, no go! Restarting firefox fixed the issue!

I understand this is an old issue, had this for last two days, and restarting chrome resolved it.

FWIW even firefox with no adblock whatsoever did not resolve the issue for me.

I just Quit chrome & re-launched, the issue got solved. It probably arises if you force-quit the browser, or restarted your laptop(in my case, Macbook pro).

@rocreguant I think you may have a configuration issue on your system. Firefox is working for me using Python and R with Firefox 52.0.2 (64-bit) and Sierra 10.12.4 using Notebook 5.0.0 (which was released a few days ago). I’ve just tried it with a conda install and a pip install.

Perhaps good next steps would be:

  1. Check jupyter notebook version installed: jupyter notebook --version
  2. Upgrade notebook to 5.0.0.
  3. Post output of jupyter notebook troubleshoot
  4. Run notebook server in debug mode jupyter notebook --debug

Upgrading to Notebook 5.7.5 should resolve the issue. https://github.com/jupyter/notebook/issues/2664#issuecomment-471000029

Confirm this issue on Chrome (51.0.2704.103) but not Safari

Thanks for the detective work @RobbieClarken 😃

When I had the issue I realised that I started the Jupyter session in different conda environment and opened the notebook in entirely different conda environment kernel

I just had this issue, and neither the browser changing helped me nor blocking any extension. I had to completely uninstall anaconda and re-install it. Now it’s working completely fine.

I’m going to close this as it appears to be a browser/environment-related issue. We can re-open if it appears to be notebook-related in the future.

Can confirm 1.7.2 fixes this issue.

uBlock 1.7.2 fixes the issue for me.

Was Chrome just updated? Another Chrome user reported something similar at almost exactly the same time, #1414.