node.js - Mongo db ubuntu 16.04 cant start service -


i reinstalled mongo following tutorial https://www.digitalocean.com/community/tutorials/how-to-install-mongodb-on-ubuntu-16-04 seems wont start, result of sudo systemctl status mongodb

 ● mongodb.service - high-performance, schema-free document-oriented database    loaded: loaded (/etc/systemd/system/mongodb.service; enabled; vendor preset: enabled)    active: failed (result: exit-code) since wed 2017-04-05 16:31:03 utc; 6s ago   process: 14024 execstart=/usr/bin/mongod --quiet --config /etc/mongod.conf (code=exited, status=1/failure)   main pid: 14024 (code=exited, status=1/failure)      apr 05 16:31:02 nodejs-512mb-fra1-01 systemd[1]: started  high-performance, schema-free document-oriented database. apr 05 16:31:03 nodejs-512mb-fra1-01 mongod[14024]: error command line: unrecognized line in 'storage:' apr 05 16:31:03 nodejs-512mb-fra1-01 mongod[14024]: use --help apr 05 16:31:03 nodejs-512mb-fra1-01 systemd[1]: mongodb.service: main process exited, code=exited, status=1/failure apr 05 16:31:03 nodejs-512mb-fra1-01 systemd[1]: mongodb.service: unit entered failed state. apr 05 16:31:03 nodejs-512mb-fra1-01 systemd[1]: mongodb.service:     failed result 'exit-code' 

my mongod.conf looks this

# mongod.conf  # documentation of options, see: #   http://docs.mongodb.org/manual/reference/configuration-options/  # , how store data. storage:   dbpath: /var/lib/mongodb   journal:     enabled: true #  engine: #  mmapv1: #  wiredtiger:  # write logging data. systemlog:   destination: file   logappend: true   path: /var/log/mongodb/mongod.log  # network interfaces   net:   port: 27017   bindip: 127.0.0.1   #processmanagement:  #security:  #operationprofiling:  #replication:  #sharding:  ## enterprise-only options:  #auditlog:  #snmp: 

if try comment out storage lin goes same oerror on systemlog line

the error message says unrecognized line in 'storage:', check /etc/mongod.conf file tabs or strange/special characters @ near storage setting.

you can validate config file valid yaml here:

http://yaml-online-parser.appspot.com/


Comments