0

我想问一下各位大神,为什么mongod.service的Active: failed 但是我的mongodb shell却能正常工作

sunboy25@sunboy25-Default-string:~$ sudo systemctl status mongod
mongod.service – MongoDB Database Server
Loaded: loaded (/lib/systemd/system/mongod.service; enabled; vendor preset>
Active: failed (Result: exit-code) since Sun 2021-05-16 11:09:43 CST; 5min>
Docs: https://docs.mongodb.org/manual
Process: 2655 ExecStart=/usr/bin/mongod –config /etc/mongod.conf (code=exi>
Main PID: 2655 (code=exited, status=1/FAILURE)

五月 16 11:09:42 sunboy25-Default-string systemd[1]: Started MongoDB Database S>
五月 16 11:09:43 sunboy25-Default-string mongod[2655]: {“t”:{“$date”:”2021-05-1>
五月 16 11:09:43 sunboy25-Default-string systemd[1]: mongod.service: Main proce>
五月 16 11:09:43 sunboy25-Default-string systemd[1]: mongod.service: Failed wit>
lines 1-11/11 (END)

MongoDB shell version v4.4.6
connecting to: mongodb://127.0.0.1:27017/?compressors=disabled&gssapiServiceName=mongodb
Implicit session: session { “id” : UUID(“9adff1af-99b1-42e3-b1c1-a92d1ea42bbe”) }
MongoDB server version: 4.4.6

The server generated these startup warnings when booting:
2021-05-16T11:11:54.744+08:00: Using the XFS filesystem is strongly recommended with the WiredTiger storage engine. See http://dochub.mongodb.org/core/prodnotes-filesystem
2021-05-16T11:11:55.433+08:00: Access control is not enabled for the database. Read and write access to data and configuration is unrestricted
2021-05-16T11:11:55.433+08:00: You are running this process as the root user, which is not recommended
2021-05-16T11:11:55.433+08:00: This server is bound to localhost. Remote systems will be unable to connect to this server. Start the server with –bind_ip <address> to specify which IP addresses it should serve responses from, or with –bind_ip_all to bind to all interfaces. If this behavior is desired, start the server with –bind_ip 127.0.0.1 to disable this warning
2021-05-16T11:11:55.434+08:00: Soft rlimits too low
2021-05-16T11:11:55.434+08:00: currentValue: 1024
2021-05-16T11:11:55.434+08:00: recommendedMinimum: 64000


Enable MongoDB’s free cloud-based monitoring service, which will then receive and display
metrics about your deployment (disk utilization, CPU, operation statistics, etc).

The monitoring data will be available on a MongoDB website with a unique URL accessible to you
and anyone you share the URL with. MongoDB may use this information to make product
improvements and to suggest MongoDB products and deployment options to you.

To enable free monitoring, run the following command: db.enableFreeMonitoring()
To permanently disable this reminder, run the following command: db.disableFreeMonitoring()

已回答的问题