Error while getting response from load balancer

0

I have deployed react application on Application load balancer and there are two ec2 instance in a target group,the issue is that the web page loads properly after multiple refresh or else gives blank screen because of the error "Uncaught SyntaxError: Unexpected token '<'". in the console and only loads the static index.html.

The application loads by directly accessing the instance without any error and even after multiple refreses. The issues get encountered in load balancer only. I have also tried changing the health check configuration but didn't worked and the checkups are also healthy. I also tried deploying the application with classic load balancer but issues were faced.

What might be the possible issue because it successfully responds sometimes and mostly reponds with errors?

  • The issue is most likely on the application side. Using Chrome developer tools, can you please capture the Request and Responses when the page loads and when you observe this error? This will help us better understand the issue.

demo
已提問 1 年前檢視次數 262 次
1 個回答
0

This error may be related to React application also. Would recommend to use your browser dev tools or any available React Developer Tools to debug the same. This will provide some insights where things are failing.

profile pictureAWS
專家
已回答 1 年前
  • There is no issue in the application i have checked and also it works fine by directly accessing the instance. The link for load balancer:http://projectbalancer-1437849666.ap-south-1.elb.amazonaws.com/ You can have a look,and let me know what is causing the load balancer to show this error. Inorder to access the page you have to refresh multiple times and i have also mentioned to which server it is accessing either 1 or 2

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南