SWS
SWS

Reputation: 115

Cannot find Jupyter Notebook server on port 8888 (Windows 10)

I'm trying to run a Docker container as a Jupyter Notebook on Windows 10. As shown in the screen grab, the notebook appears to be running on localhost:8888, but my browsers (Chrome and Edge) return a 'connection refused' error. I've disabled my firewall (temporarily), but that didn't help. Also, netstat does not list the port as being in use. Any idea what's going on?

Screengrab showing Docker running

Upvotes: 3

Views: 2712

Answers (3)

Borhan Kazimipour
Borhan Kazimipour

Reputation: 445

TLDR make sure you mapped the ports using -p 8888:8888. If didn't work, try 192.168.99.100:8888 instead of localhost:8888.

Situation: I had a slightly different problem: Although I mapped the ports using -p 8888:8888, I still see the connection error when I try to reach localhost:8888 in all browsers. The firewall is checked and seems OK. It was very confusing because exactly same docker image works on my other Win 10 laptop at work.

Solution: I have two slightly different Win 10 on my laptops. The one that has connection difficulty runs a Win 10 Home whereas the other one has a Win 10 Professional. This means, the problematic laptop only runs Docker Tools not the conventional Docker CE. Therefore, it maps communicates with the OS using 192.168.99.100 IP not the usual 127.0.0.1 or localhost. So, instead of localhost:8888 just used 192.168.99.100:8888 and it worked.

Confession! I usually use my work laptop for running Jupyter on docker. Therefore, I did not pay enough attention to the welcome message of Docker Quickstart Terminal which clearly says docker is configured to use the default machine with IP 192.168.99.100. Hopefully, this post helps other too busy (aka careless!) people like me!


Since both laptops have very similar apps installed, I doubt anything rather than the Docker app itself causes the difference in IP addresses.

Upvotes: 2

javac
javac

Reputation: 3009

Try the following commands:

run these two command
pip install --upgrade pip
pip install --upgrade jupyter

Upvotes: 0

Farhad Farahi
Farhad Farahi

Reputation: 39497

Try the following:

docker run -p 8888:8888 -it simonwalkersamuel/bloch_tf:latest

-p 8888:8888 will map container port 8888 to host port 8888.

Upvotes: 4

Related Questions