node.js - Application Insights:无法验证节点 js 中的第一个证书
问题描述
应用程序见解每隔几分钟就会不断抛出以下错误。
ApplicationInsights:Sender ['连续 5 次无法到达摄取端点。可能会导致遥测丢失。最近的错误:',{ 错误:无法验证 TLSSocket 的第一个证书。\u003canonymous\u003e (_tls_wrap.js:1116:38) 在 ZoneDelegate.invokeTask (/usr/src/app/node_modules/zone.js/dist /zone-node.js:275:35) 在 Zone.runTask (/usr/src/app/node_modules/zone.js/dist/zone-node.js:151:47) 在 TLSSocket.ZoneTask.invoke (/usr /src/app/node_modules/zone.js/dist/zone-node.js:345:33) 在 TLSSocket.emit (events.js:208:7) 在 TLSSocket 的 emitNone (events.js:106:13)。 _finishInit (_tls_wrap.js:643:8) 在 TLSWrap.ssl.onhandshakedone (_tls_wrap.js:473:38) 代码:'UNABLE_TO_VERIFY_LEAF_SIGNATURE'}]
我查看了讨论GITHUB DISCUSSION并尝试了一些建议的解决方案,但没有奏效。
这是我用来连接到应用程序洞察力的代码。
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();
我不是 100% 确定是否有任何遥测丢失,但总是遇到这些错误很烦人。请帮忙。
解决方案
我已经更新了 github 讨论线程。摄取方面的修复工作正在进行中。
https://github.com/Microsoft/ApplicationInsights-node.js/issues/180#issuecomment-475699485
推荐阅读
- opengl - 与 eglBindTexImage 等效的 GLX 是什么样的?
- vb.net - 如何仅通过选择并查看标签中的结果来计算列表框中的选定项目?
- python - 如何在 pyspark 中读取大的 zip 文件
- dart - Flutter - SocketException:连接失败(操作系统错误:网络无法访问,errno = 101)
- javascript - Kendo Grid 过滤器菜单可在使用代码应用过滤器时检查过滤值
- c# - 在应用程序运行时在同一屏幕上显示(弹出)消息框
- javascript - 如何检测是否在 Promise 的 catch 块中
- c - 为什么 ”;” 不用于 for 循环中的 i++。不是所有的东西都必须以“;”结尾吗?
- android - 如何使用 JSON 结构实现登录系统?
- php - 如何使用faker dateTimeBetween 创建虚假事件?