0

Mongdb start up warning logging, I see lot questions around these warning in this forum however I wanted to know where does these warnings are logged. I could find them in mongod.log.

Can someone share path for these warning logs ??

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]
1
0

Startup warnings shown in the mongo shell are excerpts from your MongoDB server logs. These warnings do not change until the process is restarted, so if you can't find corresponding entries in your default MongoDB log file I expect that the log file has been rotated since the process was started.

Depending on your environment configuration, old log files are typically renamed and compressed so you may need to search for different file names or use a utility like zgrep to search compressed files.

You can redisplay the warnings via show log startupWarnings or the getLog administrative command.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.