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

Ruler: Unable to access services and methods w/grpcurl #8116

Open
jgurr4 opened this issue Feb 20, 2025 · 1 comment
Open

Ruler: Unable to access services and methods w/grpcurl #8116

jgurr4 opened this issue Feb 20, 2025 · 1 comment

Comments

@jgurr4
Copy link

jgurr4 commented Feb 20, 2025

Thanos Version used: v0.37.0

thanos, version 0.37.0 (branch: HEAD, revision: 889d527)
build user: root@8dff35604453
build date: 20241125-11:43:19
go version: go1.23.3
platform: linux/amd64
tags: netgo

Object Storage Provider: Thanos Rule

What happened: I ran grpcurl -vv -plaintext localhost:10938 list which shows me the following output:

grpc.health.v1.Health
grpc.reflection.v1.ServerReflection
grpc.reflection.v1alpha.ServerReflection
thanos.Rules
thanos.Store
thanos.info.Info
Timing Data: 412.570993ms
  Dial: 127.381147ms
    BlockingDial: 127.368461ms

That looks good, but when I run this command grpcurl -vv -plaintext localhost:10938 describe thanos.Rules I get this output:

Failed to resolve symbol "thanos.Rules": Symbol not found: thanos.Rules

What you expected to happen:
I should be seeing the methods available for thanos.Rules or thanos.Store, but both return 'Symbol not found' error.

How to reproduce it (as minimally and precisely as possible): Simply run thanos ruler locally and try to grpcurl the grpc endpoint

Anything else we need to know: I know that I can use some paths to proto files to help it work like this: grpcurl -vv -plaintext -import-path=protobuf -import-path=thanos/pkg/ -proto=rules/rulespb/rpc.proto localhost:10938 describe thanos.Rules see here , but I can't download the full thanos repo to my remote server, and anyway I shouldn't have to do that since the services/methods should be exposed already.

Copy link

dosubot bot commented Feb 20, 2025

Hey there, @jgurr4!

I'm here to help you with any bugs, questions, or contributions you have related to Thanos. Let me know how I can assist you!

The issue you're encountering with grpcurl not being able to describe the thanos.Rules service, despite it being listed, might be related to how gRPC reflection is set up or how grpcurl is being used.

Here are a few things to consider:

  1. gRPC Reflection: Ensure that gRPC reflection is correctly registered in your Thanos setup. Thanos should have the reflection service registered on the gRPC server, which allows tools like grpcurl to query the server for its services and methods. This is typically done with reflection.Register(s) in the server setup [1].

  2. Proto Files: While gRPC reflection should allow you to use grpcurl without proto files, sometimes the reflection data might not be complete or correctly exposed. If possible, try using the proto files locally to see if it resolves the issue, even though you mentioned it's not ideal for your setup.

  3. Version Compatibility: Ensure that the version of grpcurl you are using is compatible with the gRPC version used by Thanos. Sometimes, discrepancies in versions can lead to unexpected behavior.

  4. Network and Firewall: Double-check that there are no network or firewall rules that might be interfering with the gRPC traffic, especially if you're running this in a production environment.

  5. Service Registration: Verify that the thanos.Rules service is correctly registered with the gRPC server using the RegisterRulesServer function [2].

If these steps don't resolve the issue, you might need to investigate further into the specific configuration of your Thanos setup or consider using a different tool or method to interact with the gRPC services.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant