0

I installed Ubuntu Server 16.04.1 LTS and have been having trouble for the past 5 days. One of the problems is this after input this command: mongo

Server has startup warnings:
2016-12-19T08:40:14.039-0800 I STORAGE  [initandlisten]
2016-12-19T08:40:15.984-0800 I CONTROL  [initandlisten]
2016-12-19T08:40:15.984-0800 I CONTROL  [initandlisten] ** WARNING: Access control is not enabled for the database.
2016-12-19T08:40:15.984-0800 I CONTROL  [initandlisten] **          Read and write access to data and configuration is unrestricted.
2016-12-19T08:40:15.984-0800 I CONTROL  [initandlisten]
2016-12-19T08:40:15.984-0800 I CONTROL  [initandlisten]
2016-12-19T08:40:15.984-0800 I CONTROL  [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/enabled is 'always'.
2016-12-19T08:40:15.984-0800 I CONTROL  [initandlisten] **        We suggest setting it to 'never'
2016-12-19T08:40:15.984-0800 I CONTROL  [initandlisten]
2016-12-19T08:40:15.984-0800 I CONTROL  [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/defrag is 'always'.
2016-12-19T08:40:15.984-0800 I CONTROL  [initandlisten] **        We suggest setting it to 'never'
2016-12-19T08:40:15.984-0800 I CONTROL  [initandlisten]

I am new to Ubuntu and hoping for a step by step solution

0

You have two issues to handle:

  1. You haven't configured the security features in your mongodb:

    • Follow the official steps to doing so here
  2. Disable Transparent Huge Pages (THP):

    • there are two options here, look at the second answer but if the accepted answer works for you fine:

      • adding the following to the /etc/rc.local file before the exit 0

        if test -f /sys/kernel/mm/transparent_hugepage/khugepaged/defrag; then
        echo 0 > /sys/kernel/mm/transparent_hugepage/khugepaged/defrag
        fi
        if test -f /sys/kernel/mm/transparent_hugepage/defrag; then
          echo never > /sys/kernel/mm/transparent_hugepage/defrag
        fi
        if test -f /sys/kernel/mm/transparent_hugepage/enabled; then
          echo never > /sys/kernel/mm/transparent_hugepage/enabled
        fi
        
      • edit /etc/default/grub:

        • append transparent_hugepage=never to GRUB_CMDLINE_LINUX_DEFAULT then
        • run update-grub

Sources:

How do I modify "/sys/kernel/mm/transparent_hugepage/enabled"

https://docs.mongodb.com/manual/tutorial/transparent-huge-pages/#transparent-huge-pages-thp-settings

https://www.mongodb.com/blog/post/mongodb-security-part-ii-10-mistakes-that-can

  • Thank you very much. I am looking at the video for the past few days. Will be done soon and come back with the update. – mwall90278 Dec 29 '16 at 22:39

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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