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
HTTP path-prefix option results to 404 on 2.4.1 #4756
Comments
In addition i can't bind grpc on private network anymore, because frontend tries to connect from 127.0.0.1. Log have errors about eth0 and en0 interfaces, even though i set:
|
I concur that issue exists with Loki 2.4.1 after
auth_enabled: false
server:
http_listen_port: 3100
grpc_listen_port: 9096
http_path_prefix: /loki
common:
path_prefix: /loki
storage:
filesystem:
chunks_directory: /loki/chunks
rules_directory: /loki/rules
replication_factor: 1
ring:
instance_addr: 127.0.0.1
kvstore:
store: inmemory
ingester:
wal:
enabled: true
schema_config:
configs:
- from: 2021-01-01
store: boltdb-shipper
object_store: filesystem
schema: v11
index:
prefix: index_
period: 24h
version: "3.9"
services:
loki:
image: grafana/loki:2.4.1
container_name: loki
command: -config.file=/etc/loki/config.yaml
volumes:
- ./loki.yaml:/etc/loki/config.yaml:ro
ports:
- 3100:3100
networks:
- loki
grafana:
image: grafana/grafana:8.2.5
container_name: grafana
ports:
- 3000:3000
networks:
- loki
networks:
loki:
If |
Loki 2.4.0: Issue also present |
Hi! This issue has been automatically marked as stale because it has not had any We use a stalebot among other tools to help manage the state of issues in this project. Stalebots are also emotionless and cruel and can close issues which are still very relevant. If this issue is important to you, please add a comment to keep it open. More importantly, please add a thumbs-up to the original issue entry. We regularly sort for closed issues which have a We may also:
We are doing our best to respond, organize, and prioritize all issues but it can be a challenging task, |
This issue is still very relevant, a serious regression and a blocker for us. |
This thread saved my a lot of grief, thanks guys. Our local setup binds both loki and grafana to virtual mesh VPN interface and it does work OK under |
@grzegorznowak you need to set |
Hi! This issue has been automatically marked as stale because it has not had any We use a stalebot among other tools to help manage the state of issues in this project. Stalebots are also emotionless and cruel and can close issues which are still very relevant. If this issue is important to you, please add a comment to keep it open. More importantly, please add a thumbs-up to the original issue entry. We regularly sort for closed issues which have a We may also:
We are doing our best to respond, organize, and prioritize all issues but it can be a challenging task, |
The problem is still very relevant and very critical. NOGO on using Loki 2.4+ until its fixed for us. |
In case you were wondering Loki 2.5.0 still has this issue. 😞 |
Stumbled upon the same issue upgrading from 2.2.1 to 2.5.0. As already mentioned it is not really nice to have it behind a reverse proxy like this... Since I'm not into Go I cannot provide a fix for this, unfortunately. |
Same issue too. |
On a related note: grafana 9.0.0 actively strip the path prefix from loki url (see #50939) |
+1 here, we are also facing the same issue, loki 2.6.1 |
I had updated to 2.6.1 to get deletion support, but rolled back to 2.3.0 after hitting #6231 which appears directly related to this. Unfortunately had to delete my v12 index as well at the same time. |
Just tested Loki on my machine and wondered why it just did not work when I wanted to use it in production. I guess I have to use the over a year old version 2.3.0 |
I have confirmed that this bug has not been fixed in v2.7.2. I would love to have this bug fixed as it is a very serious problem for my use of loki. |
**What this PR does / why we need it**: Hi, loki developers. I would like to use the option `http_path_prefix` as described in the official documentation. This setting is valid for endpoints defined at https://github.com/grafana/loki/blob/4d55a24ed3cbed399c189dafb8c4140cbffce21d/pkg/loki/loki.go#L477-L494 but not for the endpoints defined at https://github.com/grafana/loki/blob/4d55a24ed3cbed399c189dafb8c4140cbffce21d/pkg/loki/modules.go#L366-L392 . The current latest version with `http_path_prefix` will return the expected response for the former endpoint, but will return a 404 not found error when accessing the latter endpoint. For example, if you define `http_path_prefix = /xxx`, requests for `/xxx/ready` will work as expected, but requests for `/xxx/loki/api/v1/query` will result in 404 errors. I've created a pull request for this issue because I've been experiencing some inconvenience when using loki. Please check it out. **Which issue(s) this PR fixes**: Fixes #4756 **Special notes for your reviewer**: **Checklist** - [x] Reviewed the [`CONTRIBUTING.md`](https://github.com/grafana/loki/blob/main/CONTRIBUTING.md) guide (**required**) - [x] Tests updated --------- Co-authored-by: Michel Hollands <42814411+MichelHollands@users.noreply.github.com> Co-authored-by: Travis Patterson <travis.patterson@grafana.com>
Still Happening in v2.9.1 Getting 404 in Grafana. |
I have this same issue- manually bisected as described here. |
+1 |
Describe the bug
After update to 2.4.1 i had query errors. During config debugging i tried #4699 (comment) which worked fine until i set server.http_path_prefix="/loki" to match my config.
E.g.
logcli --addr http://localhost:3101/loki query {job=~".+"}
responds with 404.To Reproduce
Steps to reproduce the behavior:
{job=~".+"} term
(note: any query, just i used that one)Expected behavior
Expected to get some lines.
Environment:
-target=all
Screenshots, Promtail config, or terminal output
The text was updated successfully, but these errors were encountered: