Frankie Healy Posted January 3, 2022 Share Posted January 3, 2022 Hi, I'm having an issue with a specific API call retrieving invoices. The call in question is /sales_invoices. When querying this endpoint I'm receiving a timeout error, however this seems to be only a specific set of IPs which your cloudfront service is routing through and only with regards to this call. In my local environment the cloudfront IP is different and the call works fine. Below is some example call debugs: /sales_invoice (error call) * About to connect() to api.accounting.sage.com port 443 (#1) * Trying 52.222.138.28... * Connected to api.accounting.sage.com (52.222.138.28) port 443 (#1) * CAfile: /etc/pki/tls/certs/ca-bundle.crt CApath: none * SSL connection using TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 * Server certificate: * subject: CN=*.accounting.sage.com * start date: Jul 24 00:00:00 2021 GMT * expire date: Aug 22 23:59:59 2022 GMT * common name: *.accounting.sage.com * issuer: CN=Amazon,OU=Server CA 1B,O=Amazon,C=US > GET /v3.1/sales_invoices?show_payments_allocations=1&attributes=all&contact_id=274264db738b4xxxxxxxxxxx&items_per_page=25 HTTP/1.1 User-Agent: GuzzleHttp/6.2.1 curl/7.29.0 PHP/7.2.34 Host: api.accounting.sage.com authorization: Bearer eyJhbGciOiJSUzUxMiIxxxxxxxxxxxxxxxxx * Operation timed out after 6001 milliseconds with 0 out of -1 bytes received * Closing connection 1 GuzzleHttp\Exception\ConnectException with message 'cURL error 28: Operation timed out after 6001 milliseconds with 0 out of -1 bytes received (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)' /contacts/{id} (working call in the same environment) * Found bundle for host api.accounting.sage.com: 0x55fc15dc3620 * Re-using existing connection! (#6) with host api.accounting.sage.com * Connected to api.accounting.sage.com (52.222.138.81) port 443 (#6) > GET /v3.1/contacts/274264db7xxxxxxxxxxxxx?show_balance=1&nested_attributes=all HTTP/1.1 User-Agent: GuzzleHttp/6.2.1 curl/7.29.0 PHP/7.2.34 Host: api.accounting.sage.com authorization: Bearer eyJhbGciOiJSUzUxMiIsImtpZCI6xxxxxxxxxxxxxxxxxxxxxxxxxx < HTTP/1.1 200 OK < Content-Type: application/json < Content-Length: 4388 < Connection: keep-alive < Date: Mon, 03 Jan 2022 18:16:14 GMT < x-amzn-RequestId: 779447fc-3e6b-47e9-bc9a-ddd1bd6e6953 < x-runtime: 0.151521 < x-frame-options: SAMEORIGIN < x-amzn-Remapped-content-length: 1540 < x-protected-by: Sqreen < x-amzn-Remapped-connection: Close < x-request-id: a6ad9b08-4557-43e6-8285-cdec7b56fb1a < x-correlation-context: {} < x-amz-apigw-id: LYaJNEZBDoEFR7w= < status: 200 OK < cache-control: max-age=0, private, must-revalidate < vary: Accept-Encoding < x-amzn-Remapped-server: Apache < etag: W/"afe303fd8525320ac18518b52d6433f2" < x-business: 52067bc786a3607d35d74fea3f18f60a < x-server: sageone-uk-production-gac-api-445 (production), sageone-uk-production-modproxy-waf-102 < X-Amzn-Trace-Id: Root=1-61d33d6d-402c586356f0258f17a29d00;Sampled=0 < x-amzn-Remapped-date: Mon, 03 Jan 2022 18:16:14 GMT < X-Cache: Miss from cloudfront < Via: 1.1 4d0f1cf23ad7680cffcd37454ed8e57d.cloudfront.net (CloudFront) < X-Amz-Cf-Pop: AMS50-C1 < X-Amz-Cf-Id: 9csuxWKvadZ_nl_u8tBGjP_HAp3AOGzOCSlttCPC1skend2EuTN-Gw== < When I call this /sales_invoices endpoint locally the request is routed through 13.227.172.83 which works fine. Could you please provide some insight into the issue and if you can resolve it or is there something we need to change to resolve it. Thanks Frankie Link to comment Share on other sites More sharing options...
Steel, Mark Posted January 6, 2022 Share Posted January 6, 2022 Hi Frankie We're not aware of any issue at present that would invoke a timeout due to IP address routing in AWS CloudFront. The query parameters you are sending in the request could potentially be the issue and we may need to extend the timeout. If the request is sent without the query parameters and routed through 52.222.138.81 is the sales_invoices data returned without timing out? Could you also confirm if the request you made locally via 13.227.172.83 is the same request with the same parameters for the same business please. Once we've confirmed the above, we'll be able to investigate the matter further. Thanks Mark Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now