microsoft / ApplicationInsights-node.js

Microsoft Application Insights SDK for Node.js
MIT License
325 stars 140 forks source link

Connection timeout even with proxy set #468

Closed ThomZz closed 5 years ago

ThomZz commented 5 years ago

Hello,

I've got connection issue with the client, even if i set the proxy correctly this._client.config.proxyHttpUrl= "http://proxyadress:port";

It seems to happen randomly. Sometimes, data is correctly ingested, but most of the time, it fails with :

ApplicationInsights:Sender [ 'Transient failure to reach ingestion endpoint. This batch of telemetry items will be retried. Error:',
  { Error: connect ETIMEDOUT 40.71.12.231:443
    at Object._errnoException (util.js:992:11)
    at _exceptionWithHostPort (util.js:1014:20)
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1186:14)
    code: 'ETIMEDOUT',
    errno: 'ETIMEDOUT',
    syscall: 'connect',
    address: '40.71.12.231',
    port: 443 } ]

I have also try specifying different "endpointUrl", based on https://docs.microsoft.com/en-us/azure/application-insights/app-insights-ip-addresses, but no luck...

Am i missing something ?

I am using application insights telemetry SDK in my asp.net core apis, and i've never encountered this problem.

OsvaldoRosado commented 5 years ago

@ThomZz do you have any logging from your proxy that might indicate whether or not it actually had connectivity issues reaching our ingestion endpoint?

As for .NET Core vs Node with regard to this, I believe this SDK is more verbose about connectivity errors where .NET SDK prefers to complain less - the actual behavior under the hood may still be the same. Do note that this isn't a permanent failure if eventually the message stops appearing. As the message notes the telemetry will be retried.

ThomZz commented 5 years ago

@OsvaldoRosado Problem seems to be related to the firewall, denying specifically https request for 40.71.12.231:443. I'll keep you in touch after further investigation.

ThomZz commented 5 years ago

Problem solved. This specific adress (40.71.12.231:443) was denied by the firewall. Thanks.