Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-49684

Mlock error at mongo console opening - failed to mlock: Cannot allocate locked memory.

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Community Answered
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None
    • None
    • ALL

    Description

      I have just tried to install MongoDB on a fresh Ubuntu 18 machine.

      For this I went through the tutorial from the website: https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/#install-mongodb-community-edition-using-deb-packages

      Everything went fine - including starting the server with 

      sudo systemctl start mongod 

      and checking that it runs with:

      sudo systemctl status mongod

      Only I can't seem to start a mongo console. When I type mongo, I get the following error:

       

      2020-07-17T13:26:48.049+0000 F - [main] Failed to mlock: Cannot allocate locked memory. For more details see: https://dochub.mongodb.org/core/cannot-allocate-locked-memory: Operation not permitted
      2020-07-17T13:26:48.049+0000 F - [main] Fatal Assertion 28832 at src/mongo/base/secure_allocator.cpp 255
      2020-07-17T13:26:48.049+0000 F - [main]
      ***aborting after fassert() failure
      

      I checked for the suggested link but there seems to be no limitation problem as resources are not limited (as per check with ulimit). Machine has 16Gb RAM. Any idea what the problem/solution might be?

       

       

       

      Attachments

        Activity

          People

            dmitry.agranat@mongodb.com Dmitry Agranat
            liagre.vincent@gmail.com Vincent Liagre
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: