【发布时间】:2019-10-31 10:08:21
【问题描述】:
我们正在使用部署在 Linux CentOS 中的 C# API(.NET 核心版本 2.2)中的 C# 驱动程序“Mongo Db 驱动程序 2.9.2”连接到部署在 Linux CentOS 上的 Mongo 服务器 4.2。 Mongo 上启用了 TLS,并使用了自签名证书。相同的代码和证书在 Windows 机器上工作,但在 Linux 上我们收到以下错误。请建议:
使用 CompositeServerSelector{ Selectors = MongoDB.Driver.MongoClient+AreSessionsSupportedServerSelector, LatencyLimitingServerSelector{ AllowedLatencyRange = 00:00:00.0150000 } } 选择服务器 30000 毫秒后发生超时。集群状态的客户端视图是 { ClusterId : \"1\", ConnectionMode : \"Automatic\", Type : \"Unknown\", State : \"Disconnected\", Servers : [{ ServerId: \"{ ClusterId : 1、EndPoint:\"Unspecified/ServerName\" }\", EndPoint:\"Unspecified/ip-ServerName\", State:\"Disconnected\", Type:\"Unknown\", HeartbeatException:\"MongoDB.Driver .MongoConnectionException: 打开与服务器的连接时发生异常。---> System.Security.Authentication.AuthenticationException: 根据验证过程,远程证书无效。\n 在 System.Net.Security.SslState.StartSendAuthResetSignal
【问题讨论】:
标签: mongodb