question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

grpc-cli return Received an error when querying services endpoint.

See original GitHub issue

grpc version 1.3.0

jdk 1.8

add ProtoReflectionService after my service

private NettyServerBuilder initConfigServer() {
        Integer workers = Optional.fromNullable(providerSettingConfig.getIothreads()).or(0);
        NettyServerBuilder builder = NettyServerBuilder
                .forPort(registryConfig.getServicePort())
                .bossEventLoopGroup(create(Constants.NETTY_BOSS_EVEN_LOOP_GROUP, 1))
                .workerEventLoopGroup(create(Constants.NETTY_WORKER_EVEN_LOOP_GROUP, workers));
        logger.debug("server:netty boss:{} worker:{}", 1, workers);

        for (ServerServiceDefinition ssd : ssds) {
            builder.addService(ssd);
        }

        builder.addService(ProtoReflectionService.newInstance());

        return builder;
    }

then run

./grpc_cli ls localhost:50053

return

Received an error when querying services endpoint.

io.grpc.examples.helloworld.HelloWorldServer is the same problem too

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:12 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
minorhackscommented, May 24, 2017

I am also encountering a similar issue, with a trivial C++ server implementation. I can get a client to talk to the server, but I would like for grpc_cli to work as well.

One way to get a better error message is to set the GRPC_VERBOSITY environment variable:

$ export GRPC_VERBOSITY=DEBUG
$ grpc_cli ls 127.0.0.1:8082
I0524 12:17:11.377249569     658 ev_epollsig_linux.c:90]     epoll engine will be using signal: 40
D0524 12:17:11.377294531     658 ev_posix.c:121]             Using polling engine: epollsig
D0524 12:17:11.377329982     658 dns_resolver.c:316]         Using native dns resolver
I0524 12:17:11.377894936     658 proto_reflection_descriptor_database.cc:281] Error on GetServices() response type
	Expecting: 6
	Received: 0
Received an error when querying services endpoint.
I0524 12:17:11.377953670     658 proto_reflection_descriptor_database.cc:61] ServerReflectionInfo rpc failed. Error code: 12, details: 

@SeriousMa Are your failure details similar?

0reactions
allquantorcommented, Sep 5, 2017

@minorhacks have the same issue as you, did you found any approach for this?

Read more comments on GitHub >

github_iconTop Results From Across the Web

grpc-cli return Received an error when querying services endpoint.
grpc version 1.3.0. jdk 1.8. add ProtoReflectionService after my service private NettyServerBuilder initConfigServer() { Integer workers = Optional.
Read more >
GRPC Core: gRPC Server Reflection Tutorial
gRPC Server Reflection provides information about publicly-accessible gRPC services on a server, and assists clients at runtime to construct RPC requests ...
Read more >
gRPC: test/cpp/util/grpc_tool.cc - Fossies
gRPC CLI has very different performance " 76 "characteristics compared with ... 377 fprintf(stderr, "Received an error when querying services endpoint.
Read more >
Troubleshooting Response Errors | Cloud Endpoints with gRPC
This page describes how to troubleshoot errors that you receive in a response from a request to your API. Upstream backend unavailable. If...
Read more >
gRPC Server Reflection Tutorial
It is used by gRPC CLI, which can be used to introspect server protos and send/receive test RPCs. Enable Server Reflection. gRPC-go Server...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found