Setup problems: AWS


#401

This might be a trivial thing but I can’t seem to figure it out.

I always have to type aws.cmd in cygwin to do anything. I thought this would be an irrelevant issue but it’s getting really tedious trying to change all the scripts to compensate for this issue I have.

When I type in aws, I get this:
“C:\Anaconda\python.exe: can’t open file ‘/c/Anaconda/Scripts/aws’: [Errno 2] No such file or directory”

Only when I type in aws.cmd do I get this:
"usage: aws [options] [ …] [parameters]
To see help text, you can run:

aws help
aws help
aws help
aws.cmd: error: too few arguments
"


(Daniel Gordon) #402

In bash, when I run the command “bash setup_p2.sh” I get the following error and cannot set up my server…

I am unsure how to proceed.


(Zarak) #403

Hi @Dan195,

That’s strange. Can you let me know what you see when you type the following command in bash

whoami && ls -ld ~ ~/.ssh

(Zarak) #404

Hi @murmur,

I don’t have a windows setup at the moment to test this, but did you try any of the solutions offered here?

edit: I also just saw this solution on the fast.ai wiki-page.


(Daniel Gordon) #405

It’s saying “No such file or directory”.


(Zarak) #406

What does it say for ls -ld ~?

I’m wondering if it’s a permissions issue. It would help if you could copy and paste the output - on my Mac it looks like this

drwxr-xr-x+ 123 zarak  staff  4182 19 Mar 10:08 /Users/zarak

(Daniel Gordon) #407
bash-3.1$ ls -ld ~
ls: /home/Peter: No such file or directory

(Zarak) #408

Oh, I see, it seems that the user was created without a home directory. Try running this command

mkhomedir_helper Peter

You’ll probably also need to run aws configure to create your .aws subdirectory under your home directory.


(Daniel Gordon) #409

the “mkhomedir_helper” command cannot be found. Would it be a bad idea to create a “home” folder in "C:: and then cut “Peter” into that location?


(Zarak) #410

Sorry, I don’t know why I assumed you were on a Linux system. I’m afraid I’m not familiar with bash on Windows, though you can certainly try creating your home folder manually.


#411

When running setup_p2.sh I get the following error:

“An error occurred (VpcLimitExceeded) when calling the CreateVpc operation: The maximum number of VPCs has been reached.”

Not sure what exactly it means, but the only mention of VPC I could find is in Security Groups where I can see 5 groups - all of them with default Group Name (undeletable) - the other 5 I’ve deleted.

Could you please help.


#412

hi, Zarak
I am using mac and I just typed $pip install awscli and then $ aws.

and I saw,
-bash: aws: command not found

I don’t know why this line appeared.


#413

I solved the problem I posted above.
But, I have another problem :frowning:
when I typed ‘bash setup_p2.sh’

I saw,
ssh -i /Users/jeeyung/.ssh/aws-key-fast-ai.pem ubuntu@None

and there are no IDs, and URL.
I downloaded ‘setup_p2.sh’ through ‘$ wget https://raw.githubusercontent.com/fastai/courses/master/setup/setup_p2.sh’.

Thanks.


(Zarak) #414

Hi @kolobok,

A new VPC is created each time you run the script, and each user has a limit of 5 VPCs on AWS. Go to your console on AWS and delete the VPCs that have the fast-ai tag. See here for details.


(Zarak) #415

Hi @jeeyung,

Could you paste the full output after running the script?


#416

hi,

~ jeeyung$ bash setup_p2.sh
True

An error occurred (InstanceLimitExceeded) when calling the RunInstances operation: You have requested more instances (1) than your current instance limit of 0 allows for the specified instance type. Please visit http://aws.amazon.com/contact-us/ec2-request to request an adjustment to this limit.

An error occurred (MissingParameter) when calling the CreateTags operation: The request must contain the parameter resourceIdSet
Waiting for instance start…
usage: aws [options] [ …] [parameters]
To see help text, you can run:

aws help
aws help
aws help
aws: error: argument --instance-id: expected one argument

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

All done. Find all you need to connect in the fast-ai-commands.txt file and to remove the stack call fast-ai-remove.sh
Connect to your instance: ssh -i /Users/jeeyung/.ssh/aws-key-fast-ai.pem ubuntu@ec2-54-148-44-206.us-west-2.compute.amazonaws.com

There are no IDs.

if I typed ‘ssh -i /Users/jeeyung/.ssh/aws-key-fast-ai.pem ubuntu@ec2-54-148-44-206.us-west-2.compute.amazonaws.com’ like the video,

jeeyung$ ssh -i /Users/jeeyung/.ssh/aws-key-fast-ai.pem ubuntu@ec2-54-148-44-206.us-west-2.compute.amazonaws.com
The authenticity of host ‘ec2-54-148-44-206.us-west-2.compute.amazonaws.com (54.148.44.206)’ can’t be established.
ECDSA key fingerprint is SHA256:zNumjgG3xFFkZkUOSkj5EaepmFtOcWc2jpQmDc7CSXM.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added ‘ec2-54-148-44-206.us-west-2.compute.amazonaws.com,54.148.44.206’ (ECDSA) to the list of known hosts.
Enter passphrase for key ‘/Users/jeeyung/.ssh/aws-key-fast-ai.pem’:
Enter passphrase for key ‘/Users/jeeyung/.ssh/aws-key-fast-ai.pem’:
Enter passphrase for key ‘/Users/jeeyung/.ssh/aws-key-fast-ai.pem’:
Permission denied (publickey).

I don’t know passphrase.
please, let me know what wrong is.
Thanks


(Zarak) #417

Hi @jeeyung,

You shouldn’t need a passphrase. It seems that your service limit increase for a p2 instance hasn’t gone through yet (did you remember to request one?) In the meantime, you can try the script with a t2 instance.


#418

I requested a p2 instance.
When I try a t2 instance, it didn’t work either.

bash setup_t2.sh.2

An error occurred (VpcLimitExceeded) when calling the CreateVpc operation: The maximum number of VPCs has been reached.

An error occurred (MissingParameter) when calling the CreateTags operation: The request must contain the parameter resourceIdSet
usage: aws [options] [ …] [parameters]
To see help text, you can run:

aws help
aws help
aws help
aws: error: argument --vpc-id: expected one argument
usage: aws [options] [ …] [parameters]
To see help text, you can run:

aws help
aws help
aws help
aws: error: argument --vpc-id: expected one argument

An error occurred (InternetGatewayLimitExceeded) when calling the CreateInternetGateway operation: The maximum number of internet gateways has been reached.

An error occurred (MissingParameter) when calling the CreateTags operation: The request must contain the parameter resourceIdSet
usage: aws [options] [ …] [parameters]
To see help text, you can run:

aws help
aws help
aws help
aws: error: argument --internet-gateway-id: expected one argument
usage: aws [options] [ …] [parameters]
To see help text, you can run:

aws help
aws help
aws help
aws: error: argument --vpc-id: expected one argument

An error occurred (MissingParameter) when calling the CreateTags operation: The request must contain the parameter resourceIdSet
usage: aws [options] [ …] [parameters]
To see help text, you can run:

aws help
aws help
aws help
aws: error: argument --vpc-id: expected one argument

An error occurred (MissingParameter) when calling the CreateTags operation: The request must contain the parameter resourceIdSet
usage: aws [options] [ …] [parameters]
To see help text, you can run:

aws help
aws help
aws help
aws: error: argument --route-table-id: expected one argument
usage: aws [options] [ …] [parameters]
To see help text, you can run:

aws help
aws help
aws help
aws: error: argument --route-table-id: expected one argument
usage: aws [options] [ …] [parameters]
To see help text, you can run:

aws help
aws help
aws help
aws: error: argument --vpc-id: expected one argument
usage: aws [options] [ …] [parameters]
To see help text, you can run:

aws help
aws help
aws help
aws: error: argument --group-id: expected one argument
usage: aws [options] [ …] [parameters]
To see help text, you can run:

aws help
aws help
aws help
aws: error: argument --group-id: expected one argument
usage: aws [options] [ …] [parameters]
To see help text, you can run:

aws help
aws help
aws help
aws: error: argument --subnet-id: expected one argument

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

An error occurred (AddressLimitExceeded) when calling the AllocateAddress operation: The maximum number of addresses has been reached.
Waiting for instance start…
usage: aws [options] [ …] [parameters]
To see help text, you can run:

aws help
aws help
aws help
aws: error: argument --instance-id: expected one argument

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

All done. Find all you need to connect in the fast-ai-commands.txt file and to remove the stack call fast-ai-remove.sh
Connect to your instance: ssh -i /Users/jeeyung/.ssh/aws-key-fast-ai.pem ubuntu@ec2-54-148-44-206.us-west-2.compute.amazonaws.com


(Daniel Gordon) #419

I was able to setup my home directory, but I am still getting the same error. Is there a way that I can edit what’s going on underneath so it searches for C:\home\Peter\.ssh instead of \home\Peter\.ssh ? That’s the only reason I could see this still not working as I am looking at the file right here.


(Zarak) #420

Hi @Dan195,

The Ubuntu root directory file system is not shared with Windows. I think others who have used Windows have successfully used Cygwin to run the setup scripts. Perhaps you could try that approach? If you run into any problems there, you can probably get them resolved with a search in this forum/thread.