Score:0

AWS EC2 instance randomly refuses connections. Given the context below what could be causing this?

bd flag

Context:

The instance sits behind an Application Load Balancer.

The main and only route table for the VPC routes locally as well as to the Internet Gateway

The security group for the instance and Load Balancer allows all outbound traffic, and all necessary inbound traffic.

The ACL allows all inbound and outbound traffic.

My Load Balancer is associated with the subnet of my instance.

Problem :

I can ssh into my instance and code for a while but then it disconnects(sometimes it'll just take a second to reconnect but not always). When this happens and my server is still running on my instance I'll try to connect to my server. Sometimes I can and sometimes I can't. The instance isn't crashing, the CPU and Memory usage are normal, All health checks pass, and there's connectivity between the Internet Gateway and instance. It seems like the problem is with the instance because I started another in the same VPC and subnet and with the same security group and it's works fine. In short my instance seems picky about when it wants connections and when it doesn't and changes it's taste all the time.

Score:0
bd flag

The problem ended up being that my ACL was only allowing ipv4 traffic in. My guess is that it would work sometimes when my router was using ipv4 and wouldn’t when it switched to ipv6. Why it would switch at random I don’t know but it’s working now. If anyone could comment on why id appreciate it

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.