我遵循了从以下链接快速启动grpc教程的所有说明:
https://github.com/grpc/grpc-java/tree/master/examples but the command
../gradlew installDist 给出了成功的构建,但是当我运行服务器时,它显示了如下结果:
pradnya@pradnya-VirtualBox:~/grpc-java/examples$ ./build/install/grpc-examples/bin/hello-world-server 2007年9月7日下午6:36:21 io.grpc.examples.helloworld.HelloWorldServer启动信息:服务器启动,监听50051 *关闭gRPC服务器,因为gRPC正在关闭*服务器关闭
发布于 2015-09-08 03:28:56
最近的变化(从周四,9月2日)打破了这个例子。修复方法是在server.awaitTermination()方法的末尾添加一个start(),这将防止JVM退出。您还需要将start()和main()标记为throws InterruptedException。我制作了GitHub问题来跟踪这个例子的更新。
https://stackoverflow.com/questions/32439576
复制相似问题