Hi, https://learn.hashicorp.com/consul/getting-started/connect
I followed the above link, and saw “connect proxy” worked but “connect envoy” did not.
To be exact, the “connect envoy” with “socat” works but “connect envoy” with the dependent service does not work.
envoy debug log says:
[2020-07-02 13:36:59.195][21936][debug][filter] [external/envoy/source/common/tcp_proxy/tcp_proxy.cc:395] [C30] Creating connection to cluster socat.default.yz.internal.69e9281f-9351-099c-613a-48349ccde8c3.consul
[2020-07-02 13:36:59.195][21936][debug][upstream] [external/envoy/source/common/upstream/cluster_manager_impl.cc:1288] no healthy host for TCP connection pool
I also consul monitor
with debug loglevel, and nothing was of interest.
2020-07-02T13:53:52.023+0800 [DEBUG] agent.envoy: generating cluster for: cluster=socat.default.yz.internal.69e9281f-9351-099c-613a-48349ccde8c3.consul
2020-07-02T13:53:52.054+0800 [DEBUG] agent.envoy: generating endpoints for: cluster=socat.default.yz.internal.69e9281f-9351-099c-613a-48349ccde8c3.consul
I was using Consul 1.8.0 (ACL enabled, Consul as CA provider), envoy 1.14.2.
All services are expected on host network of 2 machines.
{
"service": {
"name": "socat",
"id": "socat",
"port": 8181,
"token": "8627106a-31be-3dff-e920-7c17dbd20e81",
"connect": {
"sidecar_service": {
}
}
}
}
{
"service": {
"name": "socat-dep",
"id": "socat-dep",
"token": "8627106a-31be-3dff-e920-7c17dbd20e81",
"connect": {
"sidecar_service": {
"proxy": {
"upstreams": [
{
"destination_name": "socat",
"local_bind_port": 9191
}
]
}
}
}
}
}
and for the token of 8627106a-31be-3dff-e920-7c17dbd20e81:
service_prefix "socat" {
policy = "write"
}
Still, I create intention allowing from socat-dep to socat.
(I even tried intention allowing * to *)
Any idea?