I’m trying to connect two services web and DB (MySQL) use the tutorial in Secure Service Communication with Consul Service Mesh and Envoy | Consul - HashiCorp Learn as model.
When I try to connect from web into DB got this lines on web proxy:
2021-04-07T20:56:29.207Z [ERROR] proxy.upstream: failed to dial: error="peer certificate mismatch got spiffe://b350502d-bd86-a715-6595-9260183bb7c2.consul/ns/default/dc/dc1/svc/web, want spiffe:///ns/default/dc/dc1/svc/db"
and this line on DB proxy:
2021-04-07T20:56:36.991Z [ERROR] proxy.inbound: connection failed: error=EOF
I use this line to run the proxy on web:
consul connect proxy -sidecar-for web
And this line for DB:
consul connect proxy -sidecar-for db_service