This repository has been archived by the owner on Mar 14, 2024. It is now read-only.
This repository has been archived by the owner on Mar 14, 2024. It is now read-only.
SSL_do_handshake Errors with gRPC #74
Closed
Description
openedon Sep 13, 2022
I deployed NSM and a distributed database that communicates between its members on port 5080 and 7080 using gRPC. I looked at the proxy container logs and they were flooded with errors like this. The application (dgraph) had its pods restarting due to crashes from not being able to communicate with its members. It uses Raft protocol, and the raft election process was continuously failing due to communication errors.
ACTUAL RESULTS
I'm getting a lot of SSL handshake errors between nodes that communicate between each other using gRPC:
2022/09/13 09:02:14 [error] 63#63: *26638 SSL_do_handshake() failed (SSL: error:1408F10B:SSL routines:ssl3_get_record:wrong version number) while SSL handshaking to upstream, client: 127.0.0.1, server: ~^(?<domain>.+)$, request: "POST /pb.Raft/IsPeer HTTP/2.0", upstream: "grpcs://10.104.1.9:7080", host: "dgraph-dgraph-alpha-2.dgraph-dgraph-alpha-headless.dgraph.svc.cluster.local:7080"
2022/09/13 09:02:15 [error] 63#63: *26656 upstream timed out (110: Operation timed out) while reading response header from upstream, client: 127.0.0.1, server: ~^(?<domain>.+)$, request: "POST /pb.Worker/Subscribe HTTP/2.0", upstream: "grpcs://10.104.0.13:7080", host: "dgraph-dgraph-alpha-1.dgraph-dgraph-alpha-headless.dgraph.svc.cluster.local:7080"
2022/09/13 09:02:16 [error] 63#63: *26656 SSL_do_handshake() failed (SSL: error:1408F10B:SSL routines:ssl3_get_record:wrong version number) while SSL handshaking to upstream, client: 127.0.0.1, server: ~^(?<domain>.+)$, request: "POST /pb.Worker/Subscribe HTTP/2.0", upstream: "grpcs://10.104.1.9:7080", host: "dgraph-dgraph-alpha-1.dgraph-dgraph-alpha-headless.dgraph.svc.cluster.local:7080"
2022/09/13 09:02:17 [error] 62#62: *26644 SSL_do_handshake() failed (SSL: error:1408F10B:SSL routines:ssl3_get_record:wrong version number) while SSL handshaking to upstream, client: 127.0.0.1, server: ~^(?<domain>.+)$, request: "POST /pb.Raft/IsPeer HTTP/2.0", upstream: "grpcs://10.104.1.9:7080", host: "dgraph-dgraph-alpha-0.dgraph-dgraph-alpha-headless.dgraph.svc.cluster.local:7080"
10.104.2.11 - - [13/Sep/2022:09:02:18 +0000] "POST /pb.Raft/IsPeer HTTP/2.0" 200 25 "-" "grpc-go/1.27.0" "10.104.2.11" "dgraph-dgraph-alpha-0" "spiffe://example.org/ns/dgraph/sa/default"
2022/09/13 09:02:19 [error] 63#63: *26638 SSL_do_handshake() failed (SSL: error:1408F10B:SSL routines:ssl3_get_record:wrong version number) while SSL handshaking to upstream, client: 127.0.0.1, server: ~^(?<domain>.+)$, request: "POST /pb.Raft/IsPeer HTTP/2.0", upstream: "grpcs://10.104.1.9:7080", host: "dgraph-dgraph-alpha-2.dgraph-dgraph-alpha-headless.dgraph.svc.cluster.local:7080"
2022/09/13 09:02:22 [error] 62#62: *26644 SSL_do_handshake() failed (SSL: error:1408F10B:SSL routines:ssl3_get_record:wrong version number) while SSL handshaking to upstream, client: 127.0.0.1, server: ~^(?<domain>.+)$, request: "POST /pb.Raft/IsPeer HTTP/2.0", upstream: "grpcs://10.104.1.9:7080", host: "dgraph-dgraph-alpha-0.dgraph-dgraph-alpha-headless.dgraph.svc.cluster.local:7080"
10.104.2.11 - - [13/Sep/2022:09:02:23 +0000] "POST /pb.Raft/IsPeer HTTP/2.0" 200 25 "-" "grpc-go/1.27.0" "10.104.2.11" "dgraph-dgraph-alpha-0" "spiffe://example.org/ns/dgraph/sa/default"
2022/09/13 09:02:24 [error] 63#63: *26638 SSL_do_handshake() failed (SSL: error:1408F10B:SSL routines:ssl3_get_record:wrong version number) while SSL handshaking to upstream, client: 127.0.0.1, server: ~^(?<domain>.+)$, request: "POST /pb.Raft/IsPeer HTTP/2.0", upstream: "grpcs://10.104.1.9:7080", host: "dgraph-dgraph-alpha-2.dgraph-dgraph-alpha-headless.dgraph.svc.cluster.local:7080"
2022/09/13 09:02:27 [error] 62#62: *26644 SSL_do_handshake() failed (SSL: error:1408F10B:SSL routines:ssl3_get_record:wrong version number) while SSL handshaking to upstream, client: 127.0.0.1, server: ~^(?<domain>.+)$, request: "POST /pb.Raft/IsPeer HTTP/2.0", upstream: "grpcs://10.104.1.9:7080", host: "dgraph-dgraph-alpha-0.dgraph-dgraph-alpha-headless.dgraph.svc.cluster.local:7080"
EXPECTED
no errors
STEPS
# deploy observibility - https://docs.nginx.com/nginx-service-mesh/tutorials/observability/
# deploy NSM
helm repo add nginx https://helm.nginx.com/stable
helm install nginx-mesh nginx-stable/nginx-service-mesh --values nsm.yaml
# deploy dgraph
helm repo add dgraph https://charts.dgraph.io
helm install dgraph dgraph/dgraph --values dgraph.yamlNSM Values:
# nsm.yaml
prometheusAddress: prometheus.nsm-monitoring.svc:9090
telemetry:
exporters:
otlp:
host: otel-collector.nsm-monitoring.svc
port: 4317
samplerRatio: 1
tracing: null
mtls:
mode: permissive
autoInjection:
disable: false
disabledNamespaces:
- nsm-monitoringdgraph.io values:
# dgraph.yaml
image:
tag: v21.03.2
alpha:
configFile:
config.yaml: |
security:
whitelist: "0.0.0.0/0"Metadata
Assignees
Labels
No labels
Activity