ApplicationInsights-node.js icon indicating copy to clipboard operation
ApplicationInsights-node.js copied to clipboard

Occasional ENOTFOUND error in ApplicationInsights:Sender

Open CSobol opened this issue 8 years ago • 6 comments

There is an issue in Node's dns.js which can cause an occasional getaddirinfo ENOTFOUND error when making HTTP requests if an option specifying whether to use IPv4 or IPv6 is not passed via the config object.

Adding family: to the object instantiated here with a value of either 4 or 6 (depending on your needs) would resolve the issue, and here is a discussion of the issue.

CSobol avatar Jun 02 '17 19:06 CSobol

This is unfortunate to have to hardcode, especially since the endpoint address is configurable. Do you know of any other workarounds?

OsvaldoRosado avatar Jun 02 '17 20:06 OsvaldoRosado

Agreed there...

I'm not intimately familiar with Node's dns lookup functionality, there doesn't seem to be a perfect solution. You could cache DNS info, which of course has its own issues, and would only lessen the frequency of the issue...

As long as you are doing any sort of DNS lookup, it has the potential to trigger this bug.

CSobol avatar Jun 06 '17 17:06 CSobol

Moving into Future (post 1.0), based on low report count. @OsvaldoRosado let me know if you think this should be in for stable? The only solution for this one right I can think of would be adding IPv4/V6 as optional setting to config.

AlexBulankou avatar Aug 16 '17 23:08 AlexBulankou

Future sounds right to me for this one. The other bugs are more critical. We will retry on this error regardless.

OsvaldoRosado avatar Aug 17 '17 00:08 OsvaldoRosado

Hi,

We are currently getting this error at start-up and are not able to get any data into Application Insights. Has any work been done? Do we have to default to ipv4 for now?

huey-tlatoani avatar Mar 06 '23 22:03 huey-tlatoani

@tenoriojuann issue was resolved in dns.js side according to the referenced issue, can you elaborate about your scenario?, is possible some firewall is blocking the telemetry request, that is usually the case when this error is triggered

hectorhdzg avatar Mar 06 '23 23:03 hectorhdzg