Skip to content
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

A connection to the notebook server could not be established. The notebook will continue trying to reconnect, but until it does, you will NOT be able to run code. Check your network connection or notebook server configuration. #199

Closed
krautt opened this issue May 5, 2016 · 23 comments

Comments

@krautt
Copy link

@krautt krautt commented May 5, 2016

Hi all, I'm receiving the following error:

"A connection to the notebook server could not be established. The notebook will continue trying to reconnect, but until it does, you will NOT be able to run code. Check your network connection or notebook server configuration"
when i start docker with -e USE_HTTPS=yes:

sudo docker run -d -p 8888:8888 -v /home/myaccount/work:/home/jovyan/work -e PASSWORD='password' -e USE_HTTPS=yes jupyter/datascience-notebook start-notebook.sh

BUT... if i start it without -e USE_HTTPS=yes, then it works just fine:

sudo docker run -d -p 8888:8888 -v /home/myaccount/work:/home/jovyan/work -e PASSWORD='password' jupyter/datascience-notebook start-notebook.sh

I work for a security team so i sort of have to use HTTPS to encrypt that password else i'll be tormented:)

@parente

This comment has been minimized.

Copy link
Member

@parente parente commented May 5, 2016

Are you using Safari by chance?

@krautt

This comment has been minimized.

Copy link
Author

@krautt krautt commented May 5, 2016

chrome on windows 7. Also tried Firefox with same effect.

On Thu, May 5, 2016 at 1:25 PM, Peter Parente notifications@github.com
wrote:

Are you using Safari by chance?


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#199 (comment)

@parente

This comment has been minimized.

Copy link
Member

@parente parente commented May 5, 2016

Interesting. I've seen this happen with Safari. It refuses to connect a websocket to a backend when you're using self-signed certs. I've never seen it with Chrome or FF, but maybe that's changed recently ...

Looks like you pulled whatever the latest was of the image. Can you paste the Docker image ID for me(though we haven't touched anything related to the SSL in ages).

@krautt

This comment has been minimized.

Copy link
Author

@krautt krautt commented May 5, 2016

REPOSITORY TAG IMAGE ID
CREATED SIZE
ubuntu latest c5f1cf30c96b 47
hours ago 120.7 MB
jupyter/datascience-notebook latest 137a50334d59 3
weeks ago 4.934 GB

On Thu, May 5, 2016 at 4:13 PM, Peter Parente notifications@github.com
wrote:

Interesting. I've seen this happen with Safari. It refuses to connect a
websocket to a backend when you're using self-signed certs. I've never seen
it with Chrome or FF, but maybe that's changed recently ...

Looks like you pulled whatever the latest was of the image. Can you paste
the Docker image ID for me(though we haven't touched anything related to
the SSL in ages).


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#199 (comment)

@parente

This comment has been minimized.

Copy link
Member

@parente parente commented May 6, 2016

Your image isn't that old.

I gave the latest a shot with your run command with no problems, but without the host mount (which I don't have).

I've had issues in the past with permissions on host mounts causing notebook errors that don't really reflect the underlying problem. The user in the container has UID 1000 by default. Does that UID have access on the host directory you're mounting?

@krautt

This comment has been minimized.

Copy link
Author

@krautt krautt commented May 6, 2016

It was giving me permission issues so i have since included the following
in the docker run statement:

--user=root -e NB_UID=8858

On Thu, May 5, 2016 at 8:25 PM, Peter Parente notifications@github.com
wrote:

Your image isn't that old.

I gave the latest a shot with your run command with no problems, but
without the host mount (which I don't have).

I've had issues in the past with permissions on host mounts causing
notebook errors that don't really reflect the underlying problem. The user
in the container has UID 1000 by default. Does that UID have access on the
host directory you're mounting?


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#199 (comment)

@parente

This comment has been minimized.

Copy link
Member

@parente parente commented May 11, 2016

So switching to UID 8858 fixed the problem, where 8858 is the ID of a user on your host system that has access to the /home/myaccount/work folder?

@krautt

This comment has been minimized.

Copy link
Author

@krautt krautt commented May 11, 2016

correct.

On Tue, May 10, 2016 at 11:38 PM, Peter Parente notifications@github.com
wrote:

So switching to UID 8858 fixed the problem, where 8858 is the ID of a user
on your host system that has access to the /home/myaccount/work folder?


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#199 (comment)

@parente

This comment has been minimized.

Copy link
Member

@parente parente commented May 11, 2016

Glad to hear it. 👍

I've added a note to the recipes page linking permission and connection errors to host mount permissions.

https://github.com/jupyter/docker-stacks/wiki/Docker-recipes#host-volume-mounts-and-notebook-errors

@parente parente closed this May 11, 2016
@bright1993ff66

This comment has been minimized.

Copy link

@bright1993ff66 bright1993ff66 commented Jul 1, 2017

I have the same problem! This problem appeared when I used Google chrome. However, if I changed the default browser from Google to Microsoft Edge, this problem disappeared and everything was OK. I am confused.....So is it browser's fault?

@brntsllvn

This comment has been minimized.

Copy link

@brntsllvn brntsllvn commented Feb 23, 2018

confirmed...Chrome curiously cannot connect. Edge works fine.

@dd-w dd-w referenced this issue Jun 9, 2018
@JasmineHao JasmineHao referenced this issue Aug 17, 2018
5 of 5 tasks complete
@VijaySaiProfessional

This comment has been minimized.

Copy link

@VijaySaiProfessional VijaySaiProfessional commented Dec 20, 2018

Hi everyone. I'm facing the same issue. I have edge and chrome browsers on my PC. So I tried running on both. I still keep getting the same error on both after running for around 10-12 hours. Could anyone suggest me a fix?

@kkingkill

This comment has been minimized.

Copy link

@kkingkill kkingkill commented Dec 24, 2018

Hi, everyone, I use Python 3.7, at first I use chrome and encounter the issue, and then I use safari, safari can work. But suddenly, I remember my chrome uses proxy, so I close the proxy of chrome, and chrome can also work fine, so you can check if your chrome use proxy by default.

@vikasavnish

This comment has been minimized.

Copy link

@vikasavnish vikasavnish commented Mar 9, 2019

I had the same problem . I have reinstall tornado server( downgrade from v6 to v5.1.1) and it get solved

I posted solution here

@mindej

This comment has been minimized.

Copy link

@mindej mindej commented Mar 14, 2019

@vibhutisawant Thank you very match it worked for me.
Jupyter right now do not work with tornado server version 6.0.1

@Aravinviju

This comment has been minimized.

Copy link

@Aravinviju Aravinviju commented May 3, 2019

I use jupyter in the GCP instance (ubuntu). It was perfectly working till yesterday with tornado==6.0.2. Suddenly today morning this error started showing up and I'm puzzled with it.
I have tried downgrading the tornado versions with all you accepted solutions above but non works for me.
Any help on this would be great!

Thanks
Arav

@mindej

This comment has been minimized.

Copy link

@mindej mindej commented May 3, 2019

@Aravinviju You have to downgrade to 5.x

@VijaySaiProfessional

This comment has been minimized.

Copy link

@VijaySaiProfessional VijaySaiProfessional commented May 3, 2019

@Aravinviju

This comment has been minimized.

Copy link

@Aravinviju Aravinviju commented May 7, 2019

@Aravinviju You have to downgrade to 5.x

Hi, I have already tried downgrading the version to 5.1.1, but it still gives me the same error.
I aslo tried reinstalling anaconda back again from the beginning but no joy!

Thanks
Arav

@jsr-hub

This comment has been minimized.

Copy link

@jsr-hub jsr-hub commented Jun 7, 2019

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.

@sunnykevin19

This comment has been minimized.

Copy link

@sunnykevin19 sunnykevin19 commented Jul 12, 2019

Facing the same problem: -
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 ??

@mancunian1792

This comment has been minimized.

Copy link

@mancunian1792 mancunian1792 commented Aug 27, 2019

@Aravinviju You have to downgrade to 5.x

Hi, I have already tried downgrading the version to 5.1.1, but it still gives me the same error.
I aslo tried reinstalling anaconda back again from the beginning but no joy!

Thanks
Arav

Can attest to this . Having same issues for the last few weeks .. Not sure what changed .. was working for a month before that .

@mancunian1792

This comment has been minimized.

Copy link

@mancunian1792 mancunian1792 commented Aug 28, 2019

@sunnykevin19 Did you upgrade to the recent docker update ? From windows ? I installed the docker 2.0 and and it is working with tornado 6 as well.

Solution: If you are on docker 2.1 (the latest one with the kubernetes update) downgrade it to the lower version and check

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
You can’t perform that action at this time.