我在我的Ubuntu VM上设置了mongoDB。
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.1 LTS"
我用过这个:https://www.digitalocean.com/community/tutorials/how-to-install-mongodb-on-ubuntu-16-04
之后我启动了这样的服务:
sudo systemctl start mongodb
最后得到了这个:
● mongodb.service - High-performance, schema-free document-oriented database
Loaded: loaded (/etc/systemd/system/mongodb.service; disabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Do 2016-12-01 14:19:54 CET; 5s ago
Process: 21560 ExecStart=/usr/bin/mongod --quiet --config /etc/mongod.conf (code=exited, status=14)
Main PID: 21560 (code=exited, status=14)
Dez 01 11:14:53 ubuntu-vm-1 systemd[1]: Started High-performance, schema-free document-oriented database.
Dez 01 11:14:53 ubuntu-vm-1 systemd[1]: mongodb.service: Main process exited, code=exited, status=14/n/a
Dez 01 11:14:53 ubuntu-vm-1 systemd[1]: mongodb.service: Unit entered failed state.
Dez 01 11:14:53 ubuntu-vm-1 systemd[1]: mongodb.service: Failed with result 'exit-code'.
是的,可以帮助我吗?
这里是日志文件:
2016-12-01T10:56:17.883+0100 I CONTROL [initandlisten] MongoDB starting : pid=19123 port$
2016-12-01T10:56:17.883+0100 I CONTROL [initandlisten] db version v3.2.11
2016-12-01T10:56:17.883+0100 I CONTROL [initandlisten] git version: 009580ad490190ba33d1$
2016-12-01T10:56:17.883+0100 I CONTROL [initandlisten] OpenSSL version: OpenSSL 1.0.2g $
2016-12-01T10:56:17.883+0100 I CONTROL [initandlisten] allocator: tcmalloc
2016-12-01T10:56:17.883+0100 I CONTROL [initandlisten] modules: none
2016-12-01T10:56:17.883+0100 I CONTROL [initandlisten] build environment:
2016-12-01T10:56:17.883+0100 I CONTROL [initandlisten] distmod: ubuntu1604
2016-12-01T10:56:17.883+0100 I CONTROL [initandlisten] distarch: x86_64
2016-12-01T10:56:17.883+0100 I CONTROL [initandlisten] target_arch: x86_64
2016-12-01T10:56:17.883+0100 I CONTROL [initandlisten] options: { config: "/etc/mongod.c$
2016-12-01T10:56:17.909+0100 E NETWORK [initandlisten] Failed to unlink socket file /tmp$
2016-12-01T10:56:17.909+0100 I - [initandlisten] Fatal Assertion 28578
2016-12-01T10:56:17.909+0100 I - [initandlisten]