Ubuntu – Startup warnings after upgrading from MongoDB 2.6 to 3.4

mongodb

I removed MongoDB 2.6 and installed MongoDB 3.4. When I connect to the MongoDB 3.4 server there are several new startup warnings:

MongoDB shell version v3.4.2
connecting to: mongodb://127.0.0.1:27017
MongoDB server version: 3.4.2
Server has startup warnings: 

2017-03-20T20:27:36.175+0545 I STORAGE  [initandlisten]     
2017-03-20T20:27:36.175+0545 I STORAGE  [initandlisten] ** WARNING: Using the XFS filesystem is strongly recommended with the WiredTiger storage engine
2017-03-20T20:27:36.175+0545 I STORAGE  [initandlisten] **          See http://dochub.mongodb.org/core/prodnotes-filesystem
2017-03-20T20:27:36.855+0545 I CONTROL  [initandlisten] 
2017-03-20T20:27:36.855+0545 I CONTROL  [initandlisten] ** WARNING: Access control is not enabled for the database.
2017-03-20T20:27:36.855+0545 I CONTROL  [initandlisten] **          Read and write access to data and configuration is unrestricted.
2017-03-20T20:27:36.855+0545 I CONTROL  [initandlisten] 
2017-03-20T20:27:36.855+0545 I CONTROL  [initandlisten]
2017-03-20T20:27:36.855+0545 I CONTROL  [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/enabled is 'always'.
2017-03-20T20:27:36.855+0545 I CONTROL  [initandlisten] **        We suggest setting it to 'never'
2017-03-20T20:27:36.855+0545 I CONTROL  [initandlisten] 
2017-03-20T20:27:36.855+0545 I CONTROL  [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/defrag is 'always'.   
2017-03-20T20:27:36.855+0545 I CONTROL  [initandlisten] **        We suggest setting it to 'never'
2017-03-20T20:27:36.855+0545 I CONTROL  [initandlisten] 

How do I remove these warnings?

Best Answer

The MongoDB 3.4 log messages you have highlighted are startup warnings, not errors. These warnings are intended to alert administrators to configuration settings that may have potentially detrimental impact (particularly for production deployments).

If this is a development environment (or you are not concerned about maximizing performance) you can choose to ignore these.

For a more detailed list of recommended settings you should review the Production Notes in the MongoDB manual. Successive versions of MongoDB have added more server warnings for detectable configuration settings as many administrators are unaware of the production notes or what may apply to their deployment.

WARNING: Using the XFS filesystem is strongly recommended with the WiredTiger storage engine

This warning indicates you are using WiredTiger and a filesystem other than XFS (see http://dochub.mongodb.org/core/prodnotes-filesystem for more information).

WARNING: Access control is not enabled for the database.

This warning indicates you do not have access control enabled, so any user/application that can connect to your deployment will have unrestricted access. To secure your deployment please review the measures in the MongoDB Security Checklist.

WARNING: /sys/kernel/mm/transparent_hugepage/enabled is 'always'.

We suggest setting it to 'never'

WARNING: /sys/kernel/mm/transparent_hugepage/defrag is 'always'.

We suggest setting it to 'never'

Transparent Huge Pages (THP) is a Linux memory management setting that can adversely affect database workflows. For more information see: Disable Transparent Huge Pages in the MongoDB manual.