Share via

Facing this Issue : Host instance '000000000000000000000000365A64BC' failed to acquire host lock lease: Azure.Core: No connection could be made because the target machine actively refused it. (127.0.0.1:10000). System.Net.Http: No connection

Udit 0 Reputation points
2026-04-06T05:17:43.51+00:00

Host instance '000000000000000000000000365A64BC' failed to acquire host lock lease: Azure.Core: No connection could be made because the target machine actively refused it. [IP Address Removed]. System.Net.Http: No connection could be made because the target machine actively refused it. [IP Address Removed]. System.Net.Sockets: No connection could be made because the target machine actively refused it.

2026-04-06T05:13:38 [Warning] [Tag=''] Process reporting unhealthy: Unhealthy. Health check entries are {"azure.functions.web_host.lifecycle":{"status":"Healthy","description":null},"azure.functions.script_host.lifecycle":{"status":"Healthy","description":null},"azure.functions.webjobs.storage":{"status":"Unhealthy","description":"Unable to access AzureWebJobsStorage","errorCode":null}}

Azure Functions
Azure Functions

An Azure service that provides an event-driven serverless compute platform.


2 answers

Sort by: Most helpful
  1. Pravallika KV 12,820 Reputation points Microsoft External Staff Moderator
    2026-04-06T07:10:07.2666667+00:00

    Hi @Udit ,

    Thanks for reaching out to Microsoft Q&A.

    Azure Functions host failing to reach its storage account as mentioned in the error log:

    "azure.functions.webjobs.storage":{"status":"Unhealthy","description":"Unable to access AzureWebJobsStorage"}

    This error occurs when your Azure Function App is unable to connect to its required storage account, which is referenced by the AzureWebJobsStorage setting.

    Your Function App must connect to its Azure Storage account via AzureWebJobsStorage to run. The message:

    “No connection could be made because the target machine actively refused it”

    means the function tried to reach the storage endpoint, but the request was blocked rather than simply timing out. This happens when the storage account has network restrictions such as firewall rules, private endpoints, or limited access to selected networks, preventing the Function App from reaching it.

    Another possible cause is an incorrect or missing connection string in the application settings, especially if the storage account keys were recently rotated or misconfigured.

    In setups using private endpoints, DNS or virtual network integration issues can also lead to this problem if the Function App cannot resolve or access the private IP. Because Azure Functions rely on the storage account to manage host state, triggers, and scaling, failing to connect means the host cannot acquire its lock lease, which results in the app being marked as unhealthy.

    To resolve this issue, verify that the AzureWebJobsStorage connection string is correct, ensure that the storage account allows access from the Function App either by adjusting firewall settings or configuring VNet integration properly, and confirm that the storage account is available and reachable.

    If this happens locally, it could be because:

    • Azurite not running
    • Wrong local storage config

    To resolve this, Start Azurite or update:

    "AzureWebJobsStorage" : "UseDevelopmentStorage=true"
    

    Hope this helps!


    If the resolution was helpful, kindly take a moment to click on User's imageand click on Yes for was this answer helpful. And, if you have any further query do let us know.


  2. Q&A Assist
    2026-04-06T05:17:56.5233333+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    The error indicates that the Functions host is trying to reach a storage endpoint on 127.0.0.1:10000 and the connection is being actively refused. The health check explicitly shows azure.functions.webjobs.storage as Unhealthy with Unable to access AzureWebJobsStorage. For Azure Functions (including Azure Functions running in Azure Local/Emulator scenarios), the host lock lease and other runtime artifacts are stored in the AzureWebJobsStorage account. If that storage is unreachable, the host cannot acquire the lock and fails to start correctly.

    Key points from the message:

    • No connection could be made because the target machine actively refused it. (127.0.0.1:10000) corresponds to Winsock error WSAECONNREFUSED (10061), which means nothing is listening on that address/port.
    • The health check shows only the storage check as Unhealthy, confirming the root cause is storage connectivity.

    To resolve:

    1. Verify that the storage endpoint on 127.0.0.1:10000 is actually running
      • If using a local storage emulator (for example, Azurite) configured to listen on 127.0.0.1:10000, ensure the emulator is started and listening on that port.
      • If the emulator is bound to a different IP or port, update the AzureWebJobsStorage connection string to match the actual endpoint.
    2. Confirm that AzureWebJobsStorage is configured correctly
      • Check the configuration (local.settings.json or environment variables) for the AzureWebJobsStorage setting.
      • Ensure it points either to a valid local emulator endpoint that is running, or to a real Azure Storage account that is reachable from the environment.
    3. Check for local firewall or network rules
      • Because the error is WSAECONNREFUSED (10061), this usually means there is no service listening rather than a timeout, but local firewall rules blocking port 10000 can also cause similar behavior. Make sure nothing on the machine is blocking connections to 127.0.0.1:10000.

    Once the storage emulator or storage account is reachable and AzureWebJobsStorage is correctly configured, the Functions host should be able to acquire the host lock lease and the health check for azure.functions.webjobs.storage should move to Healthy.


    References:

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.