loki icon indicating copy to clipboard operation
loki copied to clipboard

rpc error while doing queries

Open rizwankh opened this issue 3 years ago • 2 comments

logcli-darwin-amd64 --org-id=3 query '{filename="/var/log/audit.log"}' --since=2h --stats

Results in:

Error response from server: rpc error: code = Unknown desc = invalid version 3

I get this error pretty randomly and have not been able to pin-point what is the issue. Running Loki in distributed mode. 3 nodes with target: all and 1 node with target: query-frontend.

Loki version: 2.0

rizwankh avatar Sep 13 '22 07:09 rizwankh

Are you running different versions of the LogCLI and Loki?

dannykopping avatar Sep 13 '22 08:09 dannykopping

I tried with logcli version 2.0.0 and still it behaves the same.

./logcli-2.0.0 --org-id=3 query '{filename="/var/log/audit.log"}' --since=2h --stats
http://192.168.247.104:3100/loki/api/v1/query_range?direction=BACKWARD&end=1663232635298553000&limit=30&query=%7Bfilename%3D%22%2Fvar%2Flog%2Faudit.log%22%7D&start=1663225435298553000
Query failed: Error response from server: Multiple errors: [rpc error: code = Unknown desc = invalid version 3 invalid version 3]
 (<nil>)

rizwankh avatar Sep 15 '22 09:09 rizwankh

@dannykopping Do you need any further information?

Thanks in advance.

rizwankh avatar Sep 23 '22 17:09 rizwankh

@dannykopping I would really appreciate a response here or you can tell me that I need to buy a support contract to get this sorted. At least give some feedback. Thanks

rizwankh avatar Oct 11 '22 13:10 rizwankh

@rizwankh apologies for the delayed response. I would recommend upgrading to the latest versions of Loki and LogCLI. v2.0.0 is very old, and the issue has likely been addressed in the meantime.

Please reopen the issue if you encounter the same issue with the latest versions.

dannykopping avatar Oct 11 '22 14:10 dannykopping

Thanks @dannykopping. I updated last night to v2.6.0 and the error is gone. I guess I needed that push :)

rizwankh avatar Oct 12 '22 06:10 rizwankh

Happy to hear it! Thanks for the update

dannykopping avatar Oct 12 '22 07:10 dannykopping