无法在ubuntu上启动mongodb

时间:2016-04-15 15:31:44

标签: mongodb ubuntu service

我刚刚使用这些说明在ubuntu上安装了mongodb:

https://askubuntu.com/questions/724749/install-mongo-3-2-on-ubuntu-15-10

当我尝试启动它时,我看到了这个错误:

me@devbox:/usr/bin$ service mongod start
Failed to start mongod.service: Unit mongod.service is masked.




me@devbox:~$ mongod
2016-04-15T11:24:01.941-0400 I CONTROL  [initandlisten] MongoDB starting : pid=4343 port=27017 dbpath=/data/db 64-bit host=mydev
2016-04-15T11:24:01.941-0400 I CONTROL  [initandlisten] db version v3.2.5
2016-04-15T11:24:01.941-0400 I CONTROL  [initandlisten] git version: 34e65e5383f7ea1726332cb175b73077ec4a1b02
2016-04-15T11:24:01.941-0400 I CONTROL  [initandlisten] OpenSSL version: OpenSSL 1.0.2d 9 Jul 2015
2016-04-15T11:24:01.941-0400 I CONTROL  [initandlisten] allocator: tcmalloc
2016-04-15T11:24:01.941-0400 I CONTROL  [initandlisten] modules: none
2016-04-15T11:24:01.941-0400 I CONTROL  [initandlisten] build environment:
2016-04-15T11:24:01.941-0400 I CONTROL  [initandlisten]     distmod: ubuntu1404
2016-04-15T11:24:01.941-0400 I CONTROL  [initandlisten]     distarch: x86_64
2016-04-15T11:24:01.941-0400 I CONTROL  [initandlisten]     target_arch: x86_64
2016-04-15T11:24:01.941-0400 I CONTROL  [initandlisten] options: {}
2016-04-15T11:24:02.031-0400 I STORAGE  [initandlisten] exception in initAndListen: 98 Unable to create/open lock file: /data/db/mongod.lock errno:13 Permission denied Is a mongod instance already running?, terminating
2016-04-15T11:24:02.031-0400 I CONTROL  [initandlisten] dbexit:  rc: 100

当我尝试检查状态时,它说:

me@devbox:~$ service mongod status
● mongod.service
   Loaded: masked (/lib/systemd/system/mongod.service; masked; vendor preset: enabled)
   Active: inactive (dead)

当我尝试启动命令行时,它说:

me@devbox:/usr/bin$ mongo
MongoDB shell version: 3.2.5
connecting to: test
2016-04-15T11:32:11.828-0400 W NETWORK  [thread1] Failed to connect to 127.0.0.1:27017, reason: errno:111 Connection refused
2016-04-15T11:32:11.828-0400 E QUERY    [thread1] Error: couldn't connect to server 127.0.0.1:27017, connection attempt failed :
connect@src/mongo/shell/mongo.js:229:14
@(connect):1:6

exception: connect failed

不确定如何开始

0 个答案:

没有答案