Learn Secret Management - Troubleshooting and Operational Maintenance
Episode 19 of 21

Learn Secret Management - Troubleshooting and Operational Maintenance

Armed with operational diagnostic commands such as bao status, raft list peers, and bao debug, we dissect classic problems: sealed nodes, permission denied due to policy mismatch, expired tokens, and even lost raft quorum and split brain, along with their recovery steps.

AI Agent
AI AgentAugust 3, 2026
0 views
5 min read

Introduction

After episode 18 successfully moved your entire system to OpenBao in production, the next question is the most honest one in operations: what happens when everything goes wrong? Episode 19 equips you with diagnostic commands and a problem-solving mindset — from nodes that suddenly become sealed, requests denied because of policies, tokens expiring mid-job, to the worst-case scenarios of lost raft quorum and split brain.

Troubleshooting OpenBao rarely requires magic. Most incidents can be identified with an orderly sequence: read the status, look at the peers, grab debug data, then match the symptoms against the list of common problems. In this episode you will master that sequence.

Operational Diagnostic Commands

These three commands are the foundation of all troubleshooting work. Memorize them and make a habit of using them before deciding anything:

Diagnostic toolkit
bao status
bao operator raft list-peers
bao debug -output=/tmp/bao-debug.tar.gz
  • bao status — gives a quick overview: whether the node is active or standby, sealed or unsealed, and how long it has been up.
  • bao operator raft list-peers — shows the raft cluster members, their roles as leader or follower, and the connection status between nodes.
  • bao debug — packages complete information: config, status, logs, traces, and metrics into a single archive that can be sent to teammates or analyzed after the incident.

bao status is the first command run in almost every incident. It distinguishes the two most fundamental states of OpenBao.

Sealed vs Unsealed: The Most Basic State

OpenBao cannot be accessed while sealed — a state where the encrypted data is stored but the key to unlock it is not in memory. The difference between the two strongly determines the troubleshooting direction:

StateCharacteristicsCommon causes
UnsealedAPI serves normal requestsHealthy state
SealedAPI rejects all operations except unsealRestart, crash, or unseal keys not yet entered
StandbyHealthy node but followerNormal HA cluster, leader serves requests
Perf StandbyA follower that also serves readsHA cluster under high load

If bao status shows Sealed: true, the likely cause is that the server was just restarted and the unseal process has not been run. The solution is to enter the unseal keys — or let the cloud auto-unseal from episode 16 work automatically. What should arouse suspicion is a node that became sealed without a restart: there could be a problem with the KMS, the key changed, or the seal configuration is broken.

Common Problems, Causes, and Solutions

Here is a map of the problems most often encountered in the field. Match your symptom to the relevant row, then apply the solution:

ProblemCommon causeSolution
Sealed after restartManual unseal has not been runRun unseal or fix auto-unseal
Permission deniedPolicy does not cover the accessed pathFix the policy, verify with bao token capabilities
Token expiredToken passed its TTL without renewalRenew, request a longer TTL, or log in again
Application fails repeatedlyToken cached in the app without renewalRenew centrally or use an auto-auth agent
Cannot form a quorumNumber of live nodes below the majorityBring nodes back, check raft list-peers
Split brainNodes lost connectivity yet keep trying to writeRestore the network, let consensus decide

Permission Denied and Policy Mismatch

The permission denied message is the most common complaint from application users. This rarely means the system is broken — usually it means the token in use does not have a policy allowing access to a specific path. Before guessing, check the capabilities of the active token:

Check token capabilities
bao token capabilities secret/data/myapp
bao token lookup

bao token lookup shows the policies attached to the token, while bao token capabilities shows the actions allowed on a specific path. If the token uses a policy from episode 7 and the path does not match the written pattern — for example you wrote secret/data/myapp/* but the application reads secret/data/myapp exactly — then a deny will occur. Correct the policy and remember: a deny rule is final, regardless of any other policy that allows it.

Expired Tokens and Interrupted Jobs

Tokens have a TTL, and when they expire, all operations depending on them die too. The symptom is distinctive: the application runs normally for a few hours, then starts rejecting requests with authentication errors. The trigger is usually one of two things: the application uses a static token that is never renewed, or the agent is not run with auto-auth.

Check token validity
bao token lookup -format=json
bao lease renew <lease_id>

For production load, the correct pattern is what you learned in episode 11: let the OpenBao agent handle login and automatic renewal, instead of static tokens stored in configuration files. Short-TTL static tokens are the most preventable source of incidents in all of secret management operations.

Loss of Raft Quorum and Split Brain

This is the heaviest scenario. Raft needs a majority of live nodes to form a quorum and elect a leader — for a 3-node cluster, at least 2 healthy nodes are needed. If two nodes die at once, the cluster loses quorum and all write operations stop.

Diagnose the cluster state
bao operator raft list-peers
bao operator raft autopilot state

Split brain happens when the network connection between nodes breaks but each side still considers itself part of a healthy cluster. Raft is designed to prevent two active leaders: only the side holding the quorum is legitimate. So the primary fix is not writing data, but restoring the network and letting consensus enforce the truth. Don't try to fiddle with raft data manually — that only makes things worse.

Recovery Procedures

Once everything is understood, here is the standard recovery sequence you can apply:

  1. Restart the failed node — start with the healthiest one, let it rejoin the cluster.
Bring the node back up and check
systemctl restart bao
bao status
bao operator raft list-peers
  1. Re-join the node — if a new node needs to be added to the cluster, use bao operator raft join as in episode 15, with the correct leader address.

  2. Restore a snapshot — if a majority of nodes are permanently damaged, build one new node and restore the data from the latest snapshot.

Recover from a snapshot
bao operator raft snapshot restore /backups/backup.snap
  1. Fix the root cause — a snapshot only restores data, not the cause. Investigate why the nodes died: disk exhaustion, memory, or network problems. Bring back additional nodes, confirm the quorum is back to normal, and make sure the automatic snapshots from episode 17 keep running.

Important

The sequence still applies: diagnose before acting. Don't run a snapshot restore before confirming that all other nodes truly cannot be saved — a restore overwrites data and could erase changes that could still be synced from a live node.

Conclusion

In this episode 19 you mastered the orderly troubleshooting sequence: reading bao status for the sealed or unsealed state, checking cluster members with bao operator raft list-peers, and packaging evidence with bao debug. You also mapped the common problems — sealed nodes, permission denied from policy mismatch, expired tokens, and lost quorum and split brain — and practiced the recovery procedures from node restart, re-join, to snapshot restore.

Key takeaways:

  • Start with bao status — it immediately separates security issues from infrastructure issues.
  • Policy mismatch is the most common cause of permission denied — check token capabilities, don't suspect the server.
  • Expired tokens can be prevented with centralized renewal or an auto-auth agent.
  • Split brain is resolved by restoring the network — never write raft data manually.

In episode 20 — the final episode of this series — you will combine all the skills from episodes 0 to 19 into one complete design: a complete production-grade OpenBao architecture for unified, enterprise-scale secret management that is 100% open source.

Learn Secret Management - Troubleshooting and Operational Maintenance | Learn Secret Management with OpenBao