Stack Overflow Asked by Jibo_Libin on December 3, 2021
I’m trying to build a gRPC server on Ubuntu and it keeps failing at std::unique_ptr<Server> server(builder.BuildAndStart());
The whole code snippet is
string async_port(":6150");
grpc::EnableDefaultHealthCheckService(true);
grpc::reflection::InitProtoReflectionServerBuilderPlugin();
ServerBuilder builder;
// Listen on the given address without any authentication mechanism.
builder.AddListeningPort(sync_port.substr(1,4), grpc::InsecureServerCredentials());
// Register "service" as the instance through which we'll communicate with
// clients. In this case it corresponds to an *synchronous* service.
builder.RegisterService(this);
// Finally assemble the server.
std::unique_ptr<Server> server(builder.BuildAndStart());
// Wait for the server to shutdown. Note that some other thread must be
// responsible for shutting down the server for this call to ever return.
printf("reached heren");
server->Wait();
and the error is
E0722 19:54:28.324066366 257369 server_chttp2.cc:40]
{"created":"@1595465668.324006753","description":
"No address added out of total 1 resolved","file":"src/core/ext/transport/chttp2/server
/chttp2_server.cc","file_line":397,"referenced_errors":
[{"created":"@1595465668.324002966","description":"Unable to configure socket","fd":7,"file":"src/core/lib/iomgr
/tcp_server_utils_posix_common.cc","file_line":216,
"referenced_errors":[{"created":"@1595465668.323994409","
description":"Permission denied","errno":13,"file":"src/core/lib/iomgr
/tcp_server_utils_posix_common.cc","file_line":190,"os_error":"Permission denied","syscall":"bind"}]}]}
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP