rjurney / Agile_Data_Code_2

Code for Agile Data Science 2.0, O'Reilly 2017, Second Edition
http://bit.ly/agile_data_science
MIT License
456 stars 307 forks source link

Connection Refused #52

Closed johntekdek closed 6 years ago

johntekdek commented 7 years ago

Hi I get the following after running .ec2:

$ ./ec2.sh Logging operations to '/tmp/ec2.sh.log' ... tee: unknown option -- / Try 'tee --help' for more information. Welcome to Agile Data Science 2.0 :)

I will launch an r3.xlarge instance in the default VPC for you, using a key and security group we will create.

The utility 'jq' is required for this script to detect the hostname of your ec2 instance ... Detecting 'jq' ... 'jq' was detected ... Testing for security group 'agile_data_science' ... Security group 'agile_data_science' not present ... Creating security group 'agile_data_science' ... { "GroupId": "sg-539ac23a" }

Detecting external IP address ... ./ec2.sh: line 49: dig: command not found Authorizing port 22 to your external IP () in security group 'agile_data_science' ...

An error occurred (InvalidParameterValue) when calling the AuthorizeSecurityGroupIngress operation: CIDR block C:/Program Files/Git/32 is malformed

Testing for existence of keypair 'agile_data_science' and key 'agile_data_science.pem' ... Key pair 'agile_data_science' not found ... Generating keypair called 'agile_data_science' ... Changing permissions of 'agile_data_science.pem' to 0600 ...

Detecting the default region... The default region is 'eu-west-2' Determining the image ID to use according to region... The image for region 'eu-west-2' is '' ...

Initializing EBS optimized r3.xlarge EC2 instance in region 'eu-west-2' with security group 'agile_data_science', key name 'agile_data_science' and image id '' using the script 'aws/ec2_bootstrap.sh' usage: aws [options] [ ...] [parameters] To see help text, you can run:

aws help aws help aws help aws: error: argument --image-id: expected one argument Got reservation ID '' ...

Sleeping 10 seconds before inquiring to get the public hostname of the instance we just created ... ... Awake!

Using the reservation ID to get the public hostname ... The public hostname of the instance we just created is '' ... Writing hostname to '.ec2_hostname' ...

Now we will tag this ec2 instance and name it 'agile_data_science_ec2' ...

An error occurred (MissingParameter) when calling the CreateTags operation: The request must contain the parameter resourceIdSet

After a few minutes (for it to initialize), you may ssh to this machine via the command in red: ssh -i ./agile_data_science.pem ubuntu@ Note: only your IP of '' is authorized to connect to this machine.

NOTE: IT WILL TAKE SEVERAL MINUTES FOR THIS MACHINE TO INITIALIZE. PLEASE WAIT FIVE MINUTES BEFORE LOGGING IN.

Note: if you ssh to this machine after a few minutes and there is no software in $HOME, please wait a few minutes for the install to finish.

Once you ssh in, the exercise code is in the Agile_Data_Code_2 directory! Run all files from this directory, with the exception of the web applications, which you will run from ex. ch08/web

Note: after a few minutes, now you will need to run ./ec2_create_tunnel.sh to forward ports 5000 and 8888 on the ec2 instance to your local ports 5000 and 8888. This way you can run the example web applications on the ec2 instance and browse them at http://localhost:5000 and you can view Jupyter notebooks at http://localhost:8888 If you tire of the ssh tunnel port forwarding, you may end these connections by executing ./ec2_kill_tunnel.sh

kindly assist

rjurney commented 7 years ago

@johntekdek We don't support Windows. You will need a Linux VM.

johntekdek commented 7 years ago

Hi Do you mean a Linux on aws?

rjurney commented 6 years ago

@johntekdek johntekdek I don't know how to get the script to run on Windows, but looking at it now I see the issue.

It looks like 'eu-west-2' region is not in my map for images. I will fix this, give me a day or two!

rjurney commented 6 years ago

@johntekdek See https://github.com/rjurney/Agile_Data_Code_2/commit/aaec4f9b24572668bc0584cf5ee90bcf85a5fde8

Please try the EC2 scripts again and see if they work now.

rjurney commented 6 years ago

Closing for staleness.