PyPI downloads fail on Azure Pipelines Microsoft-hosted ubuntu-26.04 agents (even after 100 retries) but succeed on ubuntu-24.04 – India region

K Yogesh 0 Reputation points
2026-11-30T15:22:50.5633333+00:00

Hi everyone,

We are seeing PyPI connectivity failures on Azure DevOps Microsoft-hosted agents in the India region, and the behaviour depends on the Ubuntu image the pipeline uses.

Environment

  • Azure DevOps Services, default Microsoft-hosted Azure Pipelines agent pool
  • Agent images: ubuntu-22.04, ubuntu-24.04, ubuntu-26.04
  • Region: India (observed on Central India; checking whether other India regions are affected)
  • Step: pip install of Python dependencies, followed by a Docker image build

Issue

  • HTTPS requests to pypi.org and files.pythonhosted.org fail or time out during pip install.
  • The packages exist and the pipeline YAML has not been changed recently.
  • ubuntu-26.04: fails consistently, even with pip retries set to 100.
  • ubuntu-24.04: in the customer's latest tests, it succeeds on the first attempt.
  • ubuntu-22.04: switching to this image reduces the failures, but production needs Ubuntu 24.04 or later.
  • Earlier in the investigation, a production run succeeded only after about 5 reruns with no changes.

What we have checked or tried

  • Raised pip timeout (120 s) and retries (10, and later up to 100). This made no difference on 26.04.
  • Recommended Azure Artifacts with PyPI as an upstream source as a mitigation.
  • The Azure DevOps Service Status advisory "PyPI connectivity issues in India region" is Active. Microsoft attributes it to PyPI's CDN serving India and says Azure Pipelines is healthy.

Why we think something more may be involved

If the cause were only the PyPI CDN in India, we would expect ubuntu-24.04 and ubuntu-26.04 agents in the same region to behave about the same. Instead, 24.04 succeeds right away and 26.04 fails every time. That suggests something specific to the ubuntu-26.04 hosted image may be involved, such as its network/DNS configuration, IPv6 preference, OpenSSL/TLS settings, or its Python/pip version.

Questions

  1. Has anyone else seen PyPI failures only on ubuntu-26.04 hosted agents while ubuntu-24.04 works?
  2. Are there known differences in the ubuntu-26.04 image (IPv6, DNS resolver, TLS/OpenSSL, pip version) that could affect connections to the Fastly CDN?
  3. Can the Azure Pipelines / runner-images team confirm whether the 26.04 image is covered by the current India-region advisory, or whether it needs a separate investigation?
  4. Apart from Azure Artifacts upstream feeds or self-hosted agents, are there recommended workarounds?

We can share 2 minimal YAML pipelines that reproduce the issue (one on ubuntu-24.04 that passes and one on ubuntu-26.04 that fails).

Azure DevOps
0 comments No comments

1 answer

Sort by: Most helpful
  1. AI answer

    2026-11-30T15:24:00.93+00:00

    Pin production jobs to ubuntu-24.04; the exact ubuntu-26.04 PyPI failure pattern has a matching public runner-images report, while the India-region incident was reported fully mitigated on November 23, 2026.^1^^2^

    pool:
      vmImage: ubuntu-24.04
    
    steps:
    - checkout: self
    - bash: |
        python --version
        python -m pip --version
        python -m pip install -r requirements.txt
      displayName: Install Python dependencies
    

    Ubuntu 24.04 is a supported Microsoft-hosted image and also backs the current ubuntu-latest label. Explicitly pinning ubuntu-24.04 avoids a future label change and meets the Ubuntu 24.04-or-later requirement.^3^

    What can currently be concluded

    • This is not adequately addressed by increasing pip retries or timeouts. Your 100-retry result already rules out that mitigation for the consistent 26.04 failure.
    • There is a public report matching the important discriminator: PyPI fails from Azure DevOps ubuntu-26.04, including SSL unexpected-EOF/read-timeout symptoms, while the same pipeline succeeds on ubuntu-24.04.^1^
    • The regional advisory and image report should be tracked separately. The status feed describes intermittent PyPI downloads affecting some customers in India, but now records that incident as mitigated.^2^
    • The available image documentation does not establish IPv6 preference, DNS resolver behavior, OpenSSL, Python, or pip as the cause. Ubuntu 26.04 being a different hosted image makes those valid investigation targets, but none should be presented as the confirmed root cause.

    Because each hosted job receives a fresh VM containing the latest revision of the selected image, repeated runs may land on updated image revisions; local changes do not persist between jobs.^3^

    Capture a useful 24.04/26.04 comparison

    Add the same non-secret diagnostic step to both minimal pipelines and attach its output to the existing runner-images issue:

    - bash: |
        set -x
        echo "Image: $ImageOS $ImageVersion"
        python --version
        python -m pip --version
        openssl version -a
        cat /etc/resolv.conf
        getent ahosts pypi.org
        getent ahosts files.pythonhosted.org
        curl -4 -Iv --connect-timeout 20 https://pypi.org/simple/
        curl -6 -Iv --connect-timeout 20 https://pypi.org/simple/ || true
      displayName: Capture PyPI network diagnostics
    

    Redact proxy addresses or other organization-specific values before posting logs. The output separates several cases:

    • DNS lookup failure versus successful address resolution.
    • IPv4 success with IPv6 failure.
    • TCP/TLS failure visible in curl.
    • Differences in Python, pip, and OpenSSL versions.
    • The exact hosted-image revision represented by ImageVersion.

    Also compare the Included software manifests linked from the hosted-agent table for both images. Microsoft directs hosted-image problems and software requests to the runner-images repository rather than documentation feedback.^3^

    Workarounds and escalation

    1. Keep 24.04 pinned until the runner-images issue records a fix and a subsequent 26.04 test passes. Do not use 22.04 as the production fallback; it is deprecated and scheduled for removal on April 17, 2027.^3^
    2. Provide both minimal pipelines in issue #15414, including timestamps, India geography, ImageVersion, failing hostnames, exact SSL/timeout text, and the comparison output above. This lets the image team correlate failures with an image revision.
    3. Open an Azure DevOps support case if the failure continues after the regional incident’s mitigation, referencing both the incident and runner-images issue. Ask support to determine whether the failing jobs are part of residual regional routing/CDN behavior or the reproducible 26.04 image case.
    4. If 26.04 becomes mandatory before resolution, a controlled agent pool is the remaining isolation option. Microsoft-hosted agents cannot have their compute configuration changed; Azure Pipelines documents self-hosted agents, VM scale-set agents, and Managed DevOps Pools as alternatives.^3^

    References

    1. [Ubuntu 26.04] pip cannot connect to pypi.org on Azure DevOps hosted agents (SSL UNEXPECTED_EOF / read timeouts); same pipeline works on ubuntu-24.04 · Issue #15414 · actions/runner-images
    2. Azure DevOps - Recent Events
    3. Microsoft-hosted agents for Azure Pipelines - Azure Pipelines | Microsoft Learn
    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

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