Skip to content

[Bug] IpAuthHandler blocks all cross-node raft connections in Docker bridge mode — hostname vs IP mismatch #2960

@bitflicker64

Description

@bitflicker64

Bug Type (问题类型)

None

Before submit

  • 我已经确认现有的 IssuesFAQ 中没有相同 / 重复问题 (I have confirmed and searched that there are no similar problems in the historical issue and documents)

Environment (环境信息)

Environment

Expected & Actual behavior (期望与实际表现)

Expected: Cross-node raft connections between PD nodes work correctly in
Docker bridge network mode.

Actual: All cross-node raft connections are silently blocked by
IpAuthHandler. The allowlist is built using PeerId::getIp which returns
raw hostnames (e.g. "pd0", "pd1") but incoming connections arrive with
actual bridge IPs (e.g. "172.18.0.4") — the string comparison always
fails so every connection is dropped with no useful error.

Error in logs:

WARN IpAuthHandler - Blocked connection from 172.18.0.4

Workaround: assign static IPs to PD containers via docker-compose ipam
and use those IPs directly in HG_PD_RAFT_PEERS_LIST instead of hostnames.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions