我正在ubuntu 20.04上运行。首先,当我安装它时,它可以正常工作。但是重新启动桌面后,它给了我一个错误。
mongod.service - MongoDB Database Server
Loaded: loaded (/lib/systemd/system/mongod.service; disabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Tue 2020-07-07 10:45:07 IST; 4min 47s ago
Docs: https://docs.mongodb.org/manual
Main PID: 8324 (code=exited, status=14)
Jul 07 10:45:04 pop-os systemd[1]: Started MongoDB Database Server.
Jul 07 10:45:07 pop-os systemd[1]: mongod.service: Main process exited, code=exited, status=14/n/a
Jul 07 10:45:07 pop-os systemd[1]: mongod.service: Failed with result 'exit-code'.
Jul 07 10:49:49 pop-os systemd[1]: /lib/systemd/system/mongod.service:11: PIDFile= references a path below legacy directory /var/run/>
答案 0 :(得分:0)
我遇到了同样的问题-检查/var/log/mongodb/mongodb.log显示日志文件没有足够的磁盘空间:
2020-11-08T16:04:02.510+0000 E JOURNAL [initandlisten] Insufficient free space for journal files
2020-11-08T16:04:02.510+0000 I JOURNAL [initandlisten] Please make at least 3379MB available in /var/lib/mongodb/journal or use --smallfiles
2020-11-08T16:04:02.510+0000 I JOURNAL [initandlisten]
2020-11-08T16:04:02.510+0000 I STORAGE [initandlisten] exception in initAndListen: Location15926: Insufficient free space for journals, terminating
2020-11-08T16:04:02.510+0000 I REPL [initandlisten] Stepping down the ReplicationCoordinator for shutdown, waitTime: 10000ms
2020-11-08T16:04:02.510+0000 I NETWORK [initandlisten] shutdown: going to close listening sockets...
2020-11-08T16:04:02.510+0000 I NETWORK [initandlisten] removing socket file: /tmp/mongodb-27017.sock
2020-11-08T16:04:02.510+0000 I NETWORK [initandlisten] Shutting down the global connection pool
2020-11-08T16:04:02.510+0000 I REPL [initandlisten] Shutting down the ReplicationCoordinator
2020-11-08T16:04:02.510+0000 I REPL [initandlisten] shutting down replication subsystems
腾出一些空间为我解决了这个问题。