azureauthenticationazure-web-app-serviceazure-api-managementtls1.3

Why am I getting ECONNRESET unless cancel and call Azure API Service (APIM) right after?


I have a certificate authenticated Azure App Service. This service is behind APIM which is doing the authentication. Since some days, this service now systematically returns ECONNRESET error, when I call it twice in a row. However, if I call it (ex. from Postman), then hit Cancel and Send again, it works. It keeps working until there is no more requests for about 1 minute, then same issue repeats. Things I checked:

Also I noticed in Postman that for the calls which succeed, the console shows a Network section with addresses and tls information (TLS version is v1/SSLv3 but protocol is TLSv3; reused = true and authorized = true).

Any idea what could be causing this?

EDIT
Strongly related (maybe duplicate?) of this:
Azure API Management (consumption tier): First request gives timeout and is not sent to backend service


Solution

  • After talking to MS support and installing Fiddler Classic as per their recommendation to capture traffic, I noticed issue disappeared whenever Fiddler was running and acting as a proxy.

    It turns out Fiddler Classic only support TLS version till 1.2 at the time of writing. I forced TLS 1.2 instead of 1.3 in Postman and it worked. APIM is currently rolling out 1.3 but this is not yet completely supported.

    Asking our customers to downgrade to 1.2 solved the issue in our case.