I am writing a grpc based server and client. Server is running on linux and 
client is running on windows.

I am trying to handle the scenario when the server is not started but the 
client is up.

This is the simplified version of the code which I use to check when server 
is available.

auto state = m_channel->GetState(true);

 while (state != GRPC_CHANNEL_READY || state != GRPC_CHANNEL_SHUTDOWN) { 
std::chrono::time_point deadline = std::chrono::system_clock::now() + 
std::chrono::seconds(30); if (m_channel->WaitForStateChange(state, 
deadline)) { std::cout << "new state is: " << static_cast<int>(state) << 
"\n"; state = m_channel->GetState(true); } } 

But when the client starts running without the server, I see the following 
error:

 **I0929 22:24:05.748000000 14812 subchannel.cc:905] subchannel 0123CF78 
{address=ipv4:192.168.175.130:40051, 
args={grpc.client_channel_factory=0x121dd68, 
grpc.default_authority=192.168.175.130:40051, 
grpc.internal.channel_credentials=0x121dce8, 
grpc.internal.security_connector=0x1235f28, 
grpc.internal.subchannel_pool=0x1225db0, 
grpc.max_receive_message_length=-1, 
grpc.primary_user_agent=grpc-c++/1.49.0-dev, grpc.resource_quota=0x1225990, 
grpc.server_uri=dns:///192.168.175.130:40051}}: connect failed 
(UNAVAILABLE:WSA Error {syscall:"ConnectEx", os_error:"No connection could 
be made because the target machine actively refused it.\r\n", 
grpc_status:14, wsa_error:10061, 
created_time:"2022-09-29T20:24:05.748604482+00:00"}), backing off for -1057 
ms**


*Where as when I run the client on linux, I see it properly waiting till 
the server is up and running.*

Is there a specific firewall setting that is needed for windows ? Can 
someone guide me here ?

-- 
You received this message because you are subscribed to the Google Groups 
"grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to grpc-io+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/1ed5d585-fc24-476b-a8f9-152322de4729n%40googlegroups.com.

Reply via email to