Skip to content

Bazel cannot reach to bcr.bazel.build from a ipv4 only machine with --host_jvm_args=-Djava.net.preferIPv6Addresses=true set #21525

@meteorcloudy

Description

@meteorcloudy

Description of the bug:

Recently, we enabled ipv6 support for bazel.build #21155

However, our CI revealed the issue described in the title.

The underlying problem is that with --host_jvm_args=-Djava.net.preferIPv6Addresses=true:

  • HttpURLConnection can connect from a ipv4 only machine to a ipv4 host (e.g. github.com)
  • HttpURLConnection can NOT connect from a ipv4 only machine to a ipv4 ipv6 dual stacked host (e.g. google.com)

The problem is similar to #2486

https://buildkite.com/bazel/bazel-bazel/builds/27029

Which category does this issue belong to?

No response

What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

Run bazel --host_jvm_args=-Djava.net.preferIPv6Addresses=true build //... with Bzlmod enabled on a ipv4 only machine.

Which operating system are you running Bazel on?

No response

What is the output of bazel info release?

No response

If bazel info release returns development version or (@non-git), tell us how you built Bazel.

No response

What's the output of git remote get-url origin; git rev-parse HEAD ?

No response

Is this a regression? If yes, please try to identify the Bazel commit where the bug was introduced.

No response

Have you found anything relevant by searching the web?

No response

Any other information, logs, or outputs that you want to share?

No response

Metadata

Metadata

Assignees

Labels

P2We'll consider working on this in future. (Assignee optional)team-OSSIssues for the Bazel OSS team: installation, release processBazel packaging, websitetype: bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions