내용으로 건너뛰기

Removing Identical Security Group from ALB causes 504 errors

0

Hi,

I have an ALB which I'm trying to replace the security group with a security group with the same rules (for purposes of naming). Both security groups are attached to the ALB.

When I remove the old Security group, my application reports a number of 504 errors. Is this expected behaviour?

질문됨 일 년 전165회 조회

2개 답변
1
수락된 답변

Hello.

Please check the inbound rules of the security groups used by the ALB targets, such as EC2 or ECS.
This is just a guess, but I think that the older security group is allowed in the ALB target security group, but the newer security group is not.
If the inbound rules of a security group reference another security group, you must also change the referencing security group.
https://docs.aws.amazon.com/vpc/latest/userguide/security-group-rules.html#security-group-referencing

전문가

답변함 일 년 전

전문가

검토됨 일 년 전

  • This was it. The target group was set to accept traffic from the old SG but not the new one. Thank you!

0

The behavior you're experiencing, where removing a security group from an Application Load Balancer (ALB) causes 504 errors, is not typically expected if the new security group has identical rules to the old one. However, there are a few factors to consider:

  1. Propagation delay: When you make changes to security groups, there can be a brief delay as the changes propagate across the AWS network. During this time, you might experience some temporary connectivity issues.

  2. Connection draining: Existing connections may be affected when you change security groups, potentially leading to some requests timing out.

  3. Unintended differences: Double-check that the new security group truly has identical rules to the old one. Even small differences could cause connectivity issues.

  4. Backend issues: 504 Gateway Timeout errors often indicate that the ALB couldn't establish a connection with the backend targets. Ensure that your backend instances or services are healthy and responding properly.

To troubleshoot this issue:

  1. Verify that both security groups have identical rules.
  2. Check the health of your target instances or services.
  3. Monitor your ALB logs and metrics during the security group change.
  4. Consider making the change during a low-traffic period.
  5. If possible, add the new security group first, then remove the old one after a short delay to allow for propagation.

If the issue persists even with these precautions, it may be worth engaging AWS support to investigate further, as this behavior is not typical when swapping identical security groups.
Sources
ALB Security Group | AWS re:Post
Resolve HTTP connection errors with Application Load Balancer | AWS re:Post
Application Load Balancer 504 errors with weighted target group | AWS re:Post

답변함 일 년 전

전문가

검토됨 일 년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

관련 콘텐츠