`func host start` stuck and not starting - connect ECONNREFUSED

See original GitHub issue

Hello, I’m having some problems trying to debug Python in VS Code with Azure Functions on Windows 10.

At first, after installing I had some problems because Powershell was not finding the command func host start. I had installed npm with nodist, but Powershell wasn’t finding the command so I installed nvm-windows which didn’t work either. I then fixed the problem by adding the PATH to node_modules in Enviroment variables. I got func starting and I was able to debug my application. But after the first run it didn’t work again.

I tried everything I could: removing the PATH I created, uninstall and install azure-functions-core-tools 2 and 3, uninstall nvm and install Node.js, install .NET Core SDK 2.2, delete my functions project and create a new one, restarting VS Code, restarting Windows… nothing works.

When I start debugging here is what happens:

Executing task: .venv\Scripts\activate ; func host start

Found Python version 3.7.5 (python).

                  %%%%%%
                 %%%%%%    
            @   %%%%%%    @
          @@   %%%%%%      @@
       @@@    %%%%%%%%%%%    @@@
     @@      %%%%%%%%%%        @@
       @@         %%%%       @@  
         @@      %%%       @@  
           @@    %%      @@  
                %%
                %

Azure Functions Core Tools (2.7.2254 Commit hash: ae06bd1a6012aa6a0859b5f30d3077947267d2b6)
Function Runtime Version: 2.0.13017.0

It stays like this for 5 minutes or more, after I get this pop message:

2020-03-28 13_30_11-Window

And terminal says:

The terminal process terminated with exit code: 1

Terminal will be reused by tasks, press any key to close it.

That’s all I have. It’s really strange to me that I got it working once, and it never worked again. Hope you can help me, and sorry if I’m not very precise with my explanations. If I missed something about my problem please ask me. Thanks!

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:12 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
wirefusioncommented, Feb 23, 2021

you can try changing tasks.json " { “type”: “func”, “command”: “func host start”, “problemMatcher”: “$func-node-watch”, “isBackground”: true, “dependsOn”: “npm install” }

"

0reactions
apawastcommented, Nov 12, 2021

I am closing this issue as @pundergit has found a workaround. However, if this issue keeps occuring for others, I’d be happy to reopen.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to debug Python Azure function in VS Code IDE. ...
VS Code > Your Python Azure Functions Project > View Menu > Open the Command Palette or Ctrl + Shift + P.
Read more >
Azure functions debug fails to start on a non-trivial project
Failed to launch functions process A task was canceled. Restarting VS does not help. Starting func host start outside of VS works fine....
Read more >
Error in Azure function - Microsoft Q&A
Hi Team Im Trying create a Azure function with http trigger using anonymous authentication from ... connect ECONNREFUSED 127.0.0.1:9091.
Read more >
How to solve the 'Could not find the task func: host start' error ...
Every once in a while when I try to start my Azure function locally from VS code I get the error “Could not...
Read more >
Logic Apps (Standard) "Workflow design time could not be ...
When I try opening the Logic Apps workflow in the designer then get the following error: func host start --port 8000.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found