Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reconcile unable to talk with Consul backend: error="service registration failed #4852

Closed
subba7032 opened this issue Jun 28, 2018 · 3 comments

Comments

@subba7032
Copy link

I'm running vault-server docker image and consul-client image on the same machine and trying to connect to consul-server through consul client.(consul client is able to talk to consul server)
Vault.hcl
ui = true
listener "tcp" {
address = "0.0.0.0:8200"
cluster_address = "111.111.111.111:8201"
tls_disable = "true"
}
storage "consul" {
address = "127.0.0.1:8500"
path = "vault/"
scheme = "https"
}
api_addr = "http://111.111.111.111:8200"
cluster_addr = "https://111.111.111.111:8201"

Consul Client config.json
{
"server": false,
"bind_addr": "111.111.111.111",
"client_addr":"127.0.0.1",
"datacenter": "IPC2",
"encrypt": "2um/Jn8NI0gTTPyk)8GY7g==",
"log_level": "INFO",
"node_name": "consul_c1_vault_50514",
"enable_debug": true,
"retry_join": ["50504.abc.xyz.com","50505.abc.xyz.com","50506.abc.xyz.com"],
"ca_file": "/consul/config/ssl/ca-bundle.crt",
"cert_file": "/consul/config/ssl/consul-cert.pem",
"key_file": "/consul/config/ssl/consul-key.key",
"verify_incoming": true,
"verify_outgoing": true,
"ports": {
"http": 8500,
"https": 8501
}
}

Error Log
2018-06-28T23:28:53.679Z [WARN ] storage.consul: reconcile unable to talk with Consul backend: error="service registration failed: Put https://127.0.0.1:8500/v1/agent/service/register: http: server gave HTTP response to HTTPS client"
2018-06-28T23:28:54.659Z [WARN ] storage.consul: check unable to talk with Consul backend: error="Put https://127.0.0.1:8500/v1/agent/check/fail/vault:10.17.82.222:8200:vault-sealed-check?note=Vault+Sealed: http: server gave HTTP response to HTTPS client"
2018-06-28T23:28:54.681Z [WARN ] storage.consul: reconcile unable to talk with Consul backend: error="service registration failed: Put https://127.0.0.1:8500/v1/agent/service/register: http: server gave HTTP response to HTTPS client"
2018-06-28T23:28:55.660Z [WARN ] storage.consul: check unable to talk with Consul backend: error="Put https://127.0.0.1:8500/v1/agent/check/fail/vault:10.17.82.222:8200:vault-sealed-check?note=Vault+Sealed: http: server gave HTTP response to HTTPS client"

@chrishoffman
Copy link
Contributor

Your Consul config has the https port set to 8501 and the http port set to 8500. Changing your port should fix this problem.

@subba7032
Copy link
Author

Can i get some more details on how to solve it, thanks!

@reegz
Copy link

reegz commented Jul 16, 2018

You need to change your Vault.hcl to reference the HTTPS port.

storage "consul" {
address = "127.0.0.1:8501"
path = "vault/"
scheme = "https"
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants