Wow, this works. Thanks a lot Diego.
I had this problem too and did some investigation.
If @dmenin 's port forwarding solution works, that can mean that even though your security group is set to listen on the right ports, jupyter isn’t. (That’s what it meant for me.)
I verified this by running
sudo netstat -nltp, which returned this:
$ sudo netstat -nltp Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1177/sshd tcp 0 0 127.0.0.1:8888 0.0.0.0:* LISTEN 1859/python
The first line is for ssh (port 22). The
0.0.0.0 means it listens for ssh on any IP. The second line is for port 8888, but there it only listens on its localhost IP,
If you want to dig further you can run
ifconfig and you will probably see two another IP. For me it’s 10.0.0.10, which must be somehow magically mapped back to my “elastic IP” from AWS.
OK so to solve it you make jupyter notebook listen on both its IPs. I used this stackoverflow solution, which says to: check for jupyter notebook configuration file, in ~/.jupyter/ . If it’s not there, run
jupyter notebook --generate-config. Then open the file in an editor and find the line to edit about IPs.
Then I realized that a better solution was to find the fast ai config file, which I found here (no guarantees that it’s up to date though):
Have the same problem, can’t connect to the jupyer notebook…
This worked for me as well! I had to figure out
<user@instance> were. For posterity,
<your_key> is the private key you created as part of a keypair to connect to AWS. You can follow this tutorial. In my case,
user@instance is the user and public IP address of your amazon AWS instance. In my case, this meant
email@example.com.***.***. Stars are for redaction.
In sum, my command was
ssh -i id_rsa firstname.lastname@example.org.***.***-L8888:localhost:8888. Hope this helps!