Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to fix etcd cluster "error "tls: first record does not look like a TLS handshake""

I created a three node etcd cluester, config and start is already OK, but when I check the /var/log/messages, it shows

etcd: rejected connection from "172.17.0.3:43192" (error "tls: first record does not look like a TLS handshake", ServerName "")

How can I fix it ?

I have checked the health of etcd :

member 48b0dff99d5c867e is healthy: got healthy result from https://172.17.0.9:2379
member 646dab89331aabab is healthy: got healthy result from https://172.17.0.8:2379
member b45603216bfac234 is healthy: got healthy result from https://172.17.0.10:2379

That shows Ok, but when I cat the /var/log/messages, it always shows this error :

Jan 12 20:08:57 master etcd: rejected connection from "172.17.0.3:43160" (error "tls: first record does not look like a TLS handshake", ServerName "")
Jan 12 20:08:57 master etcd: rejected connection from "172.17.0.3:43162" (error "tls: oversized record received with length 21536", ServerName "")

like image 268
Payton Avatar asked Sep 11 '25 09:09

Payton


1 Answers

I got this message for the etcd peer communication when switching from http to https for peer communication. Apparently etcd has persistent peer information that overrides the command line options so it continued to use http for peer communication in spite of the command line options.

In the end, since this was a test cluster, I nuked /var/lib/etcd and the new cli configuration took hold

like image 150
Nicolai Langfeldt Avatar answered Sep 13 '25 05:09

Nicolai Langfeldt