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.

Adding more then one GrpcService causing warnings for each endpoint

See original GitHub issue
    server = Server.builder()
      .http(port)
      .service(GrpcService.builder()
        .addService(new GreeterImpl())
        .addService(new RouteGuideImpl())
        .build())
      .build()

This simple code triggers warnings

21:52:08.601 [main] WARN  com.linecorp.armeria.server.ServerBuilder - The service that you are trying to add with 'serviceUnder' has multiple routes, but its routes will be ignored and it will be served under '/routeguide.RouteGuide/ListFeatures': service=com.linecorp.armeria.server.grpc.FramedGrpcService@c3edf4c
21:52:08.601 [main] WARN  com.linecorp.armeria.server.ServerBuilder - The service that you are trying to add with 'serviceUnder' has multiple routes, but its routes will be ignored and it will be served under '/greeter.Greeter/SayHello': service=com.linecorp.armeria.server.grpc.FramedGrpcService@c3edf4c

I believe this was introduced by this change: https://github.com/line/armeria/pull/3786

Service are working but now Armenia is a bit noisy and misleading.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
minwooxcommented, Oct 12, 2021

You didn’t use serviceUnder(“/”, …), right?

I think he didn’t use serviceUnder("/", ...). 😅 I have confirmed that there’s a bug. 😅 We should fix that.

0reactions
hyangtackcommented, Oct 12, 2021

Hi @octo47

if I use http transcoding and serveUnder(“/”…) it doesn’t work.

That’s why I added the warning message.

https://github.com/line/armeria/blob/eee147be6e2b90eefda3b007c79f33e54e9ac079/grpc/src/main/java/com/linecorp/armeria/server/grpc/GrpcServiceBuilder.java#L446-L469

The service itself built from GrpcServiceBuilder has multiple HTTP/JSON routes and the routes can be registered only with the following two methods:

https://github.com/line/armeria/blob/eee147be6e2b90eefda3b007c79f33e54e9ac079/core/src/main/java/com/linecorp/armeria/server/ServerBuilder.java#L1103-L1141

Read more comments on GitHub >

github_iconTop Results From Across the Web

An all-in-one guide to gRPC-Gateway - LogRocket Blog
gRPC-Gateway is a plugin that can be used to generate a reverse proxy server for gRPC services that convert Restful/JSON into gRPC.
Read more >
How to Use gRPC to Build Efficient .NET Core 3.1 Microservices
The ConfigureServices() method of the Startup class adds gRPC to the application services. In the Configure() method, you find the definition of the...
Read more >
Performance best practices with gRPC - Microsoft Learn
If a new channel is created for each gRPC call then the amount of time it takes ... All gRPC calls over that...
Read more >
Configuring a gRPC service - Cloud Endpoints
You might find it useful to use more than one YAML file to configure different features for the same service. Using multiple YAML...
Read more >
Table of Contents - thanos.io
#5480 Query: Expose endpoint info timeout as a hidden flag --endpoint.info-timeout . #5527 Receive: Add per request limits for remote write. Added four...
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