2017-02-24 9 views
2

/security/authorizationファイルのコメントを解除するときにmongodを起動できませんか? on mongodb 3.4.2 on centos6.5;mongod.confの公開認証時にmongodbを起動できません

これはcommondのプリントアウトです:

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

これは私のmongod.confファイルです:ここ はcommondプリントが出ている:

# 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: 

答えて

0

すべてはあなただけのスペースが不足している大丈夫です有効なキーワードの前にスペースは、前のセキュリティのために上記のスニペットをスニペットを置き換え

`` `

security: 
    authorization: enabled 

` ``

を有効に非常に重要です。 誰かを見つけて願って助けてくれるのは難しいです。

関連する問題