# Vault operator raft join seems to work, but operator raft list-peers shows only leader

**URL:** <https://discuss.hashicorp.com/t/vault-operator-raft-join-seems-to-work-but-operator-raft-list-peers-shows-only-leader/8617>\
**Category:** Vault\
**Tags:** raft\
**Created:** [May 11, 2020, 2:35pm UTC](https://discuss.hashicorp.com/t/vault-operator-raft-join-seems-to-work-but-operator-raft-list-peers-shows-only-leader/8617 "2020-05-11T14:35:59Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![ttinkr](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/ttinkr/32/6765_2.png) [@ttinkr](https://discuss.hashicorp.com/u/ttinkr)\
**Post date:** [May 11, 2020, 2:35pm UTC](https://discuss.hashicorp.com/t/vault-operator-raft-join-seems-to-work-but-operator-raft-list-peers-shows-only-leader/8617/1 "2020-05-11T14:35:59Z")

</div>

I am using the helm chart to deploy 3 pods to an on-prem k8s cluster. I want to use raft HA so I am using the following config:

```auto
ui = true

listener "tcp" {
    address = "[::]:8200"
    cluster_address = "[::]:8201"
    tls_cert_file = "/vault/userconfig/vault/vault.pem"
    tls_key_file = "/vault/userconfig/vault/vault-key.pem"
    tls_client_ca_file = "/vault/userconfig/vault/vault-ca.pem"
}
storage "raft" {
    path = "/vault/data"
}
service_registration "kubernetes" {}

```

I execute the following commands on the 1st pod and everything seems to work correctly (I am kubetailing all the logs to monitor eventual errors):

```auto
vault operator init
vault operator unseal
vault operator raft list-peers

```

list-peers shows the pod I am connected to as leader…all good so far.

```auto
Node Address State Voter
---- ------- ----- -----
1b50fad0-ccad-8330-672c-62cb8e0d63fe vault-0.vault-internal:8201 leader true

```

Then I connect to the next pod and enter:

```auto
vault operator init
vault operator raft join https://vault-0.vault-internal:8200
vault operator unseal

```

…and raft join outputs:

```auto
Key Value
--- -----
Joined true

```

But when I then connect back to the leader and check the peers again I still see only the leader and not a 2nd node as I would expect:

```auto
/ $ vault operator raft list-peers
Node Address State Voter
---- ------- ----- -----
1b50fad0-ccad-8330-672c-62cb8e0d63fe vault-0.vault-internal:8201 leader true

```

The logs don’t show any error and raft join shows “Joined=true”, but still it seems like the join has not worked.

Any other method I can troubleshoot this?  
Any error in my config somebody sees?

Thanks!

---

<div class="post-metadata">

**Author:** ![nhw76](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/nhw76/32/6652_2.png) [@nhw76](https://discuss.hashicorp.com/u/nhw76)\
**Post date:** [May 11, 2020, 10:12pm UTC](https://discuss.hashicorp.com/t/vault-operator-raft-join-seems-to-work-but-operator-raft-list-peers-shows-only-leader/8617/2 "2020-05-11T22:12:31Z")

</div>

I don’t know why it’s reporting success with the ‘raft join’ but I suspect part of your problem is the ‘init’ on the second pod. You only ‘init’ the initial node in the cluster, the subsequent nodes join the cluster and use the same seal as the initial leader.

---

<div class="post-metadata">

**Author:** ![ttinkr](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/ttinkr/32/6765_2.png) [@ttinkr](https://discuss.hashicorp.com/u/ttinkr)\
**Post date:** [May 12, 2020, 11:31am UTC](https://discuss.hashicorp.com/t/vault-operator-raft-join-seems-to-work-but-operator-raft-list-peers-shows-only-leader/8617/3 "2020-05-12T11:31:57Z")

</div>

Thanks @nhw76!  
Now I only did a init and unseal on the first node and then a raft join on the 2nd node. After this I still don’t see the node in raft list-peers, but when I do an unseal on the 2nd node I finally see it listed as a follower. So far so good.

…but 🙂  
When I check the logs I see the following INFO/WARN/ERROR messages coming from the leader:

```auto
[vault-0] 2020-05-12T11:24:32.373Z [INFO] storage.raft: updating configuration: command=AddStaging server-id=801e9c2c-e2a2-f650-1e8d-c3aed9b361f6 server-addr=vault-1.vault-internal:8201 servers="[{Suffrage:Voter ID:f21d4e79-2597-ebe0-23ee-e8d629f5c327 Address:vault-0.vault-internal:8201} {Suffrage:Voter ID:801e9c2c-e2a2-f650-1e8d-c3aed9b361f6 Address:vault-1.vault-internal:8201}]" 
[vault-0] 2020-05-12T11:24:32.378Z [INFO] storage.raft: added peer, starting replication: peer=801e9c2c-e2a2-f650-1e8d-c3aed9b361f6 
[vault-0] 2020-05-12T11:24:32.380Z [ERROR] storage.raft: failed to appendEntries to: peer="{Voter 801e9c2c-e2a2-f650-1e8d-c3aed9b361f6 vault-1.vault-internal:8201}" error="dial tcp 192.168.2.139:8201: connect: connection refused" 
[vault-0] 2020-05-12T11:24:32.380Z [INFO] system: follower node answered the raft bootstrap challenge: follower_server_id=801e9c2c-e2a2-f650-1e8d-c3aed9b361f6 
[vault-0] 2020-05-12T11:24:32.616Z [WARN] storage.raft: appendEntries rejected, sending older logs: peer="{Voter 801e9c2c-e2a2-f650-1e8d-c3aed9b361f6 vault-1.vault-internal:8201}" next=2 
[vault-0] 2020-05-12T11:24:32.623Z [INFO] storage.raft: pipelining replication: peer="{Voter 801e9c2c-e2a2-f650-1e8d-c3aed9b361f6 vault-1.vault-internal:8201}" 

```

So on the CLI it seems that the cluster is working, but those events still make me nervous. Any ideas?

Thank you!

---

<div class="post-metadata">

**Author:** ![nhw76](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/nhw76/32/6652_2.png) [@nhw76](https://discuss.hashicorp.com/u/nhw76)\
**Post date:** [May 12, 2020, 11:37am UTC](https://discuss.hashicorp.com/t/vault-operator-raft-join-seems-to-work-but-operator-raft-list-peers-shows-only-leader/8617/4 "2020-05-12T11:37:05Z")

</div>

In my experience, there’s a bit of noise immediately after the cluster join while the new follower proves it has unsealed so log replication can start but it settles down quickly.

I think that looks OK.

---

<div class="post-metadata">

**Author:** ![ttinkr](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/ttinkr/32/6765_2.png) [@ttinkr](https://discuss.hashicorp.com/u/ttinkr)\
**Post date:** [May 12, 2020, 11:38am UTC](https://discuss.hashicorp.com/t/vault-operator-raft-join-seems-to-work-but-operator-raft-list-peers-shows-only-leader/8617/5 "2020-05-12T11:38:01Z")

</div>

Great! Thanks so much for the help! Appreciate it! 🙂

---

<div class="post-metadata">

**Author:** ![victorbiga](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/victorbiga/32/8126_2.png) [@victorbiga](https://discuss.hashicorp.com/u/victorbiga)\
**Post date:** [June 19, 2020, 3:18pm UTC](https://discuss.hashicorp.com/t/vault-operator-raft-join-seems-to-work-but-operator-raft-list-peers-shows-only-leader/8617/6 "2020-06-19T15:18:50Z")

</div>

good shout on “settling down”  
totally worked, had to give it a minute and all logs gone quiet. Added KV on leader node, logged in to follower nodes, KV value was replicated almost immediately on others.

Config used:

### /etc/vault.d/vault.hcl

storage “raft” {  
path = “/data/vault.d/raft/”  
node\_id = “[node1.domain.com](http://node1.domain.com)”  
}

listener “tcp” {  
address = “0.0.0.0:8200”  
cluster\_address = “0.0.0.0:8201”  
tls\_disable = false  
tls\_cert\_file = “/etc/vault.d/certs/vaultepcom.pem”  
tls\_key\_file = “/etc/vault.d/certs/vaultepcom.key”  
}

api\_addr = “[https://node1.domain.com:8200](https://node1.domain.com:8200)”  
cluster\_addr = “[https://node1.domain.com:8201](https://node1.domain.com:8201)”  
ui = true

### /etc/systemd/system/vault.service

[Unit]  
Description=a tool for managing secrets  
Documentation=https://vaultproject.io/docs/  
After=network.target  
ConditionFileNotEmpty=/etc/vault.d/vault.hcl

[Service]  
User=vault  
Group=vault  
ExecStart=/usr/local/sbin/vault server -config=/etc/vault.d/vault.hcl  
ExecReload=/usr/local/bin/kill --signal HUP $MAINPID  
CapabilityBoundingSet=CAP\_SYSLOG CAP\_IPC\_LOCK  
Capabilities=CAP\_IPC\_LOCK+ep  
SecureBits=keep-caps  
NoNewPrivileges=yes  
KillSignal=SIGINT

[Install]  
WantedBy=multi-user.target

---

<div class="post-metadata">

**Author:** ![jechols](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/jechols/32/44114_2.png) [@jechols](https://discuss.hashicorp.com/u/jechols)\
**Post date:** [December 10, 2025, 3:04am UTC](https://discuss.hashicorp.com/t/vault-operator-raft-join-seems-to-work-but-operator-raft-list-peers-shows-only-leader/8617/7 "2025-12-10T03:04:03Z")

</div>

I actually had this issue too, also with the helm chart.

> vault operator init  
> vault operator unseal  
> vault operator raft list-peers

I ran this and got the same result as you where the leader was listed as the only item in the cluster. I tried to add the other two nodes, but nothing happened:

> vault operator raft join [https://vault-1.vault-internal:8200](https://vault-1.vault-internal:8200)  
> vault operator raft join [https://vault-2.vault-internal:8200](https://vault-2.vault-internal:8200)  
> vault operator raft list-peers

same result, only the leader.  
The docs say that you should just be able to unseal with the keys from the first pod, but I would get errors saying “vault is not initialized.” But if I ran `vault operator init` it would initialize as a leader of its own cluster and not be able to use the initial pod’s keys.

> Now I only did a init and unseal on the first node and then a raft join on the 2nd node. After this I still don’t see the node in raft list-peers, but when I do an unseal on the 2nd node I finally see it listed as a follower. So far so good.

This part is what did it. I didn’t run `vault operator init` on the subsequent pods, only `vault operator raft join` and then i could finally unseal.

In the end, the command strings looked like:

> helm install vault --namespace vault  
> kubectl -n vault exec -ti vault-0 – vault operator init  
> kubectl -n vault exec -ti vault-0 – vault operator unseal $key1  
> kubectl -n vault exec -ti vault-0 – vault operator unseal $key2  
> kubectl -n vault exec -ti vault-0 – vault operator unseal $key3  
> kubectl -n vault exec -ti vault-0 – vault login $roottoken  
> kubectl -n vault exec -ti vault-0 – vault operator raft join [http://vault-1.vault-internal:8200](http://vault-1.vault-internal:8200)  
> kubectl -n vault exec -ti vault-0 – vault operator raft join [http://vault-2.vault-internal:8200](http://vault-2.vault-internal:8200)  
> kubectl -n vault exec -ti vault-1 – vault operator raft join [http://vault-0.vault-internal:8200](http://vault-0.vault-internal:8200)  
> kubectl -n vault exec -ti vault-2 – vault operator raft join [http://vault-0.vault-internal:8200](http://vault-0.vault-internal:8200)  
> –wait for a bit–  
> kubectl -n vault exec -ti vault-1 – vault operator unseal $key1  
> kubectl -n vault exec -ti vault-2 – vault operator unseal $key1  
> kubectl -n vault exec -ti vault-1 – vault operator unseal $key2  
> kubectl -n vault exec -ti vault-2 – vault operator unseal $key2  
> kubectl -n vault exec -ti vault-1 – vault operator unseal $key3  
> kubectl -n vault exec -ti vault-2 – vault operator unseal $key3  
> –wait a bit more–  
> vault login $roottoken  
> vault operator raft list-peers  
> #profit

I think the `kubectl -n vault exec -ti vault-0 -- vault operator raft join http://vault-1.vault-internal:8200` was unnecessary, but what was hard was realizing that the docs don’t say that the `raft join` command kind of initializes the vault with vault-0 keys.
