tiup icon indicating copy to clipboard operation
tiup copied to clipboard

With a tls enabled cluster got bad certificate error

Open King-Dylan opened this issue 2 years ago • 2 comments

Bug Report

With a tls enabled cluster tiup cluster display command show cdc status abnormal and use cdc cli would got bad certificate error. Please answer these questions before submitting your issue. Thanks!

  1. What did you do?
tiup cluster deploy test v5.2.2 test.yaml ## with cdc server
tiup cluster tls test enable 
tiup cluster upgrade test v5.3.0
tiup cluster display test
tiup cdc cli changefeed list --pd=http://xxx.xxx.xxx.xxx:2879 --ca /root/.tiup/storage/cluster/clusters/test/tls/ca.crt --cert /root/.tiup/storage/cluster/clusters/test/tls/client.crt --key /root/.tiup/storage/cluster/clusters/test/tls/client.pem
  1. What did you expect to see?
tiup cluster display test
ID                 Role        Host         Ports        OS/Arch       Status   Data Dir                          Deploy Dir
--                 ----        ----         -----        -------       ------   --------                          ----------
xxx.xxx.xxx.xxx:8300   cdc         172.16.5.83  8300         linux/x86_64  Up     /data2/tidb-data/cdc-8300         /data2/tidb-deploy/cdc-8300

  1. What did you see instead?
tiup cluster display test
ID                 Role        Host         Ports        OS/Arch       Status   Data Dir                          Deploy Dir
--                 ----        ----         -----        -------       ------   --------                          ----------
xxx.xxx.xxx.xxx:8300   cdc         172.16.5.83  8300         linux/x86_64  Down     /data2/tidb-data/cdc-8300         /data2/tidb-deploy/cdc-8300

tiup cdc cli changefeed list --pd=http://xxx.xxx.xxx.xxx:2879 --ca /root/.tiup/storage/cluster/clusters/test/tls/ca.crt --cert /root/.tiup/storage/cluster/clusters/test/tls/client.crt --key /root/.tiup/storage/cluster/clusters/test/tls/client.pem
[2022/08/04 17:43:00.023 +08:00] [WARN] [cli_changefeed_list.go:103] ["query changefeed info failed"] [error="Post \"https://xxx.xxx.xxx.xxx:8300/capture/owner/changefeed/query\": remote error: tls: bad certificate"]
  1. What version of TiUP are you using (tiup --version)? v1.10.2

King-Dylan avatar Aug 04 '22 10:08 King-Dylan

Could you reproduce it without upgrade cluster or enable TLS before deploy

nexustar avatar Aug 05 '22 07:08 nexustar

New deployed cluster and enable TLS can also reproduce

King-Dylan avatar Aug 10 '22 07:08 King-Dylan