Resolving the ECONNREFUSED Error with VS Code

We were working on a project requiring us to extract data from an API and land it over a data lake storage account container. So, we created an Azure Function App using Visual Studio (VS) code. We set up an environment for the variable using the SETX command locally. While debugging the code, we got an error – “connect ECONNREFUSED 127.0.0.1:9091”, and “on prompt”, it suggested opening “launch.json.”

After going through the error message on the Terminal Tab, we recognized the root cause of the error: “The keyring does not contain a valid default protection key. The data protection system cannot create a new key because auto-generation of keys is disabled”.

The Solution:

To fix the issue, we used the “dotenv module” for the environment variable and added the necessary “Certificates” from Snap-in from the console root. To add certificates, these are the steps we have followed:

Step 1:   Start → Run → MMC

The Console Root Window will Open Up:

Step 2:   File → Add/Remove Snap-in

Step 3:   Select certificates from the available snap-ins tab and then click Add to add-in the selected snap-ins tab

Step 4:   Click Ok

 Step 5: Close and Save the console file with the same settings

Step 6: After saving the console file, restart the system, and the system will be ready to run the Azure Function App in VS code

“TekLink provided worry free BEx to AO Migration by analyzing and converting our 500+ BEx workbooks to Analysis for Office while also increasing adoption by running power user workshops.”
Lakshmi Thota
Lakshmi Thota

Sr. Manager

"We partnered with TekLink based upon a previous positive experience where they did a great job for us as well as hearing positive feedback about their excellent level of service. We’ve also interviewed many of their experts and consistently found their candidates to be the most technically sound with excellent BW and HANA knowledge above and beyond that of their competitors. Teklink has certainly helped us to stabilize and improve the reliability of our BI operations."
Francisco Ibarra
Francisco Ibarra

IT Architect

"We partnered with TekLink based upon a previous positive experience where they did a great job for us as well as hearing positive feedback about their excellent level of service. We’ve also interviewed many of their experts and consistently found their candidates to be the most technically sound with excellent BW and HANA knowledge above and beyond that of their competitors. Teklink has certainly helped us to stabilize and improve the reliability of our BI operations."
Patrick Bachman
Patrick Bachman

IT Architect

Contact Us