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.

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.
These three commands are the foundation of all troubleshooting work. Memorize them and make a habit of using them before deciding anything:
bao status
bao operator raft list-peers
bao debug -output=/tmp/bao-debug.tar.gzbao 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.
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:
| State | Characteristics | Common causes |
|---|---|---|
| Unsealed | API serves normal requests | Healthy state |
| Sealed | API rejects all operations except unseal | Restart, crash, or unseal keys not yet entered |
| Standby | Healthy node but follower | Normal HA cluster, leader serves requests |
| Perf Standby | A follower that also serves reads | HA 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.
Here is a map of the problems most often encountered in the field. Match your symptom to the relevant row, then apply the solution:
| Problem | Common cause | Solution |
|---|---|---|
| Sealed after restart | Manual unseal has not been run | Run unseal or fix auto-unseal |
| Permission denied | Policy does not cover the accessed path | Fix the policy, verify with bao token capabilities |
| Token expired | Token passed its TTL without renewal | Renew, request a longer TTL, or log in again |
| Application fails repeatedly | Token cached in the app without renewal | Renew centrally or use an auto-auth agent |
| Cannot form a quorum | Number of live nodes below the majority | Bring nodes back, check raft list-peers |
| Split brain | Nodes lost connectivity yet keep trying to write | Restore the network, let consensus decide |
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:
bao token capabilities secret/data/myapp
bao token lookupbao 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.
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.
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.
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.
bao operator raft list-peers
bao operator raft autopilot stateSplit 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.
Once everything is understood, here is the standard recovery sequence you can apply:
systemctl restart bao
bao status
bao operator raft list-peersRe-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.
Restore a snapshot — if a majority of nodes are permanently damaged, build one new node and restore the data from the latest snapshot.
bao operator raft snapshot restore /backups/backup.snapImportant
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.
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:
bao status — it immediately separates security issues from infrastructure issues.token capabilities, don't suspect the server.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.