]sink uri invalid 'protocol is incompatible with mysql scheme'

7.4.0版本新建chnagefeed报错,而7.1版本往同样下游则没问题
[tidb@tgypt-xx13d002-cs76w ~]$ cdc cli changefeed create --pd=http://1.1.8.16:23791 --sink-uri=“mysql://root:PassWdGr@1.1.8.18:4001/” --changefeed-id=“v740-2-v741-1” --config=cdc.yaml
Error: [CDC:ErrSinkURIInvalid]sink uri invalid 'protocol is incompatible with mysql scheme'

cdc cli changefeed create --pd=http://1.1.8.16:23794 --sink-uri=“mysql://root:PassWdGr@1.1.8.18:4001/” --changefeed-id=“v740-2-v741-1” --config=cdc.yaml
Create changefeed successfully!
ID: v740-2-v741-1

@h5n1 我用 cdc 7.4.0 (Git Commit Hash: 744211d931db53bdce429063a64f4db8bf4ad3bf)不能复现这个问题。麻烦提供一下 cdc.yaml 内容和 cdc 日志,谢谢

ARM平台的

[2023/11/06 17:28:37.710 +08:00] [ERROR] [tso_dispatcher.go:557] [“[tso] update connection contexts failed”] [dc=global] [error=“rpc error: code = Canceled desc = context canceled”]
[2023/11/06 17:28:37.710 +08:00] [INFO] [tso_dispatcher.go:240] [“exit tso dispatcher loop”]
[2023/11/06 17:28:37.711 +08:00] [INFO] [tso_dispatcher.go:186] [“exit tso requests cancel loop”]
[2023/11/06 17:28:37.710 +08:00] [INFO] [resource_manager_client.go:314] [“[resource manager] exit resource token dispatcher”]
[2023/11/06 17:28:37.711 +08:00] [INFO] [tso_dispatcher.go:339] [“[tso] exit tso dispatcher”] [dc-location=global]
[2023/11/06 17:28:37.711 +08:00] [INFO] [pd_service_discovery.go:524] [“[pd] cannot update member from this address”] [address=http://10.125.144.16:23794] [error=“[PD:client:ErrClientGetMember]error:rpc error: code = Canceled desc = context canceled target:10.125.144.16:23794 status:READY: error:rpc error: code = Canceled desc = context canceled target:10.125.144.16:23794 status:READY”]
[2023/11/06 17:28:37.711 +08:00] [ERROR] [pd_service_discovery.go:257] [“[pd] failed to update member”] [urls=“[http://10.125.144.16:23794,http://10.125.144.17:23794,http://10.125.144.18:23794]”] [error=“[PD:client:ErrClientGetMember]error:rpc error: code = Canceled desc = context canceled target:10.125.144.16:23794 status:READY: error:rpc error: code = Canceled desc = context canceled target:10.125.144.16:23794 status:READY”] [errorVerbose=“[PD:client:ErrClientGetMember]error:rpc error: code = Canceled desc = context canceled target:10.125.144.16:23794 status:READY: error:rpc error: code = Canceled desc = context canceled target:10.125.144.16:23794 status:READY\ngithub.com/tikv/pd/client.(*pdServiceDiscovery).updateMember\n\tgithub.com/tikv/pd/client@v0.0.0-20230912103610-2f57a9f050eb/pd_service_discovery.go:529\ngithub.com/tikv/pd/client/retry.(*BackOffer).Exec\n\tgithub.com/tikv/pd/client@v0.0.0-20230912103610-2f57a9f050eb/retry/backoff.go:36\ngithub.com/tikv/pd/client.(*pdServiceDiscovery).updateMemberLoop\n\tgithub.com/tikv/pd/client@v0.0.0-20230912103610-2f57a9f050eb/pd_service_discovery.go:256\nruntime.goexit\n\truntime/asm_arm64.s:1197”]
[2023/11/06 17:28:37.711 +08:00] [INFO] [pd_service_discovery.go:248] [“[pd] exit member loop due to context canceled”]
[2023/11/06 17:28:37.711 +08:00] [INFO] [tso_client.go:134] [“closing tso client”]
[2023/11/06 17:28:37.711 +08:00] [INFO] [tso_client.go:139] [“close tso client”]
[2023/11/06 17:28:37.711 +08:00] [INFO] [tso_client.go:150] [“tso client is closed”]
[2023/11/06 17:28:37.711 +08:00] [INFO] [pd_service_discovery.go:294] [“[pd] close pd service discovery client”]
[2023/11/06 17:28:37.736 +08:00] [INFO] [tso_dispatcher.go:240] [“exit tso dispatcher loop”]
[2023/11/06 17:28:37.736 +08:00] [INFO] [resource_manager_client.go:314] [“[resource manager] exit resource token dispatcher”]
[2023/11/06 17:28:37.736 +08:00] [INFO] [tso_dispatcher.go:405] [“[tso] stop fetching the pending tso requests due to context canceled”] [dc-location=global]
[2023/11/06 17:28:37.736 +08:00] [INFO] [tso_dispatcher.go:186] [“exit tso requests cancel loop”]
[2023/11/06 17:28:37.736 +08:00] [INFO] [tso_dispatcher.go:339] [“[tso] exit tso dispatcher”] [dc-location=global]
[2023/11/06 17:28:37.736 +08:00] [INFO] [pd_service_discovery.go:248] [“[pd] exit member loop due to context canceled”]
[2023/11/06 17:28:37.736 +08:00] [INFO] [tso_client.go:134] [“closing tso client”]
[2023/11/06 17:28:37.736 +08:00] [INFO] [tso_client.go:139] [“close tso client”]
[2023/11/06 17:28:37.736 +08:00] [INFO] [tso_client.go:150] [“tso client is closed”]
[2023/11/06 17:28:37.736 +08:00] [INFO] [pd_service_discovery.go:294] [“[pd] close pd service discovery client”]
[2023/11/06 17:28:37.736 +08:00] [INFO] [middleware.go:49] [/api/v2/changefeeds] [status=400] [method=POST] [path=/api/v2/changefeeds] [query=] [ip=10.125.144.16] [user-agent=Go-http-client/1.1] [client-version=v6.6.0] [error=“[CDC:ErrSinkURIInvalid]sink uri invalid ‘protocol is incompatible with mysql scheme’”] [errorVerbose=“[CDC:ErrSinkURIInvalid]sink uri invalid ‘protocol is incompatible with mysql scheme’\ngithub.com/pingcap/errors.AddStack\n\tgithub.com/pingcap/errors@v0.11.5-0.20221009092201-b66cddb77c32/errors.go:174\ngithub.com/pingcap/errors.(*Error).GenWithStackByArgs\n\tgithub.com/pingcap/errors@v0.11.5-0.20221009092201-b66cddb77c32/normalize.go:164\ngithub.com/pingcap/tiflow/pkg/config.(*SinkConfig).validateAndAdjustSinkURI\n\tgithub.com/pingcap/tiflow/pkg/config/sink.go:722\ngithub.com/pingcap/tiflow/pkg/config.(*SinkConfig).validateAndAdjust\n\tgithub.com/pingcap/tiflow/pkg/config/sink.go:574\ngithub.com/pingcap/tiflow/pkg/config.(*ReplicaConfig).ValidateAndAdjust\n\tgithub.com/pingcap/tiflow/pkg/config/replica_config.go:198\ngithub.com/pingcap/tiflow/cdc/api/v2.APIV2HelpersImpl.verifyCreateChangefeedConfig\n\tgithub.com/pingcap/tiflow/cdc/api/v2/api_helpers.go:204\ngithub.com/pingcap/tiflow/cdc/api/v2.(*OpenAPIV2).createChangefeed\n\tgithub.com/pingcap/tiflow/cdc/api/v2/changefeed.go:105\ngithub.com/gin-gonic/gin.(*Context).Next\n\tgithub.com/gin-gonic/gin@v1.8.1/context.go:173\ngithub.com/pingcap/tiflow/cdc/api/v2.RegisterOpenAPIV2Routes.ForwardToControllerMiddleware.func4\n\tgithub.com/pingcap/tiflow/cdc/api/middleware/middleware.go:96\ngithub.com/gin-gonic/gin.(*Context).Next\n\tgithub.com/gin-gonic/gin@v1.8.1/context.go:173\ngithub.com/pingcap/tiflow/cdc/api/v2.RegisterOpenAPIV2Routes.ErrorHandleMiddleware.func3\n\tgithub.com/pingcap/tiflow/cdc/api/middleware/middleware.go:65\ngithub.com/gin-gonic/gin.(*Context).Next\n\tgithub.com/gin-gonic/gin@v1.8.1/context.go:173\ngithub.com/pingcap/tiflow/cdc/api/v2.RegisterOpenAPIV2Routes.LogMiddleware.func2\n\tgithub.com/pingcap/tiflow/cdc/api/middleware/middleware.go:39\ngithub.com/gin-gonic/gin.(*Context).Next\n\tgithub.com/gin-gonic/gin@v1.8.1/context.go:173\ngithub.com/pingcap/tiflow/cdc/api/v2.RegisterOpenAPIV2Routes.CheckServerReadyMiddleware.func1\n\tgithub.com/pingcap/tiflow/cdc/api/middleware/middleware.go:179\ngithub.com/gin-gonic/gin.(*Context).Next\n\tgithub.com/gin-gonic/gin@v1.8.1/context.go:173\ngithub.com/gin-gonic/gin.CustomRecoveryWithWriter.func1\n\tgithub.com/gin-gonic/gin@v1.8.1/recovery.go:101\ngithub.com/gin-gonic/gin.(*Context).Next\n\tgithub.com/gin-gonic/gin@v1.8.1/context.go:173\ngithub.com/gin-gonic/gin.(*Engine).handleHTTPRequest\n\tgithub.com/gin-gonic/gin@v1.8.1/gin.go:616\ngithub.com/gin-gonic/gin.(*Engine).ServeHTTP\n\tgithub.com/gin-gonic/gin@v1.8.1/gin.go:572\nnet/http.serverHandler.ServeHTTP\n\tnet/http/server.go:2938\nnet/http.(*conn).serve\n\tnet/http/server.go:2009\nruntime.goexit\n\truntime/asm_arm64.s:1197”] [duration=38.072219ms]

bdr-mode = true
[filter]
rules = [‘sbtest.*’]
[mounter]
worker-num = 24

你目前使用的 cdc client 是 6.6.0 版本,和 server 的版本不匹配。

建议升级到 server 对应版本再试一下。

2 个赞

我用 v6.6.0 cdc 和 v7.4.0 tidb 能复现出这个问题了
v7.4.0 cdc 和 v7.4.0 tidb 是 OK 的。

1 个赞

这两个版本有什么比较大的差异吗?从7.1到7.4 中间虽然差了2个版本,但这个也不是啥新版本的特殊命令,是不是应该保持一下兼容性。

CDC 和 TiDB 的兼容性,CDC 比 TiDB 版本高,比如 CDC 7.4, TiDB 7.1 是支持的。
反过来是不保证的。

具体需要怎么做

1.我测试环境是直接 部署的7.1.2,同步到下游的tidb cloud 是 6.6.0, 7.1.2的cdc直接可以用
2.生产环境集群整体是7.1.0升级到7.1.1再升级到7.1.2的,然后7.1.2的cdc 就报错Error: [CDC:ErrSinkURIInvalid]sink uri invalid ‘protocol is incompatible with mysql scheme’
3.按照你的方式,我下载了7.1.0 7.1.1 7.1.2 6.6.0 三个版本的cdc 都报错这个,有些懵了

你重新发一个帖子把问题的具体情况再描述清晰一些

此话题已在最后回复的 60 天后被自动关闭。不再允许新回复。