-
Notifications
You must be signed in to change notification settings - Fork 725
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
gRPC connection fail when --join
with TLS enabled
#1682
Comments
I think the join related parameter should be |
The problem is, when TLS is disabled, |
@AstroProfundis The |
I tried to verify the fix with:
The second PD instance still fails to join:
The error seems unchanged as before
The etcd server started sucessfully:
But still not fully working:
Missed CA cert somewhere? I can see PD server itself and etcd server are using the correct CA cert |
How do you generate the cacert file and the key file? And how about your config file? |
Certs are generated with Kubernetes' certificate management infrastructures, all other certs used (for TiDB, TiKV and for clients) are generated the same way. Other components are also able to connect to PD (if only one PD instance is running, this issue only occurs when trying to run multiple PD instances) without problem. ca.crt:
pd.crt:
pd.key:
|
@AstroProfundis #1740 has fixed the redirect problem. |
@rleungx Thanks, I'll update once verified. |
Hi @AstroProfundis does the fix work out? |
Fix confirmed with |
Please answer these questions before submitting your issue. Thanks!
When trying to add TLS support to tidb-operator (#750), we found that
--join
is not working correctly with TLS enabled.Assume there're
pd-0
,pd-1
andpd-2
, starting sequently.pd-0
starts as normal with--initial-cluster=pd-0=https://pd-0:2380
and TLS enabled, andpd-1
starts with--join=https://pd-0:2380
, thenpd-1
is not able to connect topd-0
and exits.The errors from
pd-1
are:And there errors on
pd-0
shows:So this might because
pd-1
uses a plain connection to try to connect topd-0
, instead of a TLS encrypted connection.We initially found this issue on a Kubernetes deployment, but it's also reproducible with binary deployment, the procedure are as above:
enable_tls = True
ininventory.ini
, but do not start itpd-0
, changepd-0:/path/to/deploy/script/run_pd.sh
and set--initial-cluster=pd-0=https://pd-0:2380
(remove other nodes), and start it withsudo systemctl start pd-2379.service
pd-1
, changepd-1:/path/to/deploy/script/run_pd.sh
and delete--initial-cluster
line, add a--join=https://pd-0:2380
line, then start it withsudo systemctl start pd-2379.service
pd-0
andpd-1
's logThe process work normally
pd-1
produce errors and exitspd-server -V
)?This issue also exists with
v3.0.2
docker image.The text was updated successfully, but these errors were encountered: