[英]gRPC C++ Error code 14 : failed to connect to all addresses
I am trying to implement gRPC server/ client for the first time using Windows Subsystem for Linux kernel and CLion as the IDE (on Windows).我第一次尝试使用适用于 Linux 内核的 Windows 子系统和 CLion 作为 IDE(在 Windows 上)实现 gRPC 服务器/客户端。 My code does not have any other bugs/ issues except this communication failure.
除了此通信失败之外,我的代码没有任何其他错误/问题。
The following lines of code以下代码行
if(status.ok()) {
cv::imshow("Rotated image", decrypt_img);
} else {
std::cout << status.error_code() << " : " << status.error_message() << std::endl;
}
yields the following message产生以下消息
14 : failed to connect to all addresses
This is a kind of generic error message from grpc which can have multiple causes.这是来自 grpc 的一种通用错误消息,可能有多种原因。 In my experience, it can be one of the following things:
根据我的经验,它可能是以下情况之一:
grpc::ServerBuilder::BuildAndStart
or you didn't start your server application all along).grpc::ServerBuilder::BuildAndStart
或者您一直没有启动服务器应用程序)。grpc::ServerBuilder::AddListeningPort
)grpc::ServerBuilder::AddListeningPort
设置的地址不同) Not knowing your actual server and client code these are just assumptions I can make based on my experience with grpc.不知道您的实际服务器和客户端代码,这些只是我可以根据我对 grpc 的经验做出的假设。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.