Jupyter notebook: No connection to server because websocket connection fails

Don't downgrade tornado. Instead, force-reinstall jupyter.

pip3 install --force-reinstall --upgrade jupyter

Ref: https://github.com/jupyter/notebook/issues/4439


The problem was that there was an incompatibility between the packages tornado 6 and notebook 5.7.4. notebook was updated on March 6th 2019 in order to solve this issue. Right now, the best way to solve it is the following:

Using pip

$ pip install -U jupyter

Using pipenv

$ pipenv update jupyter

The Jupyter Notebook 5.7.5 update should resolve issues with tornado 6. See the tweeted announcement and github release tag by the Jupyter team.

As of 03-06-19, both the docs and conda distribution are pending changes. You may however update using pip.


From the docs, upgrade with:

> pip install notebook --upgrade

Verify version:

> pip --version

I had the same problem, and following this vvk2001github https://github.com/jupyter/notebook/issues/4399 fixed it for me.

Uninstall tornado 6 and reinstall tornado 5.

sudo pip3 uninstall tornado
sudo pip3 install tornado==5.1.1

@kaleo gave this answer as well to similar question from @Jason Nichols