Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Error initializing core: Failed to lock memory: cannot allocate memory #53
I ran in to #24 trying to set up the Vault Docker image. When I try the suggested workaround ("-e SKIP_SETCAP=true") I get this error:
Same problem if I use
I'm running on Ubuntu Xenial.
Docker version (from official Docker repository):
So just looking at:
During docker run you tried using:
In the config you could pass to vault:
I know when I had this problem it was because I was not root, which I used (sudo) to set up vault initially. In the docs, it's also important to note that;
"The memory locking behavior can be disabled by setting the SKIP_SETCAP environment variable to any non-empty value." This might mean true/false as a boolean should work. I will look into this more for my setup.
I was able to get the IPC_LOCK to work in CentOS Atomic Host, not sure why it didn't work in Ubuntu. I didn't want to use the disable_mlock work-around because it seems like it would circumvent some of the security of vault (decrypted secrets being written to swap).
same probelm in my ubuntu system
Error initializing core: Failed to lock memory: cannot allocate memory
This usually means that the mlock syscall is not available.
how can i solve this problem?
The Vault Configuration File Documentation mentions the solution in the
Please see the link for the excerpt in the future to ensure you are using the most up to date information and following best practices.