Application Insights : Unable to verify the first certificate in node js

空扰寡人 提交于 2020-01-16 18:12:59

问题


The application insights keeps on throwing the following error every few minutes.

ApplicationInsights:Sender [ 'Ingestion endpoint could not be reached 5 consecutive times. There may be resulting telemetry loss. Most recent error:', { Error: unable to verify the first certificate at TLSSocket.\u003canonymous\u003e (_tls_wrap.js:1116:38) at ZoneDelegate.invokeTask (/usr/src/app/node_modules/zone.js/dist/zone-node.js:275:35) at Zone.runTask (/usr/src/app/node_modules/zone.js/dist/zone-node.js:151:47) at TLSSocket.ZoneTask.invoke (/usr/src/app/node_modules/zone.js/dist/zone-node.js:345:33) at emitNone (events.js:106:13) at TLSSocket.emit (events.js:208:7) at TLSSocket._finishInit (_tls_wrap.js:643:8) at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:473:38) code: 'UNABLE_TO_VERIFY_LEAF_SIGNATURE' } ]

I reviewed the discussion GITHUB DISCUSSION and tried some proposed solution but it did not work.

Here is the code that I am using to connect to application insights.

let appInsights = require('applicationinsights');
appInsights.setup(config.APPINSIGHTS_KEY.trim())
  .setAutoDependencyCorrelation(true)
  .setAutoCollectRequests(true)
  .setAutoCollectPerformance(true)
  .setAutoCollectExceptions(true)
  .setAutoCollectDependencies(true)
  .setAutoCollectConsole(true)
  .setUseDiskRetryCaching(true)
  .start();

I am not 100% sure if there is any telemetry loss or not, but getting these errors all the time is annoying. Please help.


回答1:


I've updated the github discussion thread. A fix on the ingestion side is in the works.

https://github.com/Microsoft/ApplicationInsights-node.js/issues/180#issuecomment-475699485



来源:https://stackoverflow.com/questions/55264174/application-insights-unable-to-verify-the-first-certificate-in-node-js

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!