Hey All,
I have been facing a problem while trying to run Hashicorp's Vault service and I was hoping for some guidance.
I've created a jail and have installed Vault (v1.8.7) into it via
however when I try to start a `vault server` instance I am met with the following error:
Following this thread I took the following steps:
My
My jail's `rc.conf`:
Any suggestions would be greatly appreciated.
Thanks!
I have been facing a problem while trying to run Hashicorp's Vault service and I was hoping for some guidance.
I've created a jail and have installed Vault (v1.8.7) into it via
pkg -j vault-jail install vault
. The vault installation seems to be working fine, however when I try to start a `vault server` instance I am met with the following error:
Code:
Error initializing core: Failed to lock memory: cannot allocate memory
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.
Following this thread I took the following steps:
- Set allow.mlock in vault's jail configuration
- Upped the deamon class memory lock to 1024M
- Confirmed the vault user is a deamon class member.
- Confirmed that `disable_mlock` in Vault's configuration leads to Vault running without errors (as per error message's suggestion).
- Vault v1.8.7
- FreeBSD 13.1-RELEASE
allow.mlock
directive isn't being respected, but I am not sure how that could be the case. My
jail.conf
is as follows:
Code:
exec.start = "/bin/sh /etc/rc";
exec.stop = "/bin/sh /etc/rc.shutdown jail";
exec.clean;
mount.devfs;
path="/var/jails/$name";
mount.devfs;
exec.clean;
exec.start="sh /etc/rc";
exec.stop="sh /etc/rc.shutdown";
allow.raw_sockets=1;t
vault {
ip4.addr="127.0.0.1";
host.hostname="vault";
allow.mlock;
}
My jail's `rc.conf`:
Code:
sshd_enable="YES"
# Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable
dumpdev="AUTO"
vault_enable="yes"
vault_user="vault"
vault_group="vault"
vault_login_class="root"
vault_syslog_output_enable="yes"
Any suggestions would be greatly appreciated.
Thanks!