Velvet Star Monitor

Standout celebrity highlights with iconic style.

updates

HTTP Connection refused to AWS EC2 instance

Writer Olivia Zamora

I'm trying to make a login HTTP request from the frontend (Angular app) to AWS EC2 instance but it ends up with (ERR_CONNECTION_REFUSED) error.

This would be probably a security group policy issue (from the internet) but correct me if I'm wrong. It was working perfectly before and got this error in a few days. If anyone can help me solve this problem.

I tried to resolve this issue by configuring security group inbound rules with specific port number but port textbox will be disabled when I select HTTP request type. I added a snap of it. Kindly correct me if I'm wrong in detecting the problem so I can make a solution for it.

enter image description here

2

2 Answers

It can also be due to the service not listening on the port that you are trying to connect to or not started or present. May be if the server running on the AWS instance if listening (and serving) to localhost or 127.0.0.1 / interface can also ignore connections from outside in which case it should be ensured the service listens on the appropriate external address.

AWS also checks to detect abuse. If somehow, some unknown applications maliciously got inside your EC2 instances due to publicly open port and triggered some unknown/malicious traffic, then in that case also AWS can block/shutdown those ports.

3

Connection refused error means it passed the security group and reached the server, so its definitely not a security group issue

Usually, this is related to the web server is down, maybe due to server restart, or process crash.

try restarting your webserver and check again

2

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy