ASP.NET Core | gRPC "Error starting gRPC call: No connection could be made because the target machine actively refused it."

Viewed 4892

I have a local gRPC client and a remote gRPC server. Local gRPC client is running on IIS. Remote gRPC server runs on Kestrel inside Ubuntu OS. When I'm trying to make a gRPC call from client to server I'm getting RpcException with the following message "Error starting gRPC call: No connection could be made because the target machine actively refused it.".


  • The firewall on the gRPC server machine is disabled.
  • I have successfully intercepted incoming network packages on gRPC server with tcpdump and they seem ok. That means packages are reaching server machine and they are blocked by the application.
  • I can access index page of gRPC server from gRPC client machine using browser.
  • gRPC server Kestrel uses a self-signed SSL certificate.
1 Answers

I have used port 31700 for gRPC server. Now I changed it to another one, and it works! I will appreciate some explanation of why is this port cannot be used for listening.

Related