0

I have created self signed Certificated by using openssl and have mongodb.pem(mongodb.key + mongodb.cert) file generated from openssl. Also i have my mongodb-ssl.conf file as follows

storage:
   dbPath: C:\Users\rajshanb\MongoDB\data\db\
net:
   port: 27018 
   bindIp: 127.0.0.1
   ssl:
       Mode = requireSSL
       PEMKeyFile = C:\Users\rajshanb\mongodb.pem
       PEMKeyPassword = rajshanb
       CAFile = C:\Users\rajshanb\client.pem

But when i am trying to start the server from terminal :

C:\Users\rajshanb\MongoDB\mongodb\bin>mongod -f C:\Users\rajshanb\mongodb-ssl.conf
Unrecognized option: net.ssl
try 'mongod --help' for more information

I'm getting above mentioned error. Please help me to identify whether i am missing something in configuration.

I am having installed MongoDB version as :

C:\Users\rajshanb>mongod --version
db version v3.4.6
git version: c55eb86ef46ee7aede3b1e2a5d184a7df4bfb5b5
OpenSSL version: OpenSSL 1.0.1u-fips  22 Sep 2016
allocator: tcmalloc
modules: enterprise
build environment:
    distmod: windows-64
    distarch: x86_64
    target_arch: x86_64
2

That Mode should be mode, so no Capital first letter.

Those = should be :

|improve this answer|||||
0

its an spacing issue in configuration definition here are my working configurations

net:
  port: 28017
  bindIp: 127.0.0.1
  ssl:
    mode: requireSSL
    PEMKeyFile: /etc/ssl/mongodb/mongodb-server.pem
    CAFile: /etc/ssl/mongodb/mongodb-client.pem
    PEMKeyPassword: abc123+
|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.