Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lightning failed to connect to tidb when using ipv6 host #35880

Closed
D3Hunter opened this issue Jul 1, 2022 · 1 comment · Fixed by #35881
Closed

lightning failed to connect to tidb when using ipv6 host #35880

D3Hunter opened this issue Jul 1, 2022 · 1 comment · Fixed by #35881
Labels
affects-5.3 This bug affects 5.3.x versions. affects-5.4 This bug affects 5.4.x versions. affects-6.1 component/lightning This issue is related to Lightning of TiDB. severity/minor type/bug The issue is confirmed as a bug.

Comments

@D3Hunter
Copy link
Contributor

D3Hunter commented Jul 1, 2022

Bug Report

like pingcap/tiflow#6135, we should use net.JoinHostPort in:

dsn := fmt.Sprintf("%s:%s@tcp(%s:%d)/?charset=utf8mb4&sql_mode='%s'&maxAllowedPacket=%d&tls=%s",

PS: we cannot workaround by add square brace to host since when connecting to tidb status port we uses net.JoinHostPort, in which case it'll add square brace twice

hostPort := net.JoinHostPort(cfg.TiDB.Host, strconv.Itoa(cfg.TiDB.StatusPort))

1. Minimal reproduce step (Required)

2. What did you expect to see? (Required)

3. What did you see instead (Required)

4. What is your TiDB version? (Required)

@D3Hunter D3Hunter added type/bug The issue is confirmed as a bug. component/lightning This issue is related to Lightning of TiDB. affects-5.2 This bug affects 5.2.x versions. affects-5.3 This bug affects 5.3.x versions. affects-5.4 This bug affects 5.4.x versions. affects-6.1 and removed affects-5.2 This bug affects 5.2.x versions. affects-5.3 This bug affects 5.3.x versions. labels Jul 1, 2022
@sleepymole sleepymole changed the title failed to connect to tidb when using ipv6 host lightning failed to connect to tidb when using ipv6 host Jul 1, 2022
ti-chi-bot pushed a commit that referenced this issue Jul 5, 2022
@D3Hunter D3Hunter reopened this Jul 6, 2022
ti-chi-bot pushed a commit that referenced this issue Jul 11, 2022
ti-chi-bot pushed a commit that referenced this issue Jul 11, 2022
ti-chi-bot pushed a commit that referenced this issue Jul 11, 2022
@D3Hunter
Copy link
Contributor Author

closed since all cp merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-5.3 This bug affects 5.3.x versions. affects-5.4 This bug affects 5.4.x versions. affects-6.1 component/lightning This issue is related to Lightning of TiDB. severity/minor type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants