We are running Vault main instance in Raft Storage Backend, which gets auto unsealed using transit engine. Recently, we have enabled the audit device and we would like to rotate the audit logs every 7 days, for trial purpose. We are using logrotate.
The problem is, that the Vault Service gets stuck in a reloading state. However, the log rotation is being successful, and new audit logs are being written to the new audit file. Can someone explain why the service is unable to reload successfully?
It’s the KillMode line which is already set to process. I’m at a loss, not sure why it isn’t restarting correctly. What is the version of Vault? What OS and version are you running on? Is there a firewall or any blocking tools installed?
Yeah. Please see the Vault Version and OS Version. There’s no firewall blocking. We’ve been trying to figure out what’s causing the issue . But, no luck at all. There are some GitHub issues related to it, but they aren’t of much use.
Key Value
--- -----
Recovery Seal Type shamir
Initialized true
Sealed false
Total Recovery Shares 5
Threshold 3
Version 1.10.0
Storage Type raft
Cluster Name vault-cluster-570b3133
Cluster ID 74ecb77f-36e9-2aa0-586d-7697da410c4b
HA Enabled true
HA Cluster https://192.168.56.103:8201
HA Mode active
Active Since 2022-04-28T10:13:11.466732751Z
Raft Committed Index 535
Raft Applied Index 535
OS Type and Version:
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04 LTS
Release: 20.04
Codename: focal
First thing they’re going to tell you is to upgrade to the latest version. Second run the hcdiag utility to collect system information. vault operator diagnose -config /etc/vault.d/vault.hcl is the other command.
All that put together if they don’t tell you anything, then yeah you can open an issue on github.
Thanks for suggesting. I have run the diagnose and seems there’s something wrong with that. Previously, we were using file system backend and migrated to raft storage. The /opt/vault/data is the path previous file backend is using as storage.
The vault.db has enough permissions, still showing permission denied. Any idea of this?
Results:
[ failure ] Vault Diagnose
[ warning ] Check Operating System
[ warning ] Check Open File Limits: Open file limits are set to 1024
These limits may be insufficient. We recommend raising the soft and hard limits to 1024768.
[ success ] Check Disk Usage: / usage ok.
[ warning ] Check Disk Usage: /snap/bare/5 is 100.00 percent full.
It is recommended to have more than five percent of the partition free.
[ warning ] Check Disk Usage: /snap/chromium/1967 is 100.00 percent full.
It is recommended to have more than five percent of the partition free.
[ warning ] Check Disk Usage: /snap/core18/2284 is 100.00 percent full.
It is recommended to have more than five percent of the partition free.
[ warning ] Check Disk Usage: /snap/core20/1405 is 100.00 percent full.
It is recommended to have more than five percent of the partition free.
[ warning ] Check Disk Usage: /snap/gtk-common-themes/1506 is 100.00 percent full.
It is recommended to have more than five percent of the partition free.
[ warning ] Check Disk Usage: /snap/gtk-common-themes/1519 is 100.00 percent full.
It is recommended to have more than five percent of the partition free.
[ warning ] Check Disk Usage: /snap/core18/2344 is 100.00 percent full.
It is recommended to have more than five percent of the partition free.
[ warning ] Check Disk Usage: /snap/gnome-3-38-2004/99 is 100.00 percent full.
It is recommended to have more than five percent of the partition free.
[ warning ] Check Disk Usage: /snap/snap-store/558 is 100.00 percent full.
It is recommended to have more than five percent of the partition free.
[ warning ] Check Disk Usage: /snap/snapd/15177 is 100.00 percent full.
It is recommended to have more than five percent of the partition free.
[ warning ] Check Disk Usage: /snap/snap-store/433 is 100.00 percent full.
It is recommended to have more than five percent of the partition free.
[ warning ] Check Disk Usage: /snap/gnome-3-34-1804/77 is 100.00 percent full.
It is recommended to have more than five percent of the partition free.
[ warning ] Check Disk Usage: /snap/gnome-3-34-1804/24 is 100.00 percent full.
It is recommended to have more than five percent of the partition free.
[ success ] Check Disk Usage: /home usage ok.
[ warning ] Check Disk Usage: /snap/snapd/15534 is 100.00 percent full.
It is recommended to have more than five percent of the partition free.
[ warning ] Check Disk Usage: /snap/core20/1434 is 100.00 percent full.
It is recommended to have more than five percent of the partition free.
[ warning ] Check Disk Usage: /snap/chromium/1973 is 100.00 percent full.
It is recommended to have more than five percent of the partition free.
[ success ] Parse Configuration
[ warning ] Check Telemetry: Telemetry is using default configuration
By default only Prometheus and JSON metrics are available. Ignore this warning if you are using telemetry or are using these metrics and are
satisfied with the default retention time and gauge period.
[ failure ] Check Storage: Diagnose could not initialize storage backend.
[ failure ] Create Storage Backend: Error initializing storage of type raft: failed to create fsm: failed to open bolt file: open
/opt/vault/raft/vault.db: permission denied
I have deleted the previous Vault and get new Vault running from scratch to start the migration again without sudo. I just don’t get it, the file and directories were all owned by vault. Still, migration isn’t working.