Unrecognized option: tls.mode

I fill the mongo.conf at IDE
config file:

storage:
  dbPath: "/data/db"
systemLog:
  path: "/data/log/mongod.log"
  destination: "file"
replication:
  replSetName: M103
net:
  port: 27000
  bindIp : "127.0.0.1,192.168.103.100"
tls:
  mode: "requireTLS"
  certificateKeyFile: "/etc/tls/tls.pem"
  CAFile: "/etc/tls/TLSCA.pem"
security:
  keyFile: "/data/keyfile"
  authorization: enabled
processManagement:
  fork: true

Is there something at IDE

You may be using some old config file relevant to Vagrant environment(old course) which will not work in IDE

Use a simple config file with min parameters suggested in your lab/exercise

1 Like

Can you give me your config file because I added this config file and the error is this

my current config file:

net:
   bindIp: 127.0.0.1
   port: 27000
security:
  authorization: enabled

Last line of output:

Did you launch mongod using a configuration file?

Most likely not.

Post a screenshot that shows how you started mongod?

1 Like

I just solve it. I thought I have to open 3 terminal and run mongod

I solved it by listing all config in the config file and run mongod --config mongod.conf

net:
   bindIp: 127.0.0.1
   port: 27000
security:
  authorization: enabled

Thanks

1 Like