4

I have a .net core app which spins up a grpc server. I was able to run it locally without a problem until I had Windows updates today. After Windows applied latest updates, I tried to run my .net core app, but I keep getting the following error.

System.IO.IOException: Failed to bind port "127.0.0.1:50001" at Grpc.Core.Server.CheckPortsBoundSuccessfully()

I went to firewall and opened access to the port that grpc has problem accessing. It did not help. Anybody had this issue?

6
  • which port is it trying to bind to? is something else using it? Commented Jan 3, 2019 at 16:13
  • 1
    I checked it is not being used. It is 50000 range Commented Jan 3, 2019 at 16:14
  • This really looks like someone's using that port. Have you tried a different port? There isn't much complexity in binding the code that binds the port on the server side - it mostly just invokes the syscall to bind the port (and that seems to be failing). Can other servers (non-grpc) bind that port without a problem? Commented Jan 10, 2019 at 14:29
  • @neo Did you find a resolution to this? I'm having the exact same issue now on code that's been working fine for over a year. Port is NOT in use. Commented Feb 6, 2019 at 3:37
  • 1
    @user3953989 I posted the answer. Commented Feb 6, 2019 at 20:48

2 Answers 2

7

I wasted 2 days on this and finally got the answer. Windows update caused certain valid to use ports to be excluded and as a result I couldn't run any app that listens on those excluded ports.

Here is a link to Microsoft article. Windows update blocking previously valid ports

Sign up to request clarification or add additional context in comments.

1 Comment

Your answer reminded of the right search, but the link is dead. Consider changing it to something like stackoverflow.com/questions/54010365/…
0

You can change the startup project to current selection by right click on your solution. or you can set multiple starup project as shown in pictur. it solve my issue.. step1

step 2 step 2

click apply

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.