Azure / LogicAppsUX

https://learn.microsoft.com/azure/logic-apps
MIT License
77 stars 84 forks source link

connect ECONNREFUSED 127.0.0.1:8000 #4829

Closed brad302 closed 6 months ago

brad302 commented 6 months ago

Describe the Bug with repro steps

All I am trying to do is access my workflow so I can edit it in VS Code.

10:49:32 AM: Running command: "C:\Users\myusername\.azurelogicapps\dependencies\FuncCoreTools\func host start --port 8000" with pid: "21244"...
10:49:32 AM: Running command: "C:\Users\myusername\.azurelogicapps\dependencies\FuncCoreTools\func host start --port 8000" with pid: "5164"...
NodeJs Binaries: C:\Users\myusername\.azurelogicapps\dependencies\NodeJs

Azure Functions Core Tools
Core Tools Version:       4.0.5455 Commit hash: N/A  (64-bit)
Function Runtime Version: 4.27.5.21554

Azure Functions Core Tools
Core Tools Version:       4.0.5455 Commit hash: N/A  (64-bit)
Function Runtime Version: 4.27.5.21554

FuncCoreTools Binaries: C:\Users\myusername\.azurelogicapps\dependencies\FuncCoreTools
DotNetSDK Binaries: C:\Users\myusername\.azurelogicapps\dependencies\DotNetSDK
Local binary .NET SDK version 6.0.417
10:49:36 AM: Azure Logic Apps Standard Runtime Dependencies validation and installation completed successfully.
[2024-05-13T00:49:38.511Z] Error building configuration in an external startup class.
[2024-05-13T00:49:38.512Z] Error building configuration in an external startup class. System.Net.Http: Error while copying content to a stream. System.Private.CoreLib: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.. An existing connection was forcibly closed by the remote host.
[2024-05-13T00:49:38.577Z] Error building configuration in an external startup class.
[2024-05-13T00:49:38.578Z] Error building configuration in an external startup class. System.Net.Http: Error while copying content to a stream. System.Private.CoreLib: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.. An existing connection was forcibly closed by the remote host.
[2024-05-13T00:49:38.606Z] A host error has occurred during startup operation '2d4783b2-f57d-44b2-ac3e-a3e3b8cfdf06'.
[2024-05-13T00:49:38.607Z] Microsoft.Azure.WebJobs.Script: Error building configuration in an external startup class. System.Net.Http: Error while copying content to a stream. System.Private.CoreLib: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.. An existing connection was forcibly closed by the remote host.
Value cannot be null. (Parameter 'provider')
[2024-05-13T00:49:38.659Z] Host startup operation has been canceled
[2024-05-13T00:49:38.668Z] A host error has occurred during startup operation 'e2728353-1675-4eb5-a8a7-6e16cc2f11fc'.
[2024-05-13T00:49:38.668Z] Microsoft.Azure.WebJobs.Script: Error building configuration in an external startup class. System.Net.Http: Error while copying content to a stream. System.Private.CoreLib: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.. An existing connection was forcibly closed by the remote host.
[2024-05-13T00:49:38.695Z] Azure Storage connection string is empty or invalid. Unable to write diagnostic events.
Value cannot be null. (Parameter 'provider')
[2024-05-13T00:49:38.717Z] Host startup operation has been canceled
[2024-05-13T00:49:38.750Z] Azure Storage connection string is empty or invalid. Unable to write diagnostic events.
10:54:34 AM: Error: connect ECONNREFUSED 127.0.0.1:8000
11:02:48 AM: Running command: "C:\Users\myusername\.azurelogicapps\dependencies\FuncCoreTools\func host start --port 8000" with pid: "16852"...

Azure Functions Core Tools
Core Tools Version:       4.0.5455 Commit hash: N/A  (64-bit)
Function Runtime Version: 4.27.5.21554

[2024-05-13T01:02:52.370Z] Error building configuration in an external startup class.
[2024-05-13T01:02:52.370Z] Error building configuration in an external startup class. System.Net.Http: Error while copying content to a stream. System.Private.CoreLib: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.. An existing connection was forcibly closed by the remote host.
[2024-05-13T01:02:52.425Z] A host error has occurred during startup operation '224ef951-dcc0-452e-abac-45ffd306cbec'.
[2024-05-13T01:02:52.426Z] Microsoft.Azure.WebJobs.Script: Error building configuration in an external startup class. System.Net.Http: Error while copying content to a stream. System.Private.CoreLib: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.. An existing connection was forcibly closed by the remote host.
Value cannot be null. (Parameter 'provider')
[2024-05-13T01:02:52.453Z] Host startup operation has been canceled
[2024-05-13T01:02:52.475Z] Azure Storage connection string is empty or invalid. Unable to write diagnostic events.
11:03:17 AM: Running command: "C:\Users\myusername\.azurelogicapps\dependencies\FuncCoreTools\func host start --port 8000" with pid: "8824"...

Azure Functions Core Tools
Core Tools Version:       4.0.5455 Commit hash: N/A  (64-bit)
Function Runtime Version: 4.27.5.21554

[2024-05-13T01:03:19.392Z] Error building configuration in an external startup class.
[2024-05-13T01:03:19.392Z] Error building configuration in an external startup class. System.Net.Http: Error while copying content to a stream. System.Private.CoreLib: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.. An existing connection was forcibly closed by the remote host.
[2024-05-13T01:03:19.424Z] A host error has occurred during startup operation '17005a52-092c-44bc-a0a0-fc0f592a5606'.
[2024-05-13T01:03:19.424Z] Microsoft.Azure.WebJobs.Script: Error building configuration in an external startup class. System.Net.Http: Error while copying content to a stream. System.Private.CoreLib: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.. An existing connection was forcibly closed by the remote host.
Value cannot be null. (Parameter 'provider')
[2024-05-13T01:03:19.437Z] Host startup operation has been canceled
[2024-05-13T01:03:19.446Z] Azure Storage connection string is empty or invalid. Unable to write diagnostic events.
11:08:19 AM: Error: connect ECONNREFUSED 127.0.0.1:8000
11:20:02 AM: Running command: "C:\Users\myusername\.azurelogicapps\dependencies\FuncCoreTools\func host start --port 8000" with pid: "19896"...

Azure Functions Core Tools
Core Tools Version:       4.0.5455 Commit hash: N/A  (64-bit)
Function Runtime Version: 4.27.5.21554

[2024-05-13T01:20:04.422Z] Error building configuration in an external startup class.
[2024-05-13T01:20:04.422Z] Error building configuration in an external startup class. System.Net.Http: Error while copying content to a stream. System.Private.CoreLib: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.. An existing connection was forcibly closed by the remote host.
[2024-05-13T01:20:04.464Z] A host error has occurred during startup operation '78e2ad2a-8c2c-45f7-8d19-a140dcf45216'.
[2024-05-13T01:20:04.464Z] Microsoft.Azure.WebJobs.Script: Error building configuration in an external startup class. System.Net.Http: Error while copying content to a stream. System.Private.CoreLib: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.. An existing connection was forcibly closed by the remote host.
Value cannot be null. (Parameter 'provider')
[2024-05-13T01:20:04.482Z] Host startup operation has been canceled
[2024-05-13T01:20:04.495Z] Azure Storage connection string is empty or invalid. Unable to write diagnostic events.
11:21:41 AM: Error: connect ECONNREFUSED 127.0.0.1:8000

What type of Logic App Is this happening in?

Standard (VSCode)

Are you using new designer or old designer

New Designer

Did you refer to the TSG before filing this issue? https://aka.ms/lauxtsg

Yes

Workflow JSON

This is pointless as it happens for all of my flows.

{
    "definition": {
        "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
        "actions": {
            "HTTP_(Create_Drive_Folder_Item)": {
                "type": "Http",
                "inputs": {
                    "uri": "@{variables('SharePoint Item URL')}/children",
                    "method": "POST",
                    "body": {
                        "name": "@triggerBody()?['NewFolderName']",
                        "folder": {}
                    },
                    "authentication": "@body('Initialise_MS_Graph_Parameters')['Credentials']",
                    "retryPolicy": {
                        "type": "fixed",
                        "count": 3,
                        "interval": "PT5S"
                    }
                },
                "runAfter": {
                    "Initialize_SharePoint_Item_URL": [
                        "SUCCEEDED"
                    ]
                },
                "runtimeConfiguration": {
                    "contentTransfer": {
                        "transferMode": "Chunked"
                    }
                }
            },
            "Switch_On_HTTP_Response_Status_Code": {
                "type": "Switch",
                "expression": "@outputs('HTTP_(Create_Drive_Folder_Item)')?['statusCode']",
                "default": {
                    "actions": {
                        "Response_(Default)": {
                            "type": "Response",
                            "kind": "Http",
                            "inputs": {
                                "statusCode": 400,
                                "body": "@body('HTTP_(Create_Drive_Folder_Item)')"
                            }
                        },
                        "Terminate_(Failed)": {
                            "type": "Terminate",
                            "inputs": {
                                "runStatus": "Failed"
                            },
                            "runAfter": {
                                "Response_(Default)": [
                                    "SUCCEEDED"
                                ]
                            }
                        }
                    }
                },
                "cases": {
                    "Case_201_(Created)": {
                        "actions": {
                            "Response_(201)": {
                                "type": "Response",
                                "kind": "Http",
                                "inputs": {
                                    "statusCode": 200,
                                    "body": "@body('HTTP_(Create_Drive_Folder_Item)')"
                                }
                            }
                        },
                        "case": 201
                    },
                    "Case_409_(Exists)": {
                        "actions": {
                            "Get_Existing_Folder_Item": {
                                "type": "Workflow",
                                "inputs": {
                                    "host": {
                                        "workflow": {
                                            "id": "Graph_Get_Drive_Item"
                                        }
                                    },
                                    "body": {
                                        "Optional_ItemUrl": "@variables('SharePoint Item URL')",
                                        "Optional_CredentialsIndex": "@{triggerBody()?['Optional_CredentialsIndex']}"
                                    },
                                    "retryPolicy": {
                                        "type": "none"
                                    }
                                },
                                "runAfter": {
                                    "Set_SharePoint_Item_URL": [
                                        "SUCCEEDED"
                                    ]
                                }
                            },
                            "Set_SharePoint_Item_URL": {
                                "type": "SetVariable",
                                "inputs": {
                                    "name": "SharePoint Item URL",
                                    "value": "@{body('Initialise_MS_Graph_Parameters')['Base_URL']}/@{body('Get_Destination_Folder_Drive_Item')['parentReference']['path']}/@{body('Get_Destination_Folder_Drive_Item')['name']}/@{triggerBody()?['NewFolderName']}"
                                }
                            },
                            "Response_(409)": {
                                "type": "Response",
                                "kind": "Http",
                                "inputs": {
                                    "statusCode": 200,
                                    "body": "@body('Get_Existing_Folder_Item')"
                                },
                                "runAfter": {
                                    "Get_Existing_Folder_Item": [
                                        "SUCCEEDED"
                                    ]
                                }
                            }
                        },
                        "case": 409
                    }
                },
                "runAfter": {
                    "HTTP_(Create_Drive_Folder_Item)": [
                        "SUCCEEDED",
                        "FAILED"
                    ]
                }
            },
            "Initialize_SharePoint_Item_URL": {
                "type": "InitializeVariable",
                "inputs": {
                    "variables": [
                        {
                            "name": "SharePoint Item URL",
                            "type": "string",
                            "value": "@{body('Initialise_MS_Graph_Parameters')['Base_URL']}/drives/@{variables('Destination Folder Drive Item')['parentReference']['driveId']}/items/@{variables('Destination Folder Drive Item')['id']}"
                        }
                    ]
                },
                "runAfter": {
                    "If_Option_DestinationFolderDriveItem_Is_Supplied": [
                        "SUCCEEDED"
                    ]
                }
            },
            "Initialise_MS_Graph_Parameters": {
                "type": "Workflow",
                "inputs": {
                    "host": {
                        "workflow": {
                            "id": "Graph_Initialise_HTTP_Parameters"
                        }
                    },
                    "body": {
                        "SharePointSiteID": "@triggerBody()?['SharePointSiteID']",
                        "CredentialsIndex": "@triggerBody()?['Optional_CredentialsIndex']"
                    }
                },
                "runAfter": {}
            },
            "If_Option_DestinationFolderDriveItem_Is_Supplied": {
                "type": "If",
                "expression": {
                    "and": [
                        {
                            "not": {
                                "equals": [
                                    "@triggerBody()?['Optional_DestinationFolderDriveItem']",
                                    "@null"
                                ]
                            }
                        }
                    ]
                },
                "actions": {
                    "Set_Destination_Folder_Drive_Item_(Supplied)": {
                        "type": "SetVariable",
                        "inputs": {
                            "name": "Destination Folder Drive Item",
                            "value": "@triggerBody()?['Optional_DestinationFolderDriveItem']"
                        }
                    }
                },
                "else": {
                    "actions": {
                        "Get_Destination_Folder_Drive_Item": {
                            "type": "Workflow",
                            "inputs": {
                                "host": {
                                    "workflow": {
                                        "id": "Graph_Get_Drive_Item"
                                    }
                                },
                                "body": {
                                    "ItemPath": "@triggerBody()?['DestinationFolderPath']",
                                    "SharePointSiteID": "@triggerBody()?['SharePointSiteID']",
                                    "Optional_CredentialsIndex": "@{triggerBody()?['Optional_CredentialsIndex']}"
                                },
                                "retryPolicy": {
                                    "type": "none"
                                }
                            }
                        },
                        "Set_Destination_Folder_Drive_Item_(Determined)": {
                            "type": "SetVariable",
                            "inputs": {
                                "name": "Destination Folder Drive Item",
                                "value": "@body('Get_Destination_Folder_Drive_Item')"
                            },
                            "runAfter": {
                                "Get_Destination_Folder_Drive_Item": [
                                    "SUCCEEDED"
                                ]
                            }
                        }
                    }
                },
                "runAfter": {
                    "Initialize_Destination_Folder_Drive_Item": [
                        "SUCCEEDED"
                    ]
                }
            },
            "Initialize_Destination_Folder_Drive_Item": {
                "type": "InitializeVariable",
                "inputs": {
                    "variables": [
                        {
                            "name": "Destination Folder Drive Item",
                            "type": "object"
                        }
                    ]
                },
                "runAfter": {
                    "Initialise_MS_Graph_Parameters": [
                        "SUCCEEDED"
                    ]
                }
            }
        },
        "triggers": {
            "When_a_HTTP_request_is_received": {
                "type": "Request",
                "kind": "Http",
                "inputs": {
                    "schema": {
                        "properties": {
                            "SharePointSiteID": {
                                "type": "string"
                            },
                            "DestinationFolderPath": {
                                "type": "string"
                            },
                            "NewFolderName": {
                                "type": "string"
                            },
                            "Optional_DestinationFolderDriveItem": {
                                "type": "object"
                            },
                            "Optional_CredentialsIndex": {
                                "type": "number"
                            }
                        },
                        "type": "object"
                    }
                }
            }
        },
        "contentVersion": "1.0.0.0",
        "outputs": {}
    },
    "kind": "Stateful"
}

Screenshots or Videos

image

Browser

Chrome

Additional context

This is of high importance, I can't function at present and am on a very tight timeline!!!

brad302 commented 6 months ago

@ccastrotrejo have you got any ideas for this one? This is a real problem for me, I'm in a position where I can't do anything!

brad302 commented 6 months ago

I have since upgraded the azure functions core tools to be of this version ...

Azure Functions Core Tools
Core Tools Version:       4.0.5700 Commit hash: N/A +71cc84964a60bfb07d95839b7c666bd239507bdd (64-bit)
Function Runtime Version: 4.33.2.22572

... and the dotnet SDK to be the latest (6.0.241). That hasn't worked though.

brad302 commented 6 months ago

It's an internal VPN thing by the looks of it. Not an issue for you guys.

ccastrotrejo commented 6 months ago

Hi @brad302 I am glad this was solved on your end. Please let us know if something else goes wrong!