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

Read endpoint for grafana5 throws invalid memory address or nil pointer dereference #4240

Closed
ximply opened this Issue Jun 8, 2018 · 8 comments

Comments

Projects
None yet
3 participants
@ximply
Copy link

ximply commented Jun 8, 2018

Prometheus 2.3 (and 2.2.1 is ok) use as a read endpoint for grafana5 will throw a error like this:

level=error ts=2018-06-08T02:39:50.80339667Z caller=stdlib.go:89 component=web caller="http: panic serving 192.168.10.176:31525" msg="runtime error: invalid memory address or nil pointer dereference"

192.168.10.176 is the grafana server

@brian-brazil

This comment has been minimized.

Copy link
Member

brian-brazil commented Jun 8, 2018

Can you clarify what you mean by "read endpoint"? Which URL is Grafana hitting?

@ximply

This comment has been minimized.

Copy link
Author

ximply commented Jun 8, 2018

Sorroy, read enpoint is remote read endpoint.

The setting of grafana datasource for prometheus:
the HTTP URL is http://192.168.10.248:8080
the HTTP Access is proxy

@ximply

This comment has been minimized.

Copy link
Author

ximply commented Jun 8, 2018

Here are the settings:
default

@brian-brazil

This comment has been minimized.

Copy link
Member

brian-brazil commented Jun 8, 2018

Grafana doesn't use the remote read endpoint. Can you capture the HTTP request in question?

@ximply

This comment has been minimized.

Copy link
Author

ximply commented Jun 8, 2018

But I use Prometheus 2.2.1, it is ok.

@y2sarakawa

This comment has been minimized.

Copy link

y2sarakawa commented Jun 10, 2018

Grafana 5 accesses the Prometheus /series endpoint when referring to variables.

If more than one entry is in remote_read, nil is passed to "p * storage.SelectParams" in ToQuery () of storage/remote/codec.go.

After merging #4122, nil pointer dereference will occur to refer to "p" when creating ReadHints in ToQuery ().
https://github.com/prometheus/prometheus/blob/v2.3.0/storage/remote/codec.go#L96

Please also see #4205.

@brian-brazil

This comment has been minimized.

Copy link
Member

brian-brazil commented Jun 13, 2018

Looks like a dupe of #4205 alright.

@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.