- Más nuevo
- Más votos
- Más comentarios
he 504 error you are seeing is a response from CloudFront indicating that it is unable to establish a connection with the origin server (your Fargate service). This could be due to a number of reasons, such as network issues, configuration issues, or problems with the origin server itself.
Have you tried bypassing CloudFront and accessing the Load Balancer origin directly to see if you get the same errors?
Intermittent errors like this when ELB is involved can be due to a misconfiguration where the Load Balancer is working OK for one AZ but not another.
i tried accessing the service using load balancer dns name but its not worksin. these are my load balancer logs . where i have tried hitting the service 4 times http 2023-03-21T06:17:33.808900Z app/sso-proxy-production-balancer/f16467361ac30436 193.32.162.159:57588 10.0.1.67:8080 0.001 0.001 0.000 400 400 424 135 "GET http://34.248.193.73:80/ HTTP/1.1" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.85 Safari/537.36 Edg/90.0.818.46" - - arn:aws:elasticloadbalancing:eu-west-1:860517934442:targetgroup/sso-prod-fargate-target-group/ebf4fbd0071d1c66 "Root=1-64194bfd-3e38abbe06283f9c3318fe5f" "-" "-" 0 2023-03-21T06:17:33.807000Z "forward" "-" "-" "10.0.1.67:8080" "400" "-" "-" http 2023-03-21T06:17:47.114735Z app/sso-proxy-production-balancer/f16467361ac30436 130.176.120.112:36376 10.0.1.67:8080 0.001 0.560 0.000 200 200 1322 7795 "POST http://developer.topcon.com:80/token HTTP/1.1" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36" - - arn:aws:elasticloadbalancing:eu-west-1:860517934442:targetgroup/sso-prod-fargate-target-group/ebf4fbd0071d1c66 "Root=1-64194c0a-2082f5f25c8d6986051c8534" "-" "-" 0 2023-03-21T06:17:46.552000Z "forward" "-" "-" "10.0.1.67:8080" "200" "-" "-"
http 2023-03-21T06:18:07.452896Z app/sso-proxy-production-balancer/f16467361ac30436 130.176.120.112:57426 10.0.1.67:8080 0.001 0.518 0.000 200 200 1322 7795 "POST http://developer.topcon.com:80/
it is showing that whenever there is a get request , the error comes and whenever there is a post request , everything is fine , also when get request is made , it is going to the loadbalancer ip address but when post request is made it is going through cloud front domain name , how to make sure that the request is always post request and it moves only through cloud front and should not move through the load balancer directly ?
Contenido relevante
- OFICIAL DE AWSActualizada hace 4 meses
- OFICIAL DE AWSActualizada hace 3 años
but how is it possible that sometimes the service isrunning perfectly fine but sometimes its causing this failure , when i am inspecting the service its throwing x-cache :error from cloudfront in the response header and when the service is working fine its giving x-cache :miss from cloudfront
:this is the reuest response when the service is failing. Request URL:"deleted this for safety purpse" Request Method: POST Status Code: 504 Remote Address: 65.9.86.120:443 Referrer Policy: strict-origin-when-cross-origin content-length: 1033 content-type: text/html date: Wed, 22 Mar 2023 07:07:23 GMT server: CloudFront via: 1.1 362b298821815168614ba932732916ea.cloudfront.net (CloudFront) x-amz-cf-id: vN_h814PGsvIxJ4VsPAAqJq6xRKM-MJgb12xPd6KgMo3pcizRVGFAQ== x-amz-cf-pop: AMS1-C1 x-cache: Error from cloudfront :authority: developer.topcon.com :method: POST :path: /token :scheme: https accept: application/json, text/plain, / accept-encoding: gzip, deflate, br accept-language: en-GB,en-US;q=0.9,en;q=0.8 content-length: 242 content-type: application/json cookie: _ga=GA1.2.1149624007.1678885681; _gid=GA1.2.1996509926.1679302347; _gat_gtag_UA_169885348_1=1 origin: https://developer.topcon.com referer: https://developer.topcon.com/en/ sec-ch-ua: "Google Chrome";v="111", "Not(A:Brand";v="8", "Chromium";v="111" sec-ch-ua-mobile: ?0 sec-ch-ua-platform: "Windows" sec-fetch-dest: empty sec-fetch-mode: cors sec-fetch-site: same-origin user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36
this is when the service is passing: Request URL: "" Request Method: POST Status Code: 200 Remote Address: 65.9.86.120:443 Referrer Policy: strict-origin-when-cross-origin cache-control: no-store
is it possible that can be related to cloud front cache handling or header problem ???