Vault v0.6.0 :Failed to lock memory: function not implemented

408 views
Skip to first unread message

Hridyesh Pant

unread,
Jun 18, 2016, 6:35:03 AM6/18/16
to Vault
Hi,
I download Mac OS X 64 bit installer from https://www.vaultproject.io/downloads.html.
while running the vault server , i am getting below error

vault server -config=config.hcl
Error initializing core: Failed to lock memory: function not implemented

This usually means that the mlock syscall is not available.
Vault uses mlock to prevent memory from being swapped to
disk. This requires root privileges as well as a machine
that supports mlock. Please enable mlock on your system or
disable Vault from using it. To disable Vault from using it,
set the `disable_mlock` configuration option in your configuration
file.


ulimit -l
unlimited

cat config.hcl
backend "file" {
path = "/Users/user/Documents/workspace/vault_local/vault_backend"
}
listener "tcp" {
address = "127.0.0.1:8200"
tls_disable = 1
}
default_lease_ttl="1h"
max_lease_ttl="1h"

I am able to run vault 0.5.2 using same command "vault server -config=config.hcl" .
Am i missing somethings ?

--Hridyesh

Brian Lalor

unread,
Jun 18, 2016, 7:28:20 AM6/18/16
to vault...@googlegroups.com
> On Jun 18, 2016, at 6:35 AM, Hridyesh Pant <hridye...@gmail.com> wrote:
>
> Hi,
> I download Mac OS X 64 bit installer from https://www.vaultproject.io/downloads.html.
> while running the vault server , i am getting below error
>
> vault server -config=config.hcl
> Error initializing core: Failed to lock memory: function not implemented

You can still use disable_mlock on OS X. I think this is reasonable behavior as it indicates that the OS doesn’t support a feature that makes Vault more secure (unless “unlocked” memory on OS X isn’t a valid attack vector).


Hridyesh Pant

unread,
Jun 18, 2016, 9:27:23 AM6/18/16
to Vault
Thanks Brian. after using disable_mlock , i am able to launch vault server.

--Hridyesh

Brian Lalor

unread,
Jun 18, 2016, 9:30:22 AM6/18/16
to vault...@googlegroups.com
On Jun 18, 2016, at 9:27 AM, Hridyesh Pant <hridye...@gmail.com> wrote:

Thanks Brian. after using disable_mlock , i am able to launch vault server.

No sweat.  For the record, that’s included in the output you originally posted. :-)

Error initializing core: Failed to lock memory: function not implemented

Hridyesh Pant

unread,
Jun 18, 2016, 9:50:47 AM6/18/16
to Vault
yep, i also noticed this after sending the mail.
vault 0.5.2  don't give this error , and seems vault 0.6 introduce this.

--Hridyesh 
Reply all
Reply to author
Forward
0 new messages