GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix: bracket resolved IPv6 hostnames in Artery settings by He-Pin · Pull Request #3809 · apache/pekko

Conversation

@He-Pin

@He-Pin He-Pin commented Nov 23, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Motivation

Artery's <getHostAddress> setting can resolve to an IPv6 literal. That result skipped the existing normalization for explicitly configured IPv6 addresses.

Modification

Apply the existing IPv6 bracket rule after resolving the hostname setting, for both canonical and explicit bind hostnames. Keep DNS names, IPv4 addresses and already bracketed literals unchanged. This revision leaves the production change as previously reviewed and adds coverage for a numeric IPv6 scope ID and an IPv6 literal returned by <getHostName>, without requiring a real network interface or reverse DNS.

Result

A resolved numeric IPv6 hostname can be used in an advertised Pekko address and parsed back. The docs now name both <getHostAddress> and <getHostName>. The settings tests pin both cases deterministically.

Risk

The change is limited to hostname normalization in Artery settings. No change to the transport lookup API or new requirements for address resolution.

Tests

The original IPv6 settings regression failed on the baseline with the same test seam and passed with the fix. With this revision, all 11 ArterySettingsSpec cases passed in native JDK 17 runs on both Scala 2.13.18 and 3.3.9. Scoped Scala formatting and header checks passed. Local Paradox stopped at Maven dependency access; hosted documentation CI is pending. Full build, MiMa and live TCP/Aeron IPv6 were not run locally.

Reference

Related Netty formatting precedent: netty/netty#14141

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@He-Pin
He-Pin marked this pull request as ready for review November 24, 2026 03:45
@He-Pin
He-Pin requested a review from pjfanning November 25, 2026 03:47
pjfanning
pjfanning reviewed Nov 25, 2026
View reviewed changes

@pjfanning pjfanning left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks correct to me. I checked that an unbracketed resolved literal such as 0:0:0:0:0:0:0:1 gives host=null, port=-1 when the pekko://sys@host:port URI is parsed, so the bug is real, and that the bracketed form is accepted by both java.net.URI and InetSocketAddress (and is what the Aeron endpoint= channel string needs). InetAddress.getLocalHost is still only evaluated for the two placeholder values, so nothing changes for explicitly configured hostnames.

A few optional nits inline, none blocking.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread remote/src/test/scala/org/apache/pekko/remote/artery/ArterySettingsSpec.scala Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread remote/src/test/scala/org/apache/pekko/remote/artery/ArterySettingsSpec.scala Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread docs/src/main/paradox/remoting-artery.md Resolved

Uh oh!

There was an error while loading. Please reload this page.

@He-Pin
fix: bracket resolved IPv6 hostnames in Artery settings
ebfb43c
Motivation:
Explicitly configured IPv6 literals were bracketed, but a local-address
placeholder could bypass normalization and leave a canonical address
without the brackets separating its host from its port.

Modification:
Normalize hostnames after resolving either placeholder. Leave IPv4, DNS
names and already bracketed IPv6 literals unchanged. Cover numeric
scoped addresses and pre-named IPv6 literals without an interface or
name lookup, and document both placeholders.

Result:
Resolved and explicitly configured IPv6 literals use the same Artery
hostname representation and preserve a numeric scope where present.

Tests:
- JDK 17: native ArterySettingsSpec passed 11/11 each on Scala 2.13.18
  and Scala 3.3.9. Scoped license headers passed.
- Scoped OrganizeImports, Scala formatting and git diff --check passed.

References:
Refs apache#3809. Informed by Netty #14141; no source code copied.
@He-Pin
He-Pin force-pushed the hepin/artery-resolved-ipv6-hostname branch from ec780ab to ebfb43c Compare November 26, 2026 09:16
pjfanning
pjfanning approved these changes Nov 26, 2026
View reviewed changes

@pjfanning pjfanning left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding the scoped link-local and <getHostName> tests and updating the docs. LGTM.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@He-Pin
He-Pin merged commit 2c35424 into apache:main Nov 26, 2026
11 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@He-Pin
He-Pin deleted the hepin/artery-resolved-ipv6-hostname branch November 26, 2026 18:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@pjfanning pjfanning pjfanning approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@He-Pin @pjfanning
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.