jupyter notebook keeps CONNECTING TO KERNEL

Question:

The Jupyter notebook keeps saying Connecting to kernel, which never reaches finally popping an error,

A connection to the notebook server could not be established. The notebook will continue
trying to reconnect. Check your network connection or notebook server
configuration.

So the asterisk on the command line stays forever.

The strange part is, iPython on terminal works FINE.

Here are what I tried:

  1. Change the browser from Chrome to Firefox
  2. Change port number into something else than ‘8888’
  3. Uninstalled the Jupyter and re-installed it

Anybody with similar issues?

Asked By: Soo Jeong

||

Answers:

I had a similar issue. It was caused by the tornado-package and I had to downgrade it.

sudo pip3 uninstall tornado
sudo pip3 install tornado==5.1.1

See Jupyter notebook: No connection to server because websocket connection fails

Answered By: Andreas Buchberger

I have found this same issue, and identified it only happens with Chrome standard browser. Incognito Chrome or Firefox does not have the same issue of ipykernel not connecting.

For now I open jupyter in firefox using the following command from Terminal:

jupyter lab --browser Firefox

Not sure what the difference is with the browsers, but recently I have had an issue of not being able to access local files from chrome, so will look into this issue and see if that resolves it for Chrome standard browser.

Answered By: Nelson da Silva
Categories: questions Tags: ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.