i trying configure mongodb ssl. have 2 certs within directory on ubuntu, when try restart service mongodb.conf set correctly, service not start. if comment out lines in mongodb.conf file added, can start mongodb. think syntax wrong, , not certs them self.
#ssl options sslmode = requiressl #enable ssl on normal ports #sslonnormalports = true # ssl key file , password sslpemkeyfile = /path/to/cert sslpemkeypassword = password sslcafile = /path/to/cert
i error when try start server these lines not commented out
stop: unknown instance: mongodb start/running, process 7725
if try mongo shell this(assuming because not restart service properly)
thu jul 21 14:32:07.660 error: couldn't connect server 127.0.0.1:27017 @ src/mongo/shell/mongo.js:145 exception: connect failed
the mongodb.conf file yaml file need format such. meaning can't use tabs. syntax you're using wrong.
try this:
net: #ssl options ssl: mode: requiressl # ssl key file , password pemkeyfile: /path/to/cert pemkeypassword: password cafile: /path/to/cert
also, know it's commented out wanted mention, sslonnormal ports option deprecated. see here: https://docs.mongodb.com/manual/reference/configuration-options/#net.ssl.sslonnormalports
Comments
Post a Comment