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

Prometheus 2.2.1 fails to parse certificate probably due to Go version. #3983

Closed
ffilippopoulos opened this Issue Mar 19, 2018 · 8 comments

Comments

Projects
None yet
5 participants
@ffilippopoulos
Copy link

ffilippopoulos commented Mar 19, 2018

What did you do?
Upgraded for prometheus version from 2.1.0 to 2.2.1 on kubernetes cluster.

What did you expect to see?

Expected to see prometheus being able to identify and scrape all kubernetes targets since configuration was not changed.

What did you see instead? Under which circumstances?

Prometheus was unable to see anything related to kubernetes, as it was failing to parse the certificate coming from master.

Environment

level=error ts=2018-03-19T11:14:16.374707313Z caller=main.go:216 component=k8s_client_runtime err="github.com/prometheus/prometheus/discovery/kubernetes/kubernetes.go:354: Failed to list *v1.Node: Get https://10.3.0.1:443/api/v1/nodes?resourceVersion=0: tls: failed to parse certificate from server: x509: cannot parse dnsName \"x.x.x.x.x.x.\""

That should be happening because the address on my certificate contains a trailing dot (coming from aws that way and is compatible with specs about dns names).
Looks like this is a Golang related issue and a fix from their side is planned here: kubernetes/client-go#371, but I assumed that it should be tracked by prometheus as well as it is breaking functionality.

@dannyk81

This comment has been minimized.

Copy link

dannyk81 commented Mar 19, 2018

I've encountered the same issue, this is indeed due to the way tls works in Go 1.10.

Fortunately, golang/go@4b1d704 was merged into Golang master (details golang/go#23711) and I was able to build Prometheus using Go built from master.

This solved the issue for me.

@george-angel

This comment has been minimized.

Copy link

george-angel commented Mar 20, 2018

We would like to abstain from creating a custom Prometheus image and managing it, any chance of a patch release to fix this?

@brian-brazil

This comment has been minimized.

Copy link
Member

brian-brazil commented Mar 20, 2018

I'm not sure it's wise to start doing releases with development versions of Go, so we should wait until Go releases this.

@dannyk81

This comment has been minimized.

Copy link

dannyk81 commented Mar 20, 2018

💯 I just wanted to confirm that this is fixed in Go, but not released yet.

@dannyk81

This comment has been minimized.

Copy link

dannyk81 commented Mar 29, 2018

@beorn7

This comment has been minimized.

Copy link
Member

beorn7 commented Apr 30, 2018

As we are using go1.10.1 for new builds, can we consider this fixed?

@brian-brazil

This comment has been minimized.

Copy link
Member

brian-brazil commented Apr 30, 2018

Yip. Whatever we release next will have the fix.

@lock

This comment has been minimized.

Copy link

lock bot commented Mar 22, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Mar 22, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.