AWS re:Post을(를) 사용하면 다음에 동의하게 됩니다. AWS re:Post 이용 약관

Target.ResponseCodeMismatch Error on Application Load Balancer of WordPress Deployed in Elastic Beanstalk

0

The health of the environment is "Severe" and when I viewed the cause, this is the error "Process default has been unhealthy for 1 day (Target.ResponseCodeMismatch)". The health check path was already updated to "/wordpress/" in the Target Group of Load Balancing of EC2.

I checked the EC2 system status "System reachability check passed" and instance status "Instance reachability check passed" , the security group of LB allows any traffic. As far as I know the issue lies on this statement "The health checks did not return an expected HTTP code. Applies only to Application Load Balancers..." from this link: https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_TargetHealth.html

Any idea guys how to fix this? Thank you in advance.

profile picture
질문됨 일 년 전1.1천회 조회
2개 답변
1
수락된 답변

Hello.
Is the ALB health check successful?
Perhaps changing the "Matcher" range of the ALB health check to 200-399 might change the status.
My guess is that the HTTP status code is returned as 3xx due to redirects, etc. when accessing the "/wordpress/" health check.
https://docs.aws.amazon.com/elasticloadbalancing/latest/application/target-group-health-checks.html

profile picture
전문가
답변함 일 년 전
profile pictureAWS
전문가
검토됨 일 년 전
  • Amazing Riku! Another ingenious solution to the problem - The health is now "Ok". I set the Success codes to "200-399" and waited for 30 minutes and it went okay.

1

The error message "Target.ResponseCodeMismatch" indicates that the health check response from your target (in this case, your WordPress application) did not match the expected HTTP response code(s) configured in your Application Load Balancer's health check settings.

Here are some steps you can take to troubleshoot and resolve this issue:

  • Check the Health Check Configuration: Ensure that the health check path is correct and the expected status code is set properly. For a WordPress application, the health check path is typically set to the root ("/") or to a specific page that you know exists (like "/wp-admin"). The expected status code is usually "200".
  • Check the Application's Response: You can manually check the response code of your application by sending a request to the health check URL from the instance itself or another instance in the same VPC. You can do this using curl or another similar tool. For example: curl -I http://localhost/wordpress/. The response code should match the one expected by the health check.
  • Check the Security Group and Network ACLs: Ensure that your security group and network ACLs allow inbound traffic on the port your application is listening on (usually port 80 for HTTP or 443 for HTTPS).
  • Check the Application Logs: Check the logs of your WordPress application to see if there are any errors that could be causing the health check to fail.
  • Check the Load Balancer Logs: Enable access logs for your Application Load Balancer to get more information about the health check requests and responses.

If none of these steps resolve the issue, it might be a more specific issue with your WordPress configuration or your Elastic Beanstalk environment. In that case, you might need to dig deeper into the application logs.

profile picture
답변함 일 년 전
  • Thank you for these information. I'm now using cURL to troubleshoot other issues in my WordPress.

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

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

질문 답변하기에 대한 가이드라인

관련 콘텐츠