Setup problems: AWS

Hi,

I am SSH-ed to an VM instance and I get this error when I try to run nvidia-smi:

“Failed To initialize NVML: Driver/Library version mismatch”

Any isea why that could be, and how to solve it?

Regards,
Elvar Helgason.

1 Like

I’m very sorry for the bother but can’t seem to find an answer for this issue, when I run the (i think new) setup script I get to the following before an error occurs.

$ bash setup_p2.sh
++ aws ec2 create-vpc --cidr-block 10.0.0.0/28 --query Vpc.VpcId --output text

  • export $‘vpcId=vpc-409c3027\r’
  • vpcId=$‘vpc-409c3027\r’
  • aws ec2 modify-vpc-attribute --vpc-id $‘vpc-409c3027\r’ --enable-dns-support ‘{“Value”:true}’
  • aws ec2 modify-vpc-attribute --vpc-id $‘vpc-409c3027\r’ --enable-dns-hostnames ‘{“Value”:true}’
    ++ aws ec2 create-internet-gateway --query InternetGateway.InternetGatewayId --output text
  • export $‘internetGatewayId=igw-825824e6\r’
  • internetGatewayId=$‘igw-825824e6\r’
  • aws ec2 attach-internet-gateway --internet-gateway-id $‘igw-825824e6\r’ --vpc-id $‘vpc-409c3027\r’
    ++ aws ec2 create-subnet --vpc-id $‘vpc-409c3027\r’ --cidr-block 10.0.0.0/28 --query Subnet.SubnetId --output text
  • export $‘subnetId=subnet-cddb3c84\r’
  • subnetId=$‘subnet-cddb3c84\r’
    ++ aws ec2 create-route-table --vpc-id $‘vpc-409c3027\r’ --query RouteTable.RouteTableId --output te xt
  • export $‘routeTableId=rtb-0fb1cf68\r’
  • routeTableId=$‘rtb-0fb1cf68\r’
  • aws ec2 associate-route-table --route-table-id $‘rtb-0fb1cf68\r’ --subnet-id $'subnet-cddb3c84\r’
    rtbassoc-9a02b9fc
  • aws ec2 create-route --route-table-id $‘rtb-0fb1cf68\r’ --destination-cidr-block 0.0.0.0/0 --gatew ay-id $‘igw-825824e6\r’

An error occurred (InvalidRouteTableId.Malformed) when calling the CreateRoute operation: Invalid id " "rtb-0fb1cf68

1 Like

@sam and @ElvarHelga, [edit] I had the same problem? All you need to do is go to your aws instance in the aws.console and reboot it by:

  1. select the instance
  2. click Actions -> Instance State -> Reboot
4 Likes

Ok. Thanks Dan. I did the same and it worked.

I have finished all the steps. But now, I get the following error,
Warning: Identity file /home/Sai not accessible: No such file or directory.
ssh: Could not resolve hostname kiran/.ssh/aws-key.pem: Name or service not known.

Will there be an issue if the user name has spaces?

Hi,

I’m facing an issue while setting up the t2_micro instance. I’m able to start the instance and also generate the IP. But I’m not able to connect to the IP using the following command:
“$ ssh -i /home/Aakash Laptop/.ssh/aws-key.pem ubuntu@ec2-35-166-221-165.us-west-2.compute.amazonaws.com

The following error is thrown up:
“Warning: Identity file /home/Aakash not accessible: No such file or directory.
ssh: Could not resolve hostname laptop/.ssh/aws-key.pem: Name or service not known”

PFB the screen shot of the error.

Please suggest a solution that would help me resolve the issue.

Regards,
Aakash

Hey Sam,

I was able to resolve the Failed to initialize NVML: Driver/library version mismatch by running sudo reboot and then checking nvidia-smi is running correcly

3 Likes

Dear all,

I am trying to configure my aws in cygwin. But typing this:

aws configure

Gives me the following error:

C:\Users\Marc\Anaconda3\python.exe: can't open file '/cygdrive/c/Users/Marc/Anaconda3/Scripts /aws': [Errno 2] No such file or directory

Any thoughts on where I go wrong?

I suspect the trailing space ("Scripts ") at the end of this path is the issue, though I’m not certain.

Ok, but how should I fix this?

I couldn’t tell you without more information, and I could be wrong – this is just my initial guess. Did you see the part in Lesson 1 about “How to ask questions” ?

No sorry, but what kind of extra information are you looking for? I followed the procedure for installing cygwin (according to this tutorial: http://course.fast.ai/lessons/aws.html) and downloaded the x64 version.

Do you have any more thoughts about where the root cause lies?

Not off the top of my head, I assume that the path may be coming from an environmental variable? I haven’t used Cygwin in a long time now, that’s just my suspicion. I would check to see how that path to the aws script is being expanded, and also verify that “c/Users/Marc/Anaconda3/Scripts/aws” exists.

Also, how exactly did you install AWS CLI ? With pip?

My request for p2instance is already increased to 1.
But I am unable to start the aws instance getting following error
Please help me to resolve this

root@VIJAY:/mnt/c/Windows/System32# sudo -i bash setup_p2.sh
rtbassoc-5ad7523c
True
setup_p2.sh: line 13: /root/.ssh/aws-key.pem: No such file or directory
chmod: cannot access ‘/root/.ssh/aws-key.pem’: No such file or directory

An error occurred (InvalidKeyPair.NotFound) when calling the RunInstances operation: The key pair ‘aws-key’ does not exist
Waiting for instance start…

Waiter InstanceRunning failed: Max attempts exceeded
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
securityGroupId=sg-6a08f412
subnetId=subnet-6f957326
instanceId=
instanceUrl=None
Connect: ssh -i /root/.ssh/aws-key.pem ubuntu@None

@WyoDan This worked for me, thank you :slight_smile:

I have followed all the steps as mentioned, I am getting the following error which I think is because of the ‘space’ in my username. Kindly advice.
$ ssh -i /home/Sai Kiran/.ssh/aws-key.pem ubuntu@ec2-35-166-210-213.us-west-2.compute.amazonaws.com
Warning: Identity file /home/Sai not accessible: No such file or directory.
ssh: Could not resolve hostname kiran/.ssh/aws-key.pem: Name or service not known

How should I correct it?

I am able to resolve this issue… my server is up and running
(InvalidKeyPair.NotFound) when calling the RunInstances operation: The key pair ‘aws-key’ does not exist
/.ssh/aws-key.pem file missing
I have created the folder .ssh with full permission and it worked
Here is the link I used which helped to solve this issue
http://wiki.fast.ai/index.php/AWS_install#Common_Problems

can you use
sudo ssh -i /home/Sai Kiran/.ssh/aws-key.pem ubuntu@ec2-35-166-210-213.us-west-2.compute.amazonaws.com

and see how it is behaving

I am facing the same issue. I think it is because of the space in the username (Linux doesn’t accept a space in the program path).
But, I’m not sure how to resolve it. One of the solutions that I found online is to rename the username altogether.

I am working on a windows machine so, sudo would not work!