2017-02-24 4 views
2

Je ne peux pas démarrer mongod lorsque je décommenter des options "security: authorization: enabled" sur /etc/mongod.conf? sur mongodb 3.4.2 sur centos6.5;ne peut pas démarrer mongodb lorsque l'authentification ouverte sur mongod.conf

c'est l'impression commond sur:

sudo service mongod restart 
Stopping mongod:           [ OK ] 
Starting mongod:           [FAILED] 

c'est mon fichier mongod.conf: voici l'impression commond sur:

# mongod.conf 

# for documentation of all options, see: 
# http://docs.mongodb.org/manual/reference/configuration-options/ 

# where to write logging data. 
systemLog: 
    destination: file 
    logAppend: true 
    path: /var/log/mongodb/mongod.log 

# Where and how to store data. 
storage: 
    dbPath: /var/lib/mongo 
    journal: 
    enabled: true 
# engine: 
# mmapv1: 
# wiredTiger: 

# how the process runs 
processManagement: 
    fork: true # fork and run in background 
    pidFilePath: /var/run/mongodb/mongod.pid # location of pidfile 

# network interfaces 
net: 
    port: 58018 
    bindIp: 127.0.0.1 # Listen to local interface only, comment to listen on all interfaces. 

#security:    <---uncomment here will start failed 
# authorization:enabled <---uncomment here will start failed 
#operationProfiling: 

#replication: 

#sharding: 

## Enterprise-Only Options 

#auditLog: 

#snmp: 

Répondre

0

Tout va bien vous manque seulement un espace avant mot-clé activé. L'espace est très important avant activé

`` `

security: 
    authorization: enabled 

` ``

Remplacez votre extrait avec l'extrait ci-dessus pour la sécurité. Il est difficile à trouver et j'espère aider quelqu'un.