fullstorydev / fullstorydev/grpcurl
Not able to query grpc healthcheck endpoints using grpcurl
- Dominant language
- Go
- Stars
- 12.8k
- Forks
- 580
- Avg merge
- 1h 8m
- Merged PRs (30d)
- 5
Description
I created a gRPC service and added grpc healthcheck endpoints as per the [gRPC Health Checking Protocol](https://github.com/grpc/grpc/blob/master/doc/health-checking.md) and I am getting the status as SERVING when using the grpc_health_probe command.
However, when I am calling the healthcheck endpoints using `grpcurl` command, its not working.
```
➜ healthcheck git: ✗ grpcurl -v -plaintext -protoset ./healthcheck.protoset -d '{"service": "healthcheck"}' localhost:8080 healthcheck.HealthCheck/Check
Resolved method descriptor:
rpc Check ( .healthcheck.HealthCheckRequest ) returns ( .healthcheck.HealthCheckResponse );
Response headers received:
(empty)
Response trailers received:
content-type: application/grpc
Sent 1 request and received 0 responses
ERROR:
Code: Unimplemented
Message: method Check not implemented
```
Following is my proto file which has both `Check` and `Watch` methods
```
syntax = "proto3";
option go_package = "healthcheck/healthcheck";
package healthcheck;
message HealthParams {
string service = 1;
}
message HealthCheckRequest {
string service = 1;
}
message HealthCheckResponse {
enum ServingStatus {
UNKNOWN = 0;
SERVING = 1;
NOT_SERVING = 2;
SERVICE_UNKNOWN = 3; // Used only by the Watch method.
}
ServingStatus status = 1;
}
message Health {
// The health status
string status = 1;
}
service HealthCheck{
rpc Get(HealthParams) returns (Health) {}
rpc Check(HealthCheckRequest) returns (HealthCheckResponse);
rpc Watch(HealthCheckRequest) returns (stream HealthCheckResponse);
}
```
What's working is the following
```
➜ healthcheck git: ✗ grpc-health-probe -addr=localhost:8080
status: SERVING
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.