Installation

Can't connect to AMS instance after Launch

Can't connect to AMS instance after Launch

by Ken Luther -
Number of replies: 8

I feel like a dope coming here to ask a basic question like this, but here I am.  I don't know if it's an AWS question or a WebWork question, but here goes:

Last year I had a perfectly good instance of WebWork up and running on AWS.  I followed the instructions for getting it set up and it worked like a charm. 

Last week I noted we were up to version 2.18, so I terminated my original instance and went to install 2.18 from scratch. for more practice.  The instructions have not changed since the last version I installed and I went through the same process - from the US East Ohio region, I found and copied the WebWork 2.18 AMI, picked t3.small, set the default security group, selected a key pair, and installed the image successfully ... or so it seemed. 

Now that the instance is "running" per the AWS control panel, I cannot connect to it using either the EC2 Connect feature within AWS, or by trying to use SSH via MobaXTerm on my machine to sign on as ubuntu@the.new.ip.address (using the new address in place there).  The EC2 Connect feature will tell me I can't connect to the instance, but does not provide a specific reason why.  On a local use of SSH, I get timed out.   

Has anyone encountered this before?  I feel like I followed the directions, and I got it to work last year.  Any ideas as to the cause?  What dumb thing is this newbie doing?

My AWS instance profile

In reply to Ken Luther

Re: Can't connect to AMS instance after Launch

by Arnold Pizer -

Hi,

If you can not ssh into your instance,  there is probably a problem with your pem file.  Did you create a new one or are you using the old one? If you have two, are you using the correct one?  Even more elementary than that, make sure SSH connections are allowed (they are by default).  You should also allow http and https but they can be set up latter.

Arnie


In reply to Arnold Pizer

Re: Can't connect to AMS instance after Launch

by Ken Luther -
Thanks - I've done both. I've actually done the process a couple of times, setting a different pem file at launch. I used the older .pem file I used from my earlier successful instance, and I've done it again with creating a new one. Are the .pem files used when trying to connect to the instance from within the EC2 dashboard using the EC2 Instance Connect feature? (The little escape arrow labeled "Connect to Instance" in the dashboard.) I would hope that at least one of those two methods (ssh from local or connecting from within the dashboard itself) could diagnose that it's the pem file that's the issue :-/
In reply to Ken Luther

Re: Can't connect to AMS instance after Launch

by Arnold Pizer -

Not sure.  Maybe the easiest thing to at this point is to terminate the instance and start over being careful when you setup connections and security groups.

In reply to Arnold Pizer

Re: Can't connect to AMS instance after Launch

by Ken Luther -
Maybe third time's the charm?
In reply to Ken Luther

Re: Can't connect to AMS instance after Launch

by Arnold Pizer -
In reply to Arnold Pizer

Re: Can't connect to AMS instance after Launch

by Arnold Pizer -
Hi Ken,

I bet port 22 is not set up.

Select the instance in the Amazon EC2 management console
Go to the Security tab
Check the Inbound rules

If there is no rule for port 22, add one

Click on the "Security groups" link,

Edit inbound rules, Add Rule:
SSH, port 22, 0.0.0.0
Save Rules
In reply to Arnold Pizer

Re: Can't connect to AMS instance after Launch

by Ken Luther -

Thanks much.  I'm going to try this tomorrow.  I'm also going to record a video while I'm setting it up.  I'm getting pretty good at it, since I've been through it several times!  Then if it all works out well, with some final editing, there'll be a video example of the instance launch that can go on YouTube, and maybe that will help others who are learning from scratch like me. 

In reply to Arnold Pizer

Re: Can't connect to AMS instance after Launch

by Ken Luther -
So here I am 2 weeks later, after saying I'd try this "tomorrow" on the 14th! Life got crazy. I've launched the instance again being very careful with my rules in the security group, I do have 3 inbound rules (ssh, http, https), and I am able to access the instance by ssh. I'm now happily checking for and installing an update. I think what happened the last time is when I read the line in the instructions about "you can use the default security group or create a new one", I took "default" as "don't make any changes, just use it as-is" ... and I likely did not explicitly click to add rules for HTTP / SSH. My list of older security groups shows a default security group only one inbound rule. But now I have all 3, and so far, all is well. Thanks again for helping!