Consul-Template error failed to parse key PEM data
246 views
Skip to first unread message
Wesley Staples
unread,
Dec 11, 2015, 8:17:46 PM12/11/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Consul
I'm attempting to use consul-template to read from vault however I'm receiving this error:
Consul Template returned errors: runner: crypto/tls: failed to parse key PEM data
my config file looks like this:
vault { address = "https://address:8200" token = "token here" // May also be specified via the envvar VAULT_TOKEN renew = true ssl { enabled = true verify = true cert = "/etc/consul.d/ssl/consul.cert" ca_cert = "/etc/consul.d/ssl/ca.cert" } }
I am able to do a curl request with those certificates so I know they are valid. Does consul-template need the certs key file? if so how do I add it?
Jeff Mitchell
unread,
Jan 8, 2016, 8:51:24 PM1/8/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to consu...@googlegroups.com
Hi Wesley,
It's hard to say what the exact problem is without asking you to
reveal your cert/key file, but it seems like you're providing
certificates (and specifically the associated key) in a way that C-T
doesn't understand. It seems to be trying to read it as PEM, but
perhaps they are in e.g. DER format. You may want to validate that the
cert/key are properly formatted as concatenated PEM blocks.