After Adding keyFile and replSetName in the conf file I get error when trying to start mongod.
“mongod.service: Main process exited, code=exited, status=1/FAILURE”
And If I do not add them mongod starts fine.
This is my conf file:
# mongod.conf
# for documentation of all options, see:
# http://docs.mongodb.org/manual/reference/configuration-options/
# Where and how to store data.
storage:
dbPath: /var/lib/mongodb
journal:
enabled: true
# engine:
# wiredTiger:
# where to write logging data.
systemLog:
destination: file
logAppend: true
path: /var/log/mongodb/mongod.log
# network interfaces
net:
port: 27017
bindIp: 0.0.0.0
# how the process runs
processManagement:
timeZoneInfo: /usr/share/zoneinfo
#security:
security:
authorization: enabled
keyFile: /var/lib/mongodb/pki/rs-keyfile
#operationProfiling:
#replication:
replication:
replSetName: setIntegration
#sharding:
## Enterprise-Only Options:
#auditLog:
#snmp: