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

loki sometimes does not show logs #171

Closed
Morriz opened this issue Oct 20, 2020 · 8 comments
Closed

loki sometimes does not show logs #171

Morriz opened this issue Oct 20, 2020 · 8 comments
Assignees
Labels
bug Something isn't working

Comments

@Morriz
Copy link
Contributor

Morriz commented Oct 20, 2020

Describe the bug A clear and concise description of what the bug is.

Loki sometimes does not show logs, while kubectl shows them fine.

To Reproduce Steps to reproduce the behavior.

I needed to see harbor logs but could not see anything in loki with these labels:

{component="registry"}

(Even though they were suggested!)
But this worked:

kh logs -l component=registry -c registry -f

Expected behavior A clear and concise description of what you expected to happen.

Logs to show for those labels

Additional context Add any other context about the problem here.

It was detected onprem, so we have to check demo after new harbor deployment as well, so we can investigate with same setup, and if it happens there too, we have to deduce wether it is related to harbor. If it was only onprem, we have to find out why (disk usage?).

@githubcdr
Copy link
Contributor

Not to rant here, but I think we should give fluent-bit a test it seems to be more efficient than promtail.

@Morriz
Copy link
Contributor Author

Morriz commented Oct 22, 2020

I prefer the grafana combo as it works together and is documented as such. But if there is a problem in promtail we should file a bug. I would love to know if that is the case. We should check it's logs

@Morriz Morriz added the problem Something seems not right label Oct 27, 2020
@stale
Copy link

stale bot commented Dec 26, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale This issue has been marked stale and is eligible for removal label Dec 26, 2020
@Morriz Morriz removed the stale This issue has been marked stale and is eligible for removal label Dec 29, 2020
@Morriz Morriz added bug Something isn't working and removed problem Something seems not right labels Mar 22, 2021
@Morriz Morriz changed the title ONPREM: loki sometimes does not show logs loki sometimes does not show logs Apr 1, 2021
@0-sv 0-sv self-assigned this Apr 8, 2021
@0-sv
Copy link
Contributor

0-sv commented Apr 8, 2021

Attempting to reproduce the problem on the demo cluster.

~ kh logs -l component=registry -c registry -f
127.0.0.1 - - [08/Apr/2021:12:00:54 +0000] "GET / HTTP/1.1" 200 0 "" "kube-probe/1.19+"
127.0.0.1 - - [08/Apr/2021:12:01:00 +0000] "GET / HTTP/1.1" 200 0 "" "Go-http-client/1.1"
127.0.0.1 - - [08/Apr/2021:12:01:02 +0000] "GET / HTTP/1.1" 200 0 "" "kube-probe/1.19+"
127.0.0.1 - - [08/Apr/2021:12:01:04 +0000] "GET / HTTP/1.1" 200 0 "" "kube-probe/1.19+"
127.0.0.1 - - [08/Apr/2021:12:01:10 +0000] "GET / HTTP/1.1" 200 0 "" "Go-http-client/1.1"
127.0.0.1 - - [08/Apr/2021:12:01:12 +0000] "GET / HTTP/1.1" 200 0 "" "kube-probe/1.19+"
127.0.0.1 - - [08/Apr/2021:12:01:14 +0000] "GET / HTTP/1.1" 200 0 "" "kube-probe/1.19+"
127.0.0.1 - - [08/Apr/2021:12:01:20 +0000] "GET / HTTP/1.1" 200 0 "" "Go-http-client/1.1"
127.0.0.1 - - [08/Apr/2021:12:01:22 +0000] "GET / HTTP/1.1" 200 0 "" "kube-probe/1.19+"
127.0.0.1 - - [08/Apr/2021:12:01:24 +0000] "GET / HTTP/1.1" 200 0 "" "kube-probe/1.19+"

etc.

~ kubectl -n monitoring port-forward loki-0 :3100

Forwarding from 127.0.0.1:36009 -> 3100
Forwarding from [::1]:36009 -> 3100
~ export LOKI_ADDR=http://localhost:36009
➜  ~ logcli query '{component="registry"}'

http://localhost:36009/loki/api/v1/query_range?direction=BACKWARD&end=xxxx&limit=30&query=%7Bcomponent%3D%22registry%22%7D&start=yyyy
Query failed: Error response from server: no org id

I've tried to look up the tenant_id or X-OrgId from somewhere but couldn't find it, could you please provide some more details on this bug?

@0-sv
Copy link
Contributor

0-sv commented Apr 8, 2021

~ logcli --org-id="1" query '{component="registry"}'
http://localhost:36009/loki/api/v1/query_range?direction=BACKWARD&end=xxxx&limit=30&query=%7Bcomponent%3D%22registry%22%7D&start=yyyy
➜  ~ logcli --org-id="2" query '{component="registry"}'
http://localhost:36009/loki/api/v1/query_range?direction=BACKWARD&end=xxxx&limit=30&query=%7Bcomponent%3D%22registry%22%7D&start=yyyy

Not sure what org id I need to reproduce..

@Morriz
Copy link
Contributor Author

Morriz commented Apr 8, 2021 via email

@0-sv
Copy link
Contributor

0-sv commented Apr 8, 2021

Please don't ever access services via proxy

Alright, but you probably understand I cannot learn anything from this statement.

@Morriz
Copy link
Contributor Author

Morriz commented Apr 8, 2021

not reproducible after learning about the quirks of operating loki ;p

@Morriz Morriz closed this as completed Apr 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants