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

1 Answer 1

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

1
  • 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, 2016 at 22:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .