You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Well, this is odd. We've been runing 0.3.0 for a while on Kubernetes. Then I wanted to test a newer logcli (which has added --from and --to), and that returned 404. So I thought, fine, I guess I can't use a newer logcli with 0.3.0, and I reverted. But now all queries are returning 404.
The server is running happily (see log below). But:
$ curl http://loki.ops.svc.cluster.local:3100/loki/api/v1/query_range?query=%7Bapp%3D%22test%22%2Cnamespace%3D%22staging%22%7D&limit=30&start=1569602403782397228&end=1569606003782397228&direction=FORWARD
HTTP/1.1 404 Not Found
Content-Type: text/plain; charset=utf-8
X-Content-Type-Options: nosniff
Date: Fri, 27 Sep 2019 17:39:11 GMT
Content-Length: 19
404 page not found
Or for that matter: logcli --addr http://loki.ops.svc.cluster.local:3100 query --forward '{app="test",namespace="staging"}'.
Other endpoints, like /ready, /metrics, /api/prom/query and the push endpoints work fine. Promtail seems to work fine pushing logs to Loki.
From looking at the code, the only possible way that Loki can return 404 is if the HTTP handler isn't mounted. I don't see how it couldn't be. There are no explicit 404 or http.StatusCodeNotFound writes in the code.
Environment:
Infrastructure: Kubernetes
Deployment tool: Helm
Screenshots, promtail config, or terminal output
If applicable, add any output to help explain your problem.
The /loki/api/v1/query_range is a new endpoint that is currently supported by the tip of master, but has not yet been cut in a release. It was added here:
Thanks, it looks like I goofed when building logcli.
In my Dockerfile I was doing git clone --depth=1, then git reset --hard v0.3.0. But if you do --depth=1, you don't get the older commits, obviously, but also git reset doesn't complain about the non-existent commit!
So every time I built it, I was actually building logcli from the tip of the master. Too subtle. 😞
Describe the bug
Well, this is odd. We've been runing 0.3.0 for a while on Kubernetes. Then I wanted to test a newer
logcli
(which has added--from
and--to
), and that returned 404. So I thought, fine, I guess I can't use a newerlogcli
with 0.3.0, and I reverted. But now all queries are returning 404.The server is running happily (see log below). But:
Or for that matter:
logcli --addr http://loki.ops.svc.cluster.local:3100 query --forward '{app="test",namespace="staging"}'
.The log (debug enabled):
Other endpoints, like
/ready
,/metrics
,/api/prom/query
and the push endpoints work fine. Promtail seems to work fine pushing logs to Loki.From looking at the code, the only possible way that Loki can return 404 is if the HTTP handler isn't mounted. I don't see how it couldn't be. There are no explicit
404
orhttp.StatusCodeNotFound
writes in the code.Environment:
Screenshots, promtail config, or terminal output
If applicable, add any output to help explain your problem.
Server config:
The text was updated successfully, but these errors were encountered: