azure-xplat-cli icon indicating copy to clipboard operation
azure-xplat-cli copied to clipboard

extension-image list command fails with ECONNRESET

Open gatneil opened this issue 9 years ago • 14 comments

CLI Version: 0.10.2 (node 4.2.6) OS Type: Linux (Ubuntu 16.04.1 LTS) Installation via: npm Mode: ARM

Environment: AzureCloud

Description: azure vm extension-image list command hangs for a couple minutes, then throws error ECONNRESET. If I give the -vv flag, it seems the CLI is actually getting a bunch of data back but is hanging and throwing an error instead of showing it to the user; perhaps it is still trying to get more pages of output from the platform? (speculation)

Steps to reproduce:

  1. Run azure vm extension-image list (ideally from Ubuntu 16.04.1 LTS)

Error stack trace:

Please paste the content of ~/.azure/azure.err or C:\Users\username.azure\azure.err over here

image

gatneil avatar Aug 04 '16 22:08 gatneil

@sauryadas @huangpf - Can you take a look into this issue?

amarzavery avatar Sep 08 '16 19:09 amarzavery

@amarzavery I believed we had similar reports about this before, and it's partially caused by the large request/response payloads from service side, and also partially by the inability to handle large payloads in the Node SDK.

Do you have any general suggestion on handling large payloads in Node CLI? Thanks.

huangpf avatar Sep 16 '16 21:09 huangpf

@gatneil Is it transient or not?

huangpf avatar Sep 16 '16 21:09 huangpf

@huangpf just tried again (this time with version 0.10.3), and still seeing this behavior (so not transient, unless I'm just really unlucky ;)):

image

gatneil avatar Sep 16 '16 21:09 gatneil

@gatneil It works for me on my end, but the version is 0.10.4. Do you want to try it out? Also, westus may be a very busy region. Try some other new ones, like the new UK regions. Thanks.

huangpf avatar Sep 16 '16 21:09 huangpf

Running in a docker is much slower, but it still works eventually:

info:    vm extension-image list command OK
C:\cli>node bin\azure --version
0.10.4 (node: 0.12.7)
C:\cli>ver
Microsoft Windows [Version 10.0.14300]
C:\cli>exit
PS D:\docker>

huangpf avatar Sep 16 '16 22:09 huangpf

Updated to 0.10.4; succeeded in uksouth but failed in all other regions I tried (list below):

eastasia southeastasia centralus eastus eastus2 westus northcentralus southcentralus northeurope westeurope japanwest japaneast brazilsouth

gatneil avatar Sep 16 '16 23:09 gatneil

@amarzavery This command makes a lot of API queries behind the scene, and any one of them failed or time out would cause this break.

Does the CLI framework offer any common utility function for retry that we can leverage? Thanks.

huangpf avatar Sep 21 '16 16:09 huangpf

https://github.com/Azure/azure-sdk-for-node/pull/1938

amarzavery avatar Oct 18 '16 23:10 amarzavery

Is that a fix? 👍 @amarzavery

huangpf avatar Oct 18 '16 23:10 huangpf

@huangpf - yup.

amarzavery avatar Oct 18 '16 23:10 amarzavery

I have made comments in the node sdk PR for you to review, so you can quickly review the concerned parts in the PR.

amarzavery avatar Oct 18 '16 23:10 amarzavery

LGTM. Thanks~

huangpf avatar Oct 18 '16 23:10 huangpf

need to publish new version of ms-rest and ms-rest-azure for the fix to take effect.

amarzavery avatar Jan 04 '17 00:01 amarzavery