MongoDB is not working

I installed mongodb from this below help

https://www.linode.com/docs/databases/mongodb/install-mongodb-on-ubuntu-16-04/ .

But when i checked status , it is inactive http://prntscr.com/kf9k2j .

I used below commands to make it active . but changed

$ systemctl daemon-reload
$ sudo systemctl enable mongodb
$ sudo systemctl start mongodb

How i can make it functional ? Please help

3 Replies

Please share the entire output from the status command, it says "failed" for a reason.

Hey there.

So I did a little bit of research, you might also want to check your mongodb logs for more information as well with tail -n 30 /var/log/mongodb/mongod.log. That might give you a little more information about specifically what is happening.

It's likely what you are seeing is a permissions error. This Stack Overflow Answer might help point you in the right direction.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct