Skip to content

sentry-cli's glibc fails dns resolution in docker containers when IPv6 returns NXDOMAIN (even if ipv4 succeeds) #3203

@aranair

Description

@aranair

CLI Version

2.24.1, 3.3.1 (anything above 2.21.1 is broken but 2.21.1 works)

Operating System and Architecture

  • macOS (arm64)
  • macOS (x86_64)
  • Linux (i686)
  • Linux (x86_64)
  • Linux (armv7)
  • Linux (aarch64)
  • Windows (i686)
  • Windows (x86_64)

Operating System Version

Ubuntu 22.04

Link to reproduction repository

No response

CLI Command

sentry-cli releases new

Exact Reproduction Steps

  • Run any EC2 instance in AWS (this is necessary)
  • Start any docker image (e.g., alpine/ubuntu)
    • this step is also necessary; docker returns NXDOMAIN for missing record types
  • DNS resolution for sentry.io returns the right address with IPv4 but returns NXDOMAIN for IPv6
$ docker run -it alpine sh
...
/ # host sentry.io
sentry.io has address 35.186.247.156
sentry.io has address 35.186.247.156
Host sentry.io not found: 3(NXDOMAIN)
Host sentry.io not found: 3(NXDOMAIN)

Try to create a sentry release, params don't matter -> dns resolution fails

sentry-cli ... releases new ...

This works if I run the docker container with --dns 8.8.8.8 (e.g., because the upstream resolver returns differently from AWS's)

Expected Results

Sentry-cli to create a release

Actual Results

CLI errors with a DNS resolution against sentry.io

error: API request failed
  caused by: [6] Couldn't resolve host name (Could not resolve host: sentry.io)

Logs

DEBUG   2026-03-10 16:57:31.637555109 +00:00 sentry-cli version: 2.24.1, platform: "linux", architecture: "x86_64"
...
  DEBUG   2026-03-10 16:57:31.639211567 +00:00 request POST https://sentry.io/api/0/projects/<redacted>
...
  DEBUG   2026-03-10 16:57:31.639345965 +00:00 retry number 0, max retries: 0
error: API request failed
  caused by: [6] Couldn't resolve host name (Could not resolve host: sentry.io)

Metadata

Metadata

Assignees

No one assigned

    Projects

    Status

    Waiting for: Product Owner

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions