gpt4 book ai didi

azure - 应用程序见解 Java 代理 : Which Certificates to add to truststore?

转载 作者:行者123 更新时间:2023-12-03 03:36:51 25 4
gpt4 key购买 nike

使用 azure application-insights 代理启动 spring-boot 应用程序时,出现以下错误:

*************************
ApplicationInsights Java Agent failed to send telemetry data.
*************************

Description:
Unable to find valid certification path to requested target.

Action:
Please import the SSL certificate from https://westeurope.livediagnostics.monitor.azure.com/QuickPulseService.svc, into your custom java key store located at:
/truststore/truststore.jks
Learn more about importing the certificate here: https://go.microsoft.com/fwlink/?linkid=2151450

此错误仅有时出现,有时有效。似乎不同的 Azure 服务器使用不同的链(+ 根 CA)。

我的信任库包含以下证书:

  • 巴尔的摩 Cyber​​Trust 根
  • 微软 RSA TLS CA 02
  • live.applicationinsights.azure.com 证书
  • in.applicationinsights.azure.com 的证书

我发现了以下List of all Azure Certificates .

我需要将此列表中的哪些证书添加到信任库才能使错误永久消失?

编辑:我现在已将页面中的所有根证书添加到我的信任库中,但我仍然收到相同的错误消息。不过,我确实在 Azure Insights 中看到了数据...

最佳答案

尝试使用应用程序洞察代理,无需修改 Spring Boot 应用程序,只需提供正确的环境变量

这里是设置环境变量的示例代码

APPLICATIONINSIGHTS_CONNECTION_STRING = <Copy connection string from Application Insights Resource Overview>

此外,您甚至可以通过使用 applicationsettings.json 文件将环境变量添加到连接字符串中来设置环境变量,下面是示例代码

{
"connectionString": "Copy connection string from Application Insights Resource Overview"
}

有关添加环境变量的完整信息,您可以引用 document由@Paizo 建议。

关于azure - 应用程序见解 Java 代理 : Which Certificates to add to truststore?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/72990290/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com