MongoDB.live, free & fully virtual. June 9th - 10th. Register Now

Cannot start MongoDB service after configuring TLS

I am new to MongoDB. I have installed MongoDB, and have done the configurations. Everything works fine till I add the configuration for TLS.I am using a Self signed Certificate. The MongoDB version I am using is 4.2.5. I am using Windows Server 2016 Datacenter edition. I have enabled TLS (1.0, 1.1, 1.2 (Server)) in registry.

The below is my config file:

When I try to start the MongoDB service, I get the below error:

However, I noticed that when I take out the below statements from the config file, the service starts:
net:
tls:
mode: requireTLS
certificateSelector: thumdprint=“‎45b*********************************************37”

looks like a typo. You have a d instead of b in thumbprint

I tried with “thumbprint”, that also did not work

Please try with subject instead of thumbprint and check if it works

net:
tls:
mode: requireTLS
certificateSelector: subject=""

Look at your mongod logs and/or try starting mongod from the command line.

1 Like