Jupyter Notebook doesn't launch in browser-site can't be reached


(Gaurav Desai) #1

Hi,

I have followed the steps to setup AWS instance and I am connecting using Putty -IP and Port 22.

Now I am able to connect to EC2 instance, update fastai using git pull and do a conda env update.

After I launch the Jupyter notebook , I get the link with token, but when I copy the link to browser it says -

This site can’t be reached

localhost refused to connect.
Search Google for localhost 8889
ERR_CONNECTION_REFUSED


(Ramesh Sampath) #2

As you can see from the message, there’s already a Jupyter Notebook running in Port 8888, hence a new Notebook instance is started in 8889. I suspect you are tunneling port 8888 and not 8889 in your ssh syntax (please share your ssh syntax here to verify). Make sure you are tunneling port similar to -
ssh -i <pem key> ubuntu@<ec2...> -L 8888:localhost:8888

Type - jupyter notebook list on your AWS terminal. This should show you that notebook running in 8888. If that doesn’t resolve it, restart your AWS machine and see if that fixes it (meaning kills the process that’s holding port 8888 in AWS - which most likely is another jupyter notebook).


(Gaurav Desai) #3

Hey Ramesh,

Thanks for the reply.

I am connecting via Putty , so not running any tunneling command as such.

Can I do tunneling via putty to 8888?


(Ramesh Sampath) #4

I don’t use putty, But a quick google search found this link that suggests that you need to select “Tunnels” tab inside the SSH section and specify there - http://realprogrammers.com/how_to/set_up_an_ssh_tunnel_with_putty.html

If that doesn’t help resolve the issue, please re-post here and I am sure other who use putty can help.


(Jeremy Howard) #5

Yup I’ve used putty in that way - works fine for me.


(Gaurav Desai) #6

Thanks Ramesh and Jeremy

I am able to launch Jupyter notebook now.


(Sugianto Lauw) #7

Hi @jeremy & @ramesh ,

I am having the same issue and was following the link.

In the “Tunnels” tab, within destination, do I put the EC2 instance public ip and the port?

Eg: 34.231.142.182:8888

Let me know.