Mongo cant start service

I reinstalle dmongo following this tutorial but this is the 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 for 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 with result 'exit-code'
Show comments

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

That is because the permission setting on /var/lib/mongodb and /tmp/mongodb-27017.lock are wrong. You will have to change the owner to monogdb user.

chown -R mongodb:mongodb /var/lib/mongodb
chown mongodb:mongodb /tmp/mongodb-27017.sock

$ sudo rm -rf /tmp/mongodb-27017.sock $ sudo service mongod start [ok]

There’s a mongod.log file but it only say things about data received qhen the db was working. Anyway i once runned it with sudo wich isn’t a good practice, can be that i introduced some locks or things like that? I tried to uninstall and make a fresh install but nothin. Is there a way to remove mongodb and everything like it was never installed? Im yelling angains the terminal since a week or two