Mongodb
Mongdb 啟動警告日誌
Mongdb 啟動警告記錄,我在這個論壇上看到很多關於這些警告的問題,但是我想知道這些警告記錄在哪裡。我可以在 mongod.log 中找到它們。
有人可以分享這些警告日誌的路徑嗎?
MongoDB server version: 3.4.1 Server has startup warnings: 2020-11-19T19:36:51.030-0800 I STORAGE [initandlisten] 2020-11-19T19:36:51.030-0800 I STORAGE [initandlisten] ** WARNING: Using the XFS filesystem is strongly recommended with the WiredTiger storage engine 2020-11-19T19:36:51.030-0800 I STORAGE [initandlisten] ** See http://dochub.mongodb.org/core/prodnotes-filesystem 2020-11-19T19:44:38.433-0800 I CONTROL [initandlisten] 2020-11-19T19:44:38.433-0800 I CONTROL [initandlisten] ** WARNING: The server is started with the web server interface and access control. 2020-11-19T19:44:38.433-0800 I CONTROL [initandlisten] ** The web interfaces (rest, httpinterface and/or jsonp) are insecure 2020-11-19T19:44:38.433-0800 I CONTROL [initandlisten] ** and should be disabled unless required for backward compatibility. 2020-11-19T19:44:38.433-0800 I CONTROL [initandlisten] ** WARNING: You are running this process as the root user, which is not recommended. 2020-11-19T19:44:38.433-0800 I CONTROL [initandlisten] 2020-11-19T19:44:38.433-0800 I CONTROL [initandlisten] 2020-11-19T19:44:38.433-0800 I CONTROL [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/defrag is 'always'. 2020-11-19T19:44:38.433-0800 I CONTROL [initandlisten] ** We suggest setting it to 'never' 2020-11-19T19:44:38.433-0800 I CONTROL [initandlisten] 2020-11-19T19:44:38.433-0800 I CONTROL [initandlisten] ** WARNING: soft rlimits too low. rlimits set to 128538 processes, 500000 files. Number of processes should be at least 250000 : 0.5 times number of files. 2020-11-19T19:44:38.433-0800 I CONTROL [initandlisten] mongo7052:SECONDARY> MongoDB server version: 3.4.1 Server has startup warnings: 2021-02-19T00:04:24.384-0800 I CONTROL [main] ** WARNING: --rest is specified without --httpinterface, 2021-02-19T00:04:24.384-0800 I CONTROL [main] ** enabling http interface 2021-02-19T00:04:24.469-0800 I STORAGE [initandlisten] 2021-02-19T00:04:24.469-0800 I STORAGE [initandlisten] ** WARNING: Using the XFS filesystem is strongly recommended with the WiredTiger storage engine 2021-02-19T00:04:24.469-0800 I STORAGE [initandlisten] ** See http://dochub.mongodb.org/core/prodnotes-filesystem 2021-02-19T00:04:27.390-0800 I CONTROL [initandlisten] 2021-02-19T00:04:27.390-0800 I CONTROL [initandlisten] ** WARNING: The server is started with the web server interface and access control. 2021-02-19T00:04:27.390-0800 I CONTROL [initandlisten] ** The web interfaces (rest, httpinterface and/or jsonp) are insecure 2021-02-19T00:04:27.390-0800 I CONTROL [initandlisten] ** and should be disabled unless required for backward compatibility. 2021-02-19T00:04:27.390-0800 I CONTROL [initandlisten] ** WARNING: You are running this process as the root user, which is not recommended. 2021-02-19T00:04:27.390-0800 I CONTROL [initandlisten] 2021-02-19T00:04:27.391-0800 I CONTROL [initandlisten] 2021-02-19T00:04:27.391-0800 I CONTROL [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/defrag is 'always'. 2021-02-19T00:04:27.391-0800 I CONTROL [initandlisten] ** We suggest setting it to 'never' 2021-02-19T00:04:27.391-0800 I CONTROL [initandlisten]
shell 中顯示的啟動警告
mongo
是 MongoDB 伺服器日誌的摘錄。在程序重新啟動之前,這些警告不會改變,所以如果你在預設的 MongoDB 日誌文件中找不到相應的條目,我希望日誌文件在程序啟動後已經輪換。根據您的環境配置,舊的日誌文件通常會被重命名和壓縮,因此您可能需要搜尋不同的文件名或使用諸如
zgrep
搜尋壓縮文件之類的實用程序。
show log startupWarnings
您可以通過或getLog
管理命令重新顯示警告。