mongo db can't start ubuntu 15.10

702 Views Asked by At
sudo service mongodb start

Failed to start mongodb.service: Unit mongodb.service is masked.

What should I do? help me..

~$ mongo MongoDB shell version: 3.2.3 connecting to: test 2016-02-26T17:40:18.552+0200 W NETWORK [thread1] Failed to connect to 127.0.0.1:27017, reason: errno:111 Connection refused 2016-02-26T17:40:18.552+0200 E QUERY [thread1] Error: couldn't connect to server 127.0.0.1:27017, connection attempt failed : connect@src/mongo/shell/mongo.js:224:14 @(connect):1:6

exception: connect failed

2

There are 2 best solutions below

1
On

I think it's sudo service mongod start - please note the lack of b in mongod

0
On

I find the solution:

sudo mongod --dbpath /var/lib/mongodb/ --journal

Different terminal is opening and mongo command is starting with