我正在尝试从客户端应用程序连接到MongoDB服务器。我启用了TLS,并且正在使用自签名证书。下面是详细信息:
OS: Windows Server 2016
MongoDB Version: 4.2.5
mongod.cfg (config file):
net:
tls:
mode: requireTLS
certificateSelector: subject=server1.com
allowInvalidCertificates: true
disabledProtocols: none
systemLog:
destination: file
path: F:\MongoDB\log\mongod.log
logAppend: true
storage:
dbPath: F:\MongoDB\data
net:
bindIp: localhost,server1.com
port: 27017
我已经创建了RootCA,并创建了server1.pfx(CN = server1.com)。然后将rootca.cer(无密钥)和server1.cer(无密钥)导出并安装到运行客户端应用程序的服务器上,并将其安装到Trusted Root Authority(rootca.cer)和Personal(server1.cer)。 >
我正在使用以下连接字符串:
mongodb://user:*******************@server1.com:27017/CustomerDB?authSource=CustomerDB&tls=true&tlsAllowInvalidCertificates=true
我得到错误:
Error receiving request from client: SSLHandshakeFailed: The server is configured to only allow SSL connections
我已添加tls = true,并在运行客户端应用程序的服务器上启用了TLS 1.1和1.2。我可以从其他应用程序连接到MongoDB,该应用程序在具有相同连接字符串的其他服务器中运行。
我正在尝试从客户端应用程序连接到MongoDB服务器。我启用了TLS,并且正在使用自签名证书。下面是详细信息:操作系统:Windows Server 2016 MongoDB版本:4 ....
您的客户端未使用TLS。