ERROR: Unable to get extension index.

Ahmed Faizan 5 Reputation points
2025-06-04T08:41:44.8133333+00:00

Microsoft Community,

I'm encountering an issue when deploying Azure Container Apps using the Azure CLI. Specifically, running the following command:

az extension add --name containerapp --upgrade

results in the following error:

ERROR: Unable to get extension index. Please ensure you have network connection. Error detail: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))

Other related commands like:

az extension list-available --output table

also fail with a similar error Connection reset by peer

Key observations:

This issue consistently occurs when the requests originate from Islamabad, Pakistan.

The network is otherwise functional; general internet connectivity is fine.

  • These commands work properly from other geographic regions (tested from Azure Portal CLI)

What I’ve tried:

Switching networks and ISPs (same result).

Using VPN to route traffic outside Pakistan — works fine.

Ensuring the Azure CLI is updated.

This seems like it might be a regional network-level restriction.

Has anyone else experienced this issue? Are there any recommended workarounds or known fixes for the region?

Thanks in advance!

Azure Container Apps
Azure Container Apps
An Azure service that provides a general-purpose, serverless container platform.
687 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Alex Burlachenko 9,780 Reputation points
    2025-06-04T13:13:15.92+00:00

    hi there Ahmed Faizan,

    thanks for throwing this question out here, really appreciate it )) ok this unable to get extension index error is super annoying, especially when ur net is working fine otherwise, right? classic case of 'why just why' :)) and yes this does look like a regional thing since it works when u vpn out. Microsoft's extension feed might be getting blocked or throttled in pakistan for some reason. not cool.... I know... BUT u can try use a different endpoint sometimes the default azure cli endpoints act up. force it to use

    az cloud set --name azurecloud  
    az extension add --name containerapp --upgrade  
    

    if that doesn't work, swap azurecloud with azurechinacloud just to test (tho u might need a china account for that). manual install if the cli can't fetch it, grab the extension manually. go azure cli extensions repo, find the containerapp extension, and install it from source. yeah it's a hassle, but it works when the net fights u ), proxy or mirror, since vpn works, maybe set up a tiny proxy just for azure cli traffic. or check if ur org can mirror the extensions feed locally. microsoft docs actually suggest this for locked-down envs azure cli proxy settings. the cache sometimes the cli's local cache goes rogue. try like this

    az cache purge  
    rm -rf ~/.azure/  
    

    then try again. this logs u out, so u'll need to az login after.

    if none of that helps, yeah it's probably a hard block in ur region. u could bug ur isp about it or just keep using the vpn workaround for now.

    microsoft's docs on extensions here might give more clues too manage azure cli extensions.

    hope something here unbreaks it for u! let me know what works )

    Best regards,

    Alex

    and "yes" if you would follow me at Q&A - personaly thx.
    P.S. If my answer help to you, please Accept my answer
    PPS That is my Answer and not a Comment
    

    https://ctrlaltdel.blog/


  2. Loknathsatyasaivarma Mahali 2,740 Reputation points Microsoft External Staff Moderator
    2025-06-09T04:26:38.1033333+00:00

    Hello Ahmed Faizan,

    Thank you for your patience and for sharing your feedback on the Q&A community platform. I’m glad to hear that you were able to resolve your issue, and I appreciate you sharing your solution! Your contribution is valuable and can help others in the community facing similar challenges.

    As per the Microsoft Q&A community policy, "The question author cannot accept their own answer. They can only accept answers by others"

    I’m reposting your solution here so you can mark it as accepted if it resolves your query:

    This issue appears to be related to regional network restrictions impacting access to certain Microsoft endpoints, particularly from regions like Pakistan. The error you're encountering—“Connection reset by peer”—suggests that connections to Microsoft's shortened link service (used in Azure CLI for extension indexing) are being blocked or reset at the network level. According to the Microsoft community post, these .aka.ms links, which Azure CLI relies on, may not be consistently reachable in some countries. A reliable workaround is to use a VPN to route traffic through another region where these links are accessible. Microsoft is aware of this issue but recommends VPNs or different network routes as the practical interim solution.

    Thank you again for your time and patience throughout this issue. 

    Please don’t forget to Accept Answer and Yes for "was this answer helpful" wherever the information provided helps you, this can be beneficial to other community members.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.