azurevisual-studioazure-functionsazurite

Azurite : Tremendous trouble using local development tools while using Azure Functions


I am using Azurite for local storage for my azure functions (While developing locally). It doesn't seem to be working on one of my machines. I just cannot seem to figure it out.

local setttings.json enter image description here

There doesn't seem to be much wrong with that...

When i run my Azure Function code - I am getting this :

enter image description here

This doesnt look healthy.

Also in my Service dependencies in Visual Studio i am getting this :

enter image description here

I know it cannot re-run azurite if it is already running but the error is different that case. I cannot seem to get any of my functions running.

Although if i use another machine then it works fine and everything is good - so its machine dependent i think. Is there any command line in windows to check whats on these ports to see if there is anything already there ? I have done that earlier though and i cannot see anything - just wandering if anyone else has come across this ?

Also got this error when i first tried to start my function enter image description here

Desperation is sinking in now :)


Solution

  • To resolve the issue, find the service which is using port 10001 using the command:

    netstat -p tcp -ano | findstr :10001
    

    Response:

    enter image description here

    Kill the task using the service's PID with the command:

    taskkill /PID <process_id> /F
    

    enter image description here

    C:\Users\uname\pyfunc>"C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\Extensions\Microsoft\Azure Storage Emulator\azurite.exe"
    Azurite Blob service is starting at http://127.0.0.1:10000
    Azurite Blob service is successfully listening at http://127.0.0.1:10000
    Azurite Queue service is starting at http://127.0.0.1:10001
    Azurite Queue service is successfully listening at http://127.0.0.1:10001
    Azurite Table service is starting at http://127.0.0.1:10002
    Azurite Table service is successfully listening at http://127.0.0.1:10002
    

    References:

    https://learn.microsoft.com/en-us/answers/questions/698846/listener-for-azure-function-was-unable-to-start-er