azure-functions-core-tools icon indicating copy to clipboard operation
azure-functions-core-tools copied to clipboard

No connection could be made because the target machine actively refused it. (localhost:7071)

Open AkGupSky opened this issue 2 years ago • 2 comments

We have an integration test for Az Function which uses Azure Function core tools to run the test in Azure Devops Build pipeline. It use to work day before yesterday but suddenly i am getting an error No connection could be made because the target machine actively refused it. (localhost:7071) below are the task that i am using to run the tests

  • script: npm install -g azurite displayName: 'Install Azurite' - script : start /B azurite displayName: Run Azurite

    • task: Npm@1 displayName: Install Azure Core Tools inputs: command: 'custom' customCommand: 'i -g azure-functions-core-tools@4 --unsafe-perm true'
    - task: DotNetCoreCLI@2
      displayName: Function Component Tests
      inputs:
        command: test
        projects: '**/*.Function.Tests.Component.csproj'
        arguments: '--configuration $(buildConfiguration) --no-build -v normal --blame-hang --blame-hang-timeout 5m'
    
        I am unable to find proper reason behind the failure and with further debugging and logging ... I got this error
         **A JSON parsing exception occurred in [C:\npm\prefix\node_modules\azure-functions-core-tools\bin\func.deps.json], offset 0 (line 1, column 1): Invalid value.
    

Failed to load the dll from [C:\npm\prefix\node_modules\azure-functions-core-tools\bin\hostpolicy.dll], HRESULT: 0x800700C1

An error occurred while loading required library hostpolicy.dll from [C:\npm\prefix\node_modules\azure-functions-core-tools\bin]** [AzureCoreToolsInstallationLog.txt] (https://github.com/Azure/azure-functions-core-tools/files/11294976/AzureCoreToolsInstallationLog.txt)

Can anyone help me out with this issue ???

AkGupSky avatar Apr 21 '23 10:04 AkGupSky

@AkGupSky Use http:127.0.0.1 instead of localhost, worked for me. I faced this issue while upgrading my azure function core tools from V3 to V4.

htke1 avatar May 25 '23 13:05 htke1

@AkGupSky Did you find a solution?

fabricciotc avatar Feb 12 '24 17:02 fabricciotc