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.

Cannot stop server with gRPC service in 0.97

See original GitHub issue

Hi guys,

Could be red herring but I was playing with Armeria 0.97 a bit (like it was recommended in https://github.com/line/armeria/issues/2319). It looks like that that I can’t stop a server with single gRPC service, line (1) from the code below never returns.

ServerBuilder sb = new ServerBuilder();
    Server server =
        sb.service(new GrpcServiceBuilder().addService(new PingService()).build())
            .port(1234, SessionProtocol.HTTP).build();

    CompletableFuture startFuture = server.start();
    startFuture.join();

    CompletableFuture stopFuture = server.stop();
    stopFuture.join(); //  (1)

The same code worked fine in 0.88.

Sincerely, Andrey

PS. The test is executed from IntelliJ Idea 2019.2 on openjdk 12.0.2+10

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
andrey-tptcommented, Dec 14, 2019

After some tests it looks like that minor version of Netty makes all the difference

  • Armeria 0.88 works fine with both 4.1.42.Final and 4.1.43.Final.

  • Armeria 0.97 works with 4.1.43.Final but for some reason I can’t stop server on 4.1.42.Final and below (4.1.41.Final doesn’t work as well). “Luckily” my project is on 4.1.42.Final.

Can you try this?

0reactions
ikhooncommented, Feb 18, 2020

Let me close this issue. If you have a problem with stopping a server, feel free to reopen this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Reliable gRPC services with deadlines and cancellation
It stops misbehaving services from running forever and exhausting server resources. Deadlines are a useful tool for building reliable apps ...
Read more >
How to stop golang gRPC server with a function?
I am able to solve the problem by declaring *grpc.Server variable globally outside StartGrpcServer() , and then using it in StopGrpcServer() .
Read more >
Implementing a gRPC Service - Quarkus
Implementing a gRPC service requires the gRPC classes to be generated. Place your proto files in ... Quarkus gRPC Server implements the reflection...
Read more >
Basics tutorial | Go - gRPC
This tutorial provides a basic Go programmer's introduction to working with gRPC. By walking through this example you'll learn how to: Define a...
Read more >
gRPC not dropping disconnected channel - Google Groups
Also I found that if the server is leave stopped for a long time before ... Tested with Python grpcio==1.19.0 server/client and with...
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