Problem
Error message on Vault startup:
Unable to set token version into newly created table: attempt to write a readonly databaseThe error is visible when running
systemctl status vaultcommand
Prerequisites
- Vault Enterprise
- Thales HSM with Luna client
Cause
- The error message originates from the Thales Luna client installed on a Vault node
- By default, Vault’s systemd unit uses
ProtectSystem=full, making/usrread-only. Luna client is installed under/usr/safenetand may require write access, which explains thereadonly databaseerror
Solution:
Test this change on one node first
Update the Vault systemd service file to include
ReadWritePaths=/usr/safenetas an exception toProtectSystem- Reload systemd configuration
systemctl daemon-reload
Outcome
The error should no longer be visible when Vault starts