Skip to content

TiCDC mysql sink can not connect to ipv6 address #6135

Closed
@overvenus

Description

What did you do?

Create a changefeed that replicate data to an ipv6 address MySQL server.

tiup cdc cli changefeed create --pd="http://[::1]:2379" --sink-uri="tidb://root:@[::1]:4005/" --changefeed-id="simple-replication-task" --sort-engine="unified" 

dsnStr := fmt.Sprintf("%s:%s@tcp(%s:%s)/%s", username, password, hostName, port, params.tls)

We should use net.JoinHostPort for hostnames that are in literal IP addresses.

Workaround: use DNS domain name.

What did you expect to see?

Success.

What did you see instead?

Starting component cdc: /Users/.tiup/components/cdc/v6.1.0/cdc cli changefeed create --pd=http://[::1]:2379 --sink-uri=tidb://root:@[::1]:4005/ --changefeed-id=simple-replication-task --sort-engine=unified
Error: [CDC:ErrMySQLConnectionError]fail to open MySQL connection: dial tcp [::1:4005]:3306: connect: no route to host

Versions of the cluster

TiCDC version (execute cdc version):

v6.1.0

Activity

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

Metadata

Assignees

Labels

affects-6.1This bug affects the 6.1.x(LTS) versions.area/dmIssues or PRs related to DM.area/ticdcIssues or PRs related to TiCDC.component/sinkSink component.severity/moderatetype/bugThe issue is confirmed as a bug.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions