extension-image list command fails with ECONNRESET
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:
- 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

@sauryadas @huangpf - Can you take a look into this issue?
@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.
@gatneil Is it transient or not?
@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 ;)):

@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.
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>
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
@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.
https://github.com/Azure/azure-sdk-for-node/pull/1938
Is that a fix? 👍 @amarzavery
@huangpf - yup.
I have made comments in the node sdk PR for you to review, so you can quickly review the concerned parts in the PR.
LGTM. Thanks~
need to publish new version of ms-rest and ms-rest-azure for the fix to take effect.