G
YouTube TikTok Games
Skip to content

[Bug]: Connection validation rejects bracketed IPv6 endpoints #4413

Open

Description

@hutiefang76

What happened?

A reachable bracketed IPv6 endpoint fails before connection validation because splitting on colons loses its host and port. CommonUtil.telnetOrPing throws IllegalArgumentException; the existing KafkaClusterSimpleInfo.validate bean uses that helper and also fails.

Expected: reachable bracketed IPv6 endpoints pass, while IPv4, optional chroot, fallback and malformed-port rejection remain supported.

Affects Versions

master at 061eb72

What table formats are you seeing the problem on?

No response

What engines are you seeing the problem on?

No response

How to reproduce

  1. Open a loopback ServerSocket on ::1 with an ephemeral port p.
  2. Call CommonUtil.telnetOrPing("[::1]:" + p). The current split attempts to parse an empty token as the port and throws before connecting.
  3. Set the same endpoint as brokerList on KafkaClusterSimpleInfo and call validate; it also fails.
  4. Repeat with /service appended to the endpoint to exercise the optional chroot.

Relevant log output

Anything else

Tests exercise real IPv4/IPv6 ServerSockets and the production helper/bean. Four of six initial cases fail on the base. Seven final cases pass, including the review-discovered empty-port regression; all 15 reactor modules compile and Spotless/Checkstyle pass. No deployed Kafka registration flow was exercised. A tested fix is ready in hutiefang76/amoro branch fix/kafka-ipv6-address-validation.

Are you willing to submit a PR?

  • Yes I am willing to submit a PR!

Code of Conduct

  • I agree to follow this project's Code of Conduct

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions