Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ec2 instance refuse to connect error #14

Open
Reine0017 opened this issue Jan 28, 2021 · 1 comment
Open

ec2 instance refuse to connect error #14

Reine0017 opened this issue Jan 28, 2021 · 1 comment

Comments

@Reine0017
Copy link

Hey sorry if this is a silly question but I've been struggling for quite a while and can't figure out the problem - any hints or help would be greatly appreciated! I've successfully created the code pipeline for automatic deployments (in that there are no errors, managed to get the

Successfully created/updated stack - awsbootstrap
[
    "http://ec2-18-141-142-6.ap-southeast-1.compute.amazonaws.com:8080"
]

message, checked my CloudFormation stacks and ec2 instance and saw create_complete, instance running etc. However, when I try to navigate to http://ec2-18-141-142-6.ap-southeast-1.compute.amazonaws.com:8080, I get a "This site can't be reached" error.

This site can’t be reached. ec2-18-141-142-6.ap-southeast-1.compute.amazonaws.com refused to connect.

Similarly, running curl http://ec2-18-141-142-6.ap-southeast-1.compute.amazonaws.com:8080 in my terminal returns:

curl: (7) Failed to connect to ec2-18-141-142-6.ap-southeast-1.compute.amazonaws.com port 8080: Connection refused

May I ask how to solve this?

I've tried googling and one of the links said that I should troubleshoot by logging in the instance over ssh with my my_key.pem but I'm not sure I have that?

@kchristidis
Copy link

@Reine0017: I suspect I know what is going on here.

Your CloudFormation template is probably wget-ing https://github.com/good-parts/aws-bootstrap/archive/master.zip instead of the latest master in your own aws-bootstrap repo.

Note that by the end of of the "Infrastructure as Code" chapter, the server.js file in your master should look like this.

If instead, you are referencing the master from the good-parts/aws-bootstrap, it looks like this and we still haven't done the necessary setup for serving HTTPS traffic.

Hope that helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants