Azure IoT Edge:Edge 代理无法将 X509 证书添加到存储
Azure IoT Edge: Edge Agent can't add X509 certificate to the store
我正在尝试设置我的天蓝色物联网边缘设备(Linux Ubuntu 18.04 - Linux 容器),但是一旦我使用连接字符串应用配置,我的 EdgeAgent 就会失败首次配置时出现以下错误消息
System.Security.Cryptography.CryptographicException: The X509 certificate could not be added to the store.
---> System.UnauthorizedAccessException: Access to the path '/home/edgeagentuser/.dotnet/corefx/cryptography/x509stores/root' is denied.
---> System.IO.IOException: Permission denied
--- End of inner exception stack trace ---
at System.IO.FileSystem.CreateDirectory(String fullPath)
at System.IO.Directory.CreateDirectory(String path)
at Internal.Cryptography.Pal.DirectoryBasedStoreProvider.AddCertToStore(ICertificatePal certPal)
at Internal.Cryptography.Pal.DirectoryBasedStoreProvider.Add(ICertificatePal certPal)
--- End of inner exception stack trace ---
at Internal.Cryptography.Pal.DirectoryBasedStoreProvider.Add(ICertificatePal certPal)
at System.Security.Cryptography.X509Certificates.X509Store.Add(X509Certificate2 certificate)
at Microsoft.Azure.Devices.Edge.Util.CertificateHelper.InstallCertificates(IEnumerable`1 certificateChain, ILogger logger) in /mnt/vss/_work/1/s/edge-util/src/Microsoft.Azure.Devices.Edge.Util/CertificateHelper.cs:line 228
at Microsoft.Azure.Devices.Edge.Agent.Service.Program.MainAsync(IConfiguration configuration) in /mnt/vss/_work/1/s/edge-agent/src/Microsoft.Azure.Devices.Edge.Agent.Service/Program.cs:line 187
可以在此处找到更多详细信息:
GitHub Issue
通过明确指定 edgeHub 和 edgeAgent 容器版本设法解决了该问题。检查 Github issue 了解更多详情。
我正在尝试设置我的天蓝色物联网边缘设备(Linux Ubuntu 18.04 - Linux 容器),但是一旦我使用连接字符串应用配置,我的 EdgeAgent 就会失败首次配置时出现以下错误消息
System.Security.Cryptography.CryptographicException: The X509 certificate could not be added to the store.
---> System.UnauthorizedAccessException: Access to the path '/home/edgeagentuser/.dotnet/corefx/cryptography/x509stores/root' is denied.
---> System.IO.IOException: Permission denied
--- End of inner exception stack trace ---
at System.IO.FileSystem.CreateDirectory(String fullPath)
at System.IO.Directory.CreateDirectory(String path)
at Internal.Cryptography.Pal.DirectoryBasedStoreProvider.AddCertToStore(ICertificatePal certPal)
at Internal.Cryptography.Pal.DirectoryBasedStoreProvider.Add(ICertificatePal certPal)
--- End of inner exception stack trace ---
at Internal.Cryptography.Pal.DirectoryBasedStoreProvider.Add(ICertificatePal certPal)
at System.Security.Cryptography.X509Certificates.X509Store.Add(X509Certificate2 certificate)
at Microsoft.Azure.Devices.Edge.Util.CertificateHelper.InstallCertificates(IEnumerable`1 certificateChain, ILogger logger) in /mnt/vss/_work/1/s/edge-util/src/Microsoft.Azure.Devices.Edge.Util/CertificateHelper.cs:line 228
at Microsoft.Azure.Devices.Edge.Agent.Service.Program.MainAsync(IConfiguration configuration) in /mnt/vss/_work/1/s/edge-agent/src/Microsoft.Azure.Devices.Edge.Agent.Service/Program.cs:line 187
可以在此处找到更多详细信息: GitHub Issue
通过明确指定 edgeHub 和 edgeAgent 容器版本设法解决了该问题。检查 Github issue 了解更多详情。