[root@host project]# mongo
2021-06-01T04:51:34.325+0200 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
2021-06-01T04:51:34.325+0200 F - [main] Fatal Assertion 28832 at src/mongo/base/secure_allocator.cpp 255
2021-06-01T04:51:34.325+0200 F - [main]
***aborting after fassert() failure
Using Fedora in nspawn container.
Unfortunately the link is also broken.
Anyone has any suggestions?
I got a similar problem. I have a Debian nspawn container with Docker inside. The
mongo
image failed to launch becausemlock
system calls were denied.I had the following configuration in my
/etc/systemd/nspawn/machine.nspawn
:I solved my problem by adding
@memlock
toSystemCallFilter
.In your case, if you don't have a
Capability=all
line in yourmachine.nspawn
file, you need to have at leastCapability=CAP_IPC_LOCK
.