Hi,
I have initialized vault with a basic consul backend. This is my vault config:
backend "consul" {
path = "vault/"
scheme = "http"
token = "consul-write-acl-token"
}
listener "tcp" {
tls_disable = 1
}
disable_mlock = true
I have a consul server and two agents running, and the 'vault server config ' command starts the server,
i set the VAULT_ADDR to '
http://127.0.0.1:8200' to avoid the https conflict, but when i try to 'vault init', this is the log output:
core: security barrier not initialized
core: failed to write seal configuration error=Unexpected response code: 403 (Permission denied)
core: failed to save barrier configuration error=failed to write seal configuration: Unexpected response code: 403 (Permission denied)
I can then use 'vault status' to get this:
Node 1:
$ vault status
2016/12/19 11:51:57.023423 [INFO ] core: seal configuration missing, not initialized
Error checking seal status: Error making API request.
Code: 400. Errors:
* server is not yet initialized
If i try vault init, i get this:
$ vault init
2016/12/19 11:54:50.581163 [INFO ] core: security barrier not initialized
2016/12/19 11:54:50.581849 [ERROR] core: failed to write seal configuration: err or=Unexpected response code: 403 (rpc error: rpc error: Permission denied)
2016/12/19 11:54:50.581882 [ERROR] core: failed to save barrier configuration: e rror=failed to write seal configuration: Unexpected response code: 403 (rpc erro r: rpc error: Permission denied)
Error initializing Vault: Error making API request.
Code: 400. Errors:
* barrier configuration saving failed: failed to write seal configuration: Unexpected response code: 403 (rpc error: rpc error: Permission denied)
Node 2:
$ vault status
Sealed: false
Key Shares: 5
Key Threshold: 3
Unseal Progress: 0
Version: 0.6.2
Cluster Name: vault-cluster-3e7ad5c3
Cluster ID: 33ad5d4d-7277-3edf-5d14-7bc4b2716ef1
High-Availability Enabled: true
Mode: standby
Leader: <none>
Question:
The Node 1 was earlier acting as active leader and it was all fine. Suddenly, i see both are in standby. I tried restarting vault server on lx1394, now it shows as uninitialized.
How do i resolve this and make one of these nodes a leader.
Really confused, appreciate all your help, thanks!