Hi,
I already checked some post but I never managed to make my vault network working so here am I asking for your help.
I’m trying to create a vault network using raft storage with 2 vaults nodes.
Here is the config file of my vault both, of my machine have the same config file except taht
storage "raft" {
path = "./vault/data"
node_id = "node1" ( or node 2 for the second vault)
}
listener "tcp"{
address ="0.0.0.0:8200"
tls_disable="true"
}
api_addr = "https://local ip of this machine :8200"
cluster_addr = "https://local ip of this machine :8201"
ui = true
disable_mlock=true
Okay everything is good I do
sudo vault server -config=/etc/vault.d/vault.hcl
on both machine
then I do this on my first node :
export VAULT_ADDR=http://local ip of node 1:8200
then vault operator init
Everything is fine from there then on my second node I do :
export VAULT_ADDR=http://local ip of my second node:8200
vault operator raft join "http://public ip of my first node :8200
( note that vault operator raft join "http://private ip of my first node :8200 )
doesn’t work either I have always this message error :
Error joining the node to the Raft cluster: Error making API request.
URL: POST http://public ip of my first node :8200/v1/sys/storage/raft/join
Code: 500. Errors:
- failed to join raft cluster: failed to join any raft leader node
the logs of the error are :
2022-03-04T14:04:31.978Z [WARN] core: join attempt failed: error="error during raft bootstrap init call: Put \"http://**public ip ofmy first node** :8200/v1/sys/storage/raft/bootstrap/challenge\": dial tcp **public ip of my first node** :8200: i/o timeout"
2022-03-04T14:04:31.978Z [ERROR] core: failed to join raft cluster: error="failed to join any raft leader node"
Do you have any idea about my mistake ?