I try to run the azure function app (Http Triggerd API) from my local (using VS code). But I'm getting an error "port 7071 is unavailable. Close the process using that port, or specify another port using --port [-p]." I checked the list of ports used using cmd prompt.But 7071 is not in used list. Also tried to run with different port using "func host start --port [p1]", but it throws the same error as above. For all ports it throws the same error. How to resolve this problem?
First, create a new Azure Functions app in Visual Studio, add a breakpoint in the HTTP trigger, and then start debugging. The Azure Function app will launch in a local Functions host, and your trigger will be available locally on http://localhost:7071/api/Function1 (so listening on port 7071 ).
Sometimes it might happend that port is in use despite there is no other azure funtion in debug mode.
On Windows10
To solve problem turn on Windows Task Manager ctrl + shift + esc
. Find your Azure function proccess and simply kill it. It should help without restarting your PC.
It is how it looks like on my PC:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With