I am having trouble configuring Vault to use HTTPS. During development, I had been using strictly HTTP, but am now trying to enable HTTPS for testing before going to production. I want to have two listeners configured: One using localhost over HTTP, and one for the server address, using HTTPS.
I am experiencing errors when I try to start the vault:
TLS handshake error from <ip address>:53568: tls: first record does not look like a TLS handshake
Can anyone see what I’m doing wrong? Is this a vault configuration issue, or maybe a certificate issue?
Here is my configuration information:
Environment variable defined :
export VAULT_ADDR="http://127.0.0.1:8200"
Real (not self-signed) Certificates are installed as:
/etc/ssl/certs/vault-itg.zz8.us.crt
/etc/ssl/private/vault-itg.zz8.us.key
I start the vault from a shell script, using the following command line:
nohup vault server -config=config_s3_storage.hcl > $VAULTSTARTLOGFILE 2>&1 &
The contents of my config file (config_s3_storage.hcl) is as follows:
disable_mlock = true
storage "s3" {
bucket = "storage-vault-itg"
region = "us-west-2"
}
listener "tcp" {
address = "127.0.0.1:8200"
tls_disable = 1
}
listener "tcp" {
address = "172.20.209.92:8200"
tls_disable = 0
tls_cert_file = "/etc/ssl/certs/vault-itg.zz8.us.crt"
tls_key_file = "/etc/ssl/private/vault-itg.zz8.us.key"
}
Output received from vault:
==> Vault server configuration:
Cgo: disabled
Listener 1: tcp (addr: "127.0.0.1:8200", cluster address: "127.0.0.1:8201", tls: "disabled")
Listener 2: tcp (addr: "172.20.209.92:8200", cluster address: "172.20.209.92:8201", tls: "enabled")
Log Level: info
Mlock: supported: true, enabled: false
Storage: s3
Version: Vault v0.7.0
Version Sha: 614deacfca3f3b7162bbf30a36d6fc7362cd47f0
==> Vault server started! Log data will stream in below:
2017/05/18 18:27:41 http: TLS handshake error from 172.20.209.92:50698: tls: first record does not look like a TLS handshake
2017/05/18 18:27:41 http: TLS handshake error from 172.20.209.92:50700: tls: first record does not look like a TLS handshake
2017/05/18 18:27:41 http: TLS handshake error from 172.20.209.92:50702: tls: first record does not look like a TLS handshake
2017/05/18 18:27:41 http: TLS handshake error from 172.20.209.92:50708: tls: first record does not look like a TLS handshake
2017/05/18 18:27:41 http: TLS handshake error from 172.20.209.92:50710: tls: first record does not look like a TLS handshake
Note: I still get the same error if I remove the line from the config file: "tls_disable = 0" (from the second tcp listener.)
For reference, here is the contents of the configuration file that I used when I was configuring for HTTPS only:
disable_mlock = true
storage "s3" {
bucket = "storage-vault-itg"
region = "us-west-2"
}
listener "tcp" {
address = "127.0.0.1:8200"
tls_disable = 1
}
listener "tcp" {
address = "172.20.209.92:8200"
tls_disable = 1
}
vault server -config=config_s3_storage.hcl
vault server -config=config_s3_storage.hcl
http: TLS handshake error from 172.20.209.92:36034: tls: first record does not look like a TLS handshake
disable_mlock = true
storage "s3" {
bucket = "storage-vault-itg"
region = "us-west-2"
}
listener "tcp" {
address = "127.0.0.1:8200"
tls_disable = 0
tls_cert_file = "/etc/ssl/certs/vault-itg.zz8.us.crt"
tls_key_file = "/etc/ssl/private/vault-itg.zz8.us.key"
}
listener "tcp" {
address = "172.20.209.92:8200"
tls_disable = 0
tls_cert_file = "/etc/ssl/certs/vault-itg.zz8.us.crt"
tls_key_file = "/etc/ssl/private/vault-itg.zz8.us.key"
}
vault server -config=config_s3_storage.hcl
TLS handshake error from 127.0.0.1:42410: remote error: tls: bad certificate
To unsubscribe from this group and stop receiving emails from it, send an email to vault-tool+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vault-tool/5490a6ce-5026-4d76-9193-e853a59cad6b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.