1

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
Dave M
  • 4,514
  • 22
  • 31
  • 30

1 Answers1

1

I got help on another forum.

The trick was on the DB consul service config, the service address on config was pointing to 127.0.0.1, remove the address register on config and everything begin to work perfectly.