Setup problems: AWS


#511

For some reason when I run “jupyter notebook” in my Instance and go to the correct URL for my instance and port, I get a “This site can’t be reached” error. Any help is appreciated.


(Zarak) #512

Hi @randy912,

Could you paste the output from the console from where you launched the notebook?


#513

[I 20:11:52.399 NotebookApp] [nb_conda_kernels] enabled, 2 kernels found
[W 20:11:52.762 NotebookApp] WARNING: The notebook server is listening on all IP addresses and not using encryption. This is not recommended.
[I 20:11:52.795 NotebookApp] ✓ nbpresent HTML export ENABLED
[W 20:11:52.795 NotebookApp] ✗ nbpresent PDF export DISABLED: No module named nbbrowserpdf.exporters.pdf
[I 20:11:52.798 NotebookApp] [nb_conda] enabled
[I 20:11:52.828 NotebookApp] [nb_anacondacloud] enabled
[I 20:11:52.830 NotebookApp] Serving notebooks from local directory: /home/ubuntu
[I 20:11:52.830 NotebookApp] 0 active kernels
[I 20:11:52.830 NotebookApp] The Jupyter Notebook is running at: http://[all ip addresses on your system]:8888/
[I 20:11:52.830 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).


(Zarak) #514

Do you see any messages here when you try to connect? Do you have any other notebooks running?


#518

No notebooks running, nothing in the JS console, just this


(Zarak) #519

Can you try getting the IP by running this in your terminal

aws ec2 describe-instances --filters "Name=instance-id,Values=$instanceId" --query "Reservations[0].Instances[0].PublicIpAddress"

then copy and paste it into your browser with :8888 appended.


#520

When I copy-paste and run that it says “None”, yet I can connect to my Instance just fine and run nvidia-smi, etc. I can also start jupyter notebook but it still doesn’t show up in the browser.


(Zarak) #521

Did you use the setup scripts to set up the instance? Could you run the following and paste the output here:

aws ec2 describe-instances


#522

Yes I did use the setup scripts. Here is the output:

RESERVATIONS 055774076093 r-0f9ee2f9a4590afb8
INSTANCES 0 x86_64 False xen ami-31ecfb26 i-04b2a4be83f1d8678 p2.xlarge aws-key-fast-ai 2017-04-27T17:08:03.000Z ip-10-0-0-13.ec2.internal 10.0.0.13 ec2-34-203-63-132.compute-1.amazonaws.com 34.203.63.132 /dev/sda1 ebs True subnet-25b7ee40 hvm vpc-bbbbacdd
BLOCKDEVICEMAPPINGS /dev/sda1
EBS 2017-04-22T18:32:07.000Z True attached vol-08876b0731ed74a90
MONITORING disabled
NETWORKINTERFACES 02:93:fc:ab:f2:0a eni-bd1566a9 055774076093 ip-10-0-0-13.ec2.internal 10.0.0.13 True in-use subnet-25b7ee40 vpc-bbbbacdd
ASSOCIATION 055774076093 ec2-34-203-63-132.compute-1.amazonaws.com 34.203.63.132
ATTACHMENT 2017-04-22T18:32:06.000Z eni-attach-ab977b33 True 0 attached
GROUPS sg-b65f60c9 fast-ai-security-group
PRIVATEIPADDRESSES True ip-10-0-0-13.ec2.internal 10.0.0.13
ASSOCIATION 055774076093 ec2-34-203-63-132.compute-1.amazonaws.com 34.203.63.132
PLACEMENT us-east-1a default
SECURITYGROUPS sg-b65f60c9 fast-ai-security-group
STATE 16 running
TAGS Name fast-ai-gpu-machine


(Zarak) #523

Hmm and it doesn’t work when you paste 34.203.63.132:8888 into your browser? I’ll try to do some digging and see what I find. Maybe in the meantime somebody else has some ideas.


#524

Goodness, gracious. I solved the problem. It was the network at my workplace. I signed onto the Guest network and now it works. Thank you so much for helping me with this, I seriously appreciate the fast replies man. You’re awesome.


(Rutger Ruizendaal) #525

Let me start by thanking the authors for this amazing course. Most of the issues that I ran into during the setup were related to the bash scripts throwing errors.

To really engage with the material I decided to blog along with the course. I would love to get in contact with more people from this forum whether it’s through this forum or through blogs. In this blog I also discuss all the issues I ran into and how I solved them:


(Sahil KARKHANIS) #526

I have a problem while running the script for setup_p2.sh, which says that "syntax error unexpected token “newline”. I thought this was due to the error mentioned by some users about the missing ’ at line 7, for which i forked the repo. But after rectifying that in aws-alias.sh I am still getting this error. Can anybody please help me with this


(david meisenzahl) #528

I seem to be missing another step. I downloaded the setup_instanche.sh script and continue to get

bash setup_p2.sh
setup_p2.sh: line 7: syntax error near unexpected token newline' setup_p2.sh: line 7:

I also ran the t2 sh file too,

bash setup_t2.sh
setup_t2.sh: line 7: syntax error near unexpected token newline' setup_t2.sh: line 7:

any suggests would be greatly appreciated


(Sahil KARKHANIS) #529

I am getting the same error David, I forked the script on github because of the error in aws-alias.sh but after running the forked script also I get the same error as you.


(Zarak) #530

Hi @sahilk1610 and @ozora999,

It would be helpful if you provided some more details - please see the wiki. Thanks!


(Sahil KARKHANIS) #531

I will explain again. :slight_smile:

For running the script setup_p2.sh. We need to run it from the fast.ai github repo. But as pointed out by others there is a small error in aws-alias.sh file with the missing ’ value in the 7th line.

To rectify it, I forked the script and rectified the error.

I am using bash.

So i use “curl -s link” for running the script. But I get the same error as mentioned by David in his problem -

setup_p2.sh: line 7: syntax error near unexpected token newline’
setup_p2.sh: line 7:’


(david meisenzahl) #532

To start, I was unable to run wget from my OS X terminal windows. I googled and downloaded home-brew. I could execute wget. I could not find setup_p2.sh on the page descriptor on Mr. Howard’s youtube video, www.platform.ai/files/. It informed me to visit the GitHub repository. As described in the youtube video, i copy the link on fastai/courses/setup/ of setup_p2.sh, went to my terminal window and typed

wget https://github.com/fastai/courses/blob/master/setup/setup_p2.sh

bash setup_p2.sh.3

! {i’ve done this more than once}

setup_p2.sh.3: line 7: syntax error near unexpected token newline' setup_p2.sh.3: line 7:

Next I did

wget https://github.com/fastai/courses/blob/master/setup/setup_t2.sh

bash setup_t2.sh.1

! {i’ve done this more than once}

setup_t2.sh.1: line 7: syntax error near unexpected token newline' setup_t2.sh.1: line 7:

wget https://github.com/fastai/courses/blob/master/setup/setup_instance.sh

bash setup_instance.sh.1

! {i’ve done this more than once}

setup_instance.sh.1: line 7: syntax error near unexpected token newline' setup_instance.sh.1: line 7:

There is something wrong with how bash from home-brew interprets the 7th line of this bash file?

I am completely new at this, i don’t know how to “fork the script”. I will google and see what I can learn.

“To rectify it, I forked the script and rectified the error.”


(Nazariy Vavryk) #533

Hi, I am running into the following problem upon running aws configure in cygwin: C:\MyProgs\Anaconda\python.exe: can't open file '/cygdrive/c/MyProgs/Anaconda/Scripts/aws': [Errno 2] No such file or directory… I have installed the awscli, and then I thought that I might need to install aws as well, since upon writing aws into the command line I was getting the same error just described. Even upon installing aws (which most likely is not necessary), I am still running into the same problem.

Thanks!


(Zarak) #534

@ozora999 @sahilk1610 Thanks for the details. Can you try if the solution here works? That is, use wget on the links to the raw setup files:

$ wget https://raw.githubusercontent.com/fastai/courses/master/setup/setup_p2.sh
$ wget https://raw.githubusercontent.com/fastai/courses/master/setup/setup_instance.sh