Vault

Vault Troubleshooting: Common Failures and Fixes (Ops-Focused + Exam Prep)

2026-04-19
NicheeLab Editorial Team

This article catalogs the failures you actually run into when operating Vault, paired with patterns that lead you to the root cause as quickly as possible. It follows the official documentation's baseline behavior and focuses on concepts and commands that hold up across environment and version differences.

It also covers themes that appear frequently on HashiCorp certifications (Security Automation / Vault) — health endpoint return codes, redirects under HA, token/lease constraints, and Raft quorum and snapshots — phrased the way the exam tends to ask about them.

Start by Triaging Symptoms by Layer

Vault failures are easiest to debug when you split them into five layers: client (CLI/SDK), network/TLS, Vault server (init/seal/state), storage/HA (Raft/Consul), and auth/policy/secrets. Pin a working hypothesis on which layer is failing first, then drill down.

At minimum, check server state (initialized/sealed/standby/active), API reachability, load balancer health, and major log errors (panic, permission denied, context deadline exceeded), all on a single timeline. Mis-set environment variables (VAULT_ADDR, VAULT_TOKEN, VAULT_CACERT, etc.) are an extremely common cause.

  • Check server state using both vault status and /v1/sys/health
  • Verify CLI environment variables and certificate bundles (VAULT_ADDR/VAULT_NAMESPACE/VAULT_CACERT)
  • Compare LB-routed calls vs. direct node calls (note which reproduces the failure)
  • Read server logs (systemd/journal) and audit logs separately
  • Confirm clock sync (NTP) and free disk space as your very first checks

Initial diagnostic commands (connectivity, state, environment)

export VAULT_ADDR="https://vault.example.com:8200"
export VAULT_CACERT="/etc/ssl/certs/vault-ca.pem"

# サーバ状態(CLI)
vault status

# ヘルスエンドポイント(LB経由とノード直打ちを比較)
curl -sS --cacert "$VAULT_CACERT" "$VAULT_ADDR/v1/sys/health"

# 環境確認
env | grep -E "^VAULT_|^HTTPS?_" | sort

# サーバログ(systemd)
sudo journalctl -u vault -n 200 --no-pager

# ポート疎通(FW/LB確認)
nc -vz vault.example.com 8200 || true

When Startup, Init, or Unseal Goes Wrong

Misjudging whether the cluster is initialized leads you down the wrong path. Use /v1/sys/init to confirm the initialized boolean, and never re-init an already-initialized cluster. Shamir unseal requires threshold key shares from the same cluster — mixing keys from a different cluster is a classic incident.

Auto-unseal (KMS, etc.) failures are usually caused by insufficient KMS permissions, network unreachability, or misconfigured seal block type/parameters in vault config. KMS errors show up verbatim in audit and server logs, so check there first. Startup loops can also be triggered when an audit device output destination is not writable.

  • Run operator init only if uninitialized — never re-init an already-initialized cluster
  • For Shamir unseal, gather threshold key shares from the correct cluster
  • For auto-unseal, verify the seal { type = "awskms" | "gcpckms" | "azurekeyvault" | HSM } config, permissions, and connectivity
  • Watch out for startup failures caused by audit device (file/socket) destinations with bad permissions or no space
  • Avoid the file storage backend outside dev use — production should default to Integrated Storage (Raft) or Consul

Checking init state and performing unseal

# 初期化状態の確認(真に未初期化かを確認)
curl -sS --cacert "$VAULT_CACERT" "$VAULT_ADDR/v1/sys/init" | jq .

# 初期化(未初期化時のみ。shares/threshold は運用基準で設計)
# 出力される Unseal Keys と Initial Root Token は安全に分割保管
vault operator init \
  -key-shares=5 \
  -key-threshold=3 \
  -format=json > /secure/offline/vault-init.json

# Shamir での Unseal(threshold 回実行)
vault operator unseal

# Auto-unseal 利用時はログで KMS 側の失敗を確認(例)
sudo journalctl -u vault -n 200 --no-pager | grep -i -E "kms|seal|unseal|permission|denied"

Typical Storage / HA / Integrated Storage (Raft) Failures

Raft requires majority quorum. If node failures or network partitions prevent leader election, the whole cluster stalls. Start with list-peers and autopilot to see voting status, the leader, and replication lag.

Disk pressure is the most common failure. Take and retain snapshots on a schedule, with operations ready to restore on demand. TLS/hostname mismatches and misconfigured api_addr/cluster_addr are also major causes of forwarding and redirect failures.

  • Use vault operator raft list-peers to verify leader and voting rights
  • Check autopilot state and remediation suggestions; consider evicting nodes with large lag
  • Pre-validate snapshot save/restore procedures, set up storage destinations, and quantify recovery RTO
  • Monitor NTP-based time sync, free disk space, and free inodes
  • api_addr must be reachable from clients; cluster_addr must be correctly set for node-to-node communication

Investigating Raft and operating snapshots

# ピア状況とオートパイロット
vault operator raft list-peers -format=json | jq .
vault operator raft autopilot get -format=json | jq .

# スナップショットの取得(定期バックアップに組み込む)
vault operator raft snapshot save /backup/vault-$(date +%F).snap

# リストア(検証環境で手順を必ず確認)
# vault operator raft snapshot restore /backup/vault-YYYY-MM-DD.snap

# ディスク確認
df -h /var/lib/vault
inode=$(df -i /var/lib/vault | awk 'NR==2{print $4}') && echo "free inodes: $inode"

Request Routing and Health Check Essentials (Behind a Load Balancer)

When you front an HA cluster with a load balancer, api_addr must be resolvable and reachable from clients, and standby nodes must be able to forward/redirect to the active node correctly. cluster_addr is used for inter-node communication.

The health endpoint returns different status codes per state. By default: 200 for active, 429 for standby, 503 for sealed, 501 for uninitialized. If you want LB health checks to also pass standby nodes, use standbyok=true and adjust the return codes via query parameters as needed.

  • Use /v1/sys/health?standbyok=true (etc.) for LB health checks
  • Set api_addr to a per-node externally reachable address (so 3xx redirects / forward targets from the LB are reachable)
  • Include the LB name, node names, IPs, and any other required identifiers in the certificate SANs
  • If using performance standbys, also consider perfstandbyok=true

Vault request flow (HA + LB)

200 OK429 / forwardcluster_addrClientLoad BalancerActive VaultStandby VaultRaft Log(Storage)

Practical health endpoint examples

# アクティブ/スタンバイをともに正常とみなす(LB 側で 200 を期待)
curl -sS --cacert "$VAULT_CACERT" \
  "$VAULT_ADDR/v1/sys/health?standbyok=true&perfstandbyok=true" | jq .

# 状態別コードを明示指定(必要に応じて)
# 例: アクティブ200、スタンバイ200、シールド503、未初期化501
curl -sS --cacert "$VAULT_CACERT" \
  "$VAULT_ADDR/v1/sys/health?standbyok=true&activecode=200&standbycode=200&sealedcode=503&uninitcode=501" -o /dev/null -w "%{http_code}\n"

Fixing Auth, Token, and Lease Renewal Failures Quickly

For token TTLs, the issuance TTL must not exceed the mount's max_ttl, and the token itself must be renewable. Periodic tokens are exempt from max_ttl but require explicit renewal. When renewal fails, the lease/token is most likely either not renewable or attempting to exceed an upper TTL limit.

OIDC/JWT auth failures classically come from audience, iss, or bound_claims mismatches, or clock drift. For permission denied caused by missing policies, the fastest check is to inspect the target path with token capabilities. Lease renew/revoke for dynamic secrets (databases, etc.) often fails on network or backend permissions, so correlate with engine-side logs.

  • Use vault token lookup and token capabilities to get the facts
  • When renewal fails, check max_ttl/explicit_max_ttl and the renewable flag
  • For OIDC/JWT, first verify NTP clock sync and claim matching
  • For dynamic secrets, check both the role's ttl/max_ttl and DB-side permissions

Token / lease investigation examples

# トークンの属性確認
vault token lookup $VAULT_TOKEN

# 対象パスの実効権限を確認(permission denied の切り分け)
vault token capabilities $VAULT_TOKEN secret/data/app/config

# リースの一覧と更新(更新不可ならエラーに)
vault list sys/leases/lookup/database/creds/app-role || true
vault lease renew <lease_id>

# マウントやロールの TTL 設定確認
vault read sys/mounts | jq '.data'
# 例: KV の場合はバージョンとパスに注意(kv-v2 は data/ パス)

Common Error Message Cheat Sheet (Cause and Immediate Response)

Common production log messages mapped to their causes, what to check, and commands you can use immediately. The golden rule: pin down a reproducer first, then compare LB-routed vs. direct node calls and with/without TLS.

  • Stitch logs on a single timeline and correlate client side, server side, and audit logs
  • Mismatches between certificate SANs and api_addr/cluster_addr are very frequent
Symptom / Log excerptMain causeWhere to checkRepresentative command
Vault is sealedNot unsealed / Auto-unseal failure/v1/sys/health, server logs, seal configvault status; journalctl -u vault
permission deniedInsufficient policy / wrong pathtoken capabilities, policiesvault token capabilities <token> <path>
context deadline exceededNetwork outage / redirect target unreachableLB vs. direct node comparison, api_addr reachabilitycurl /v1/sys/health; ping/trace
request forwarding failedapi_addr unreachable / certificate SAN mismatchEach node's api_addr and certificatevault status (against each node directly)
cluster leader not foundRaft election unfinished / quorum not metraft list-peers, autopilot, node livenessvault operator raft list-peers
x509: certificate signed by unknown authorityCA not configured / not trustedVAULT_CACERT / system CA, root certificatecurl --cacert <ca.pem> ...

Pulling diagnostic keywords from logs (example)

sudo journalctl -u vault -S "-5min" | grep -i -E \
  "sealed|unseal|forward|leader|raft|denied|deadline|certificate|x509" -n

Check Your Understanding

Ops

問題 1

You operate Vault as an HA cluster with a load balancer in front. Which setting is most appropriate for letting standby nodes also pass the health check?

  1. Use /v1/sys/health?standbyok=true (and perfstandbyok=true if needed) for the LB health check, and treat 200 as healthy
  2. Set api_addr to the same VIP on every node so the LB always forwards to the active node
  3. Configure Vault to forcibly promote standby to active so that standby nodes pass the health check
  4. Use only /v1/sys/leader for health checks and treat any 200 response as healthy

正解: A

The health endpoint returns 429 by default for standby nodes, so to make standby pass the LB health check you add standbyok=true (and perfstandbyok=true if needed). api_addr should be a per-node reachable value — setting the same VIP on every node is wrong. Forcibly promoting standby to active is neither necessary nor appropriate. /v1/sys/leader has a different purpose and is insufficient as a standalone LB health check.

Frequently Asked Questions

Is a 429 from sys/health a failure? Can standby nodes return 200?

429 is the default behavior and indicates standby state; it is not a failure. If you want load balancers to treat standby as healthy, use /v1/sys/health?standbyok=true (and perfstandbyok=true for performance standbys), and explicitly override status codes via query parameters if needed.

How often should you take Integrated Storage (Raft) snapshots?

It depends on change volume and your RPO/RTO, but at least daily (every few hours in critical environments) is recommended, with generational retention and cross-region storage. Rehearse both backup and restore procedures regularly in a staging environment, and prepare runbooks for disk pressure scenarios (rotating old snapshots).

What are the keys to safely migrating from Shamir to Auto-unseal?

Perform the migration during a maintenance window after pre-validating the seal block configuration, KMS permissions, and connectivity. Before migrating, take a Raft snapshot, enable audit logging, and prepare a rollback procedure (reverting to the old configuration). After migration, verify auto-unseal via vault status and a restart test.

Check what you learned with practice questions

Practice with certification-focused question sets

無料で問題を解いてみる
Author

NicheeLab Editorial Team

NicheeLab editorial team focused on data engineering and cloud certification learning. Content is structured around practical study needs and official exam domains.


Related articles
Vault

Vault Core Concepts: Sealed/Unsealed, Auth, Secrets (2026)

Vault fundamentals — sealed/unsealed state, auth methods, se...

Vault

Vault Operations Professional (VOP-003): Complete Guide (2026)

Pass the Vault Operations Professional exam — enterprise pat...

Vault

Vault Path-Based Routing: API URL Structure (2026)

How Vault's path-based routing works — mount points, sub-pat...

Vault

Vault Tokens: Auth Token Mechanics (2026)

Token fundamentals — service vs. batch tokens, accessor, ren...

Vault

Vault Token Types: Service, Batch, Periodic (2026)

Service vs. batch tokens compared — performance, ACL behavio...

Browse all Vault articles (101)
© 2026 NicheeLab All rights reserved.