ApplicationInsights-node.js
ApplicationInsights-node.js copied to clipboard
Occasional ENOTFOUND error in ApplicationInsights:Sender
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.
This is unfortunate to have to hardcode, especially since the endpoint address is configurable. Do you know of any other workarounds?
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.
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.
Future sounds right to me for this one. The other bugs are more critical. We will retry on this error regardless.
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?
@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