So being completely new to the NoSQL world, I decided to give mongodb a trial, and downloaded the following version, which I presumed supported ssl out of the box:
db version v3.2.4
git version: e2ee9ffcf9f5a94fad76802e28cc978718bb7a30
allocator: tcmalloc
modules: none
build environment:
distarch: x86_64
target_arch: x86_64
So when I run
mongod --sslMode requireSSL --sslPEMKeyFile C:\data\keys\server-key.pem --sslCAFile C:\data\keys\ca-crt.pem
I get the following error message:
Error parsing command line: unrecognised option '--sslMode'
try 'mongod --help' for more information
What am I missing here?
Root cause of the issue is that the mongo binary provided in the community edition does not support --ssl option. I downloaded the evaluation version for the enterprise edition and connected successfully the M001:demo mongo server.
Since mongo has changed the log format and messages in 4.4.x onwards, we need to override the successMessage () method so that it finds the correct log entry text.
If I use the same connection string to connect mongoshell it does work. Can somebody help me out? Try without extra spaces between the parameter name, the equal sign and the parameter value.
Faced the same issue while working on mongo-university's M001: MongoDB Basics course. The demo connection for the course expects a ssl connection but the mongo binary I had threw this error:
$ mongo "mongodb://primary:27017,replica1:27017,replica2:27017/test?replicaSet=Cluster0-shard-0" --ssl --authenticationDatabase admin --username <user_name> --password <password>
Error parsing command line: unrecognised option '--ssl'
try 'mongo --help' for more information
Root cause of the issue is that the mongo
binary provided in the community
edition does not support --ssl
option.
I downloaded the evaluation version for the enterprise edition and connected successfully the M001:demo mongo server.
More details are in mongo Jira issue SERVER:21622
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With